query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns list of CardAlbum instances.
public List<CardAlbum> getNewReleasedAlbums(){ List<CardAlbum> cardAlbumList = new ArrayList<>(); String albumId = null; String artistId = null; String artistName = null; String albumImageURL=null; String albumName = null; int albumPopularity; String albumReleaseDate; SpotifyService spotifyService = getSpotifyService(); if(spotifyService!=null) { NewReleases newReleases = spotifyService.getNewReleases(); Pager<AlbumSimple> albumSimplePager = newReleases.albums; //Getting the Album Name for CardAlbum List<AlbumSimple> albumSimpleList = albumSimplePager.items; for (AlbumSimple simpleAlbum : albumSimpleList) { albumId = simpleAlbum.id; albumName = simpleAlbum.name; //Getting the list of Album Artists for CardAlbum Album album = getSpotifyAlbumById(albumId); albumPopularity = album.popularity; albumReleaseDate = album.release_date; List<ArtistSimple> simpleArtistList = album.artists; for (ArtistSimple simpleArtist : simpleArtistList) { artistId = simpleArtist.id; artistName = simpleArtist.name; } //Getting the Album Image for CardAlbum //We want to fetch the url for the image with largest dimension. List<Image> albumImages = simpleAlbum.images; int maxWidth = 0; for (Image albumImage : albumImages) { if(albumImage.width > maxWidth) maxWidth = albumImage.width; } for(Image albumImage : albumImages){ if (albumImage.width == maxWidth) { albumImageURL = albumImage.url; } } //Constructing the List of CardAlbumInstances if (simpleAlbum.name != null && albumImageURL != null && artistName !=null) { cardAlbumList.add(new CardAlbum(albumId,albumName,artistId,artistName,albumImageURL,albumPopularity,albumReleaseDate)); } } }else{ Log.d("SpotifyNewRelease","Invalid Instance Of the SpotifyService"); } return cardAlbumList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Album> findAllAlbums() {\n\t\treturn _albumDao.findAllAlbums();\n\t}", "public List<Album> getAlbums()\r\n {\r\n\treturn albumCollection; // TODO breaks encapsulation\r\n }", "public List<Album> getAlbums(Artist artist);", "List<AlbumDTO> findAll();", "@Override\r\n public List<Album> getAllAlbum()\r\n {\r\n List<Album> albumArrayList =new ArrayList<>();\r\n String query=\"select * from album\";\r\n try\r\n {\r\n Statement statement=connection.createStatement();\r\n ResultSet resultSet=statement.executeQuery(query);\r\n while(resultSet.next())\r\n {\r\n Album album =new Album(resultSet.getString(\"album_id\"),resultSet.getString(\"album_name\"),\r\n resultSet.getDate(\"relese_date\"));\r\n albumArrayList.add(album);\r\n }\r\n return albumArrayList;\r\n }\r\n catch(SQLException ex)\r\n {\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n catch(Exception ex) {\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n }", "public List<AlbumBean> resultAlbumList(PageBean pBean) {\n\t\treturn adminSearchDao.resultAlbumList(pBean);\n\t}", "public List<Card> findAllCards();", "private void InicializarListaAlbums() {\n\n GestorAlbums gestorAlbums = new GestorAlbums(this.getActivity());\n albums = gestorAlbums.AsignarAlbum();\n }", "void loadAlbums();", "public List<Card> getCards() {\n return new ArrayList<Card>(cards);\n }", "public ArrayList<VentraCard> getAllCards(){\n \treturn allCards;\n }", "List<Album> getAlbumsByUserId(Integer userId);", "public ArrayList <ITunesItem> getAlbums(String searchText) throws IOException\n\t{\n\t\tsearchText = searchText.replace(\" \", \"+\");\n\t\tString query = \"term=\" + searchText + \"&entity=album&attribute=albumTerm\";\n\t\treturn searchQuery(query);\n\t}", "public List<AbstractCard> cards();", "public ArrayList<Card> getCards() {\n\n return cards;\n }", "private MyAlbumList() {\n albums = new ArrayList<Album>();\n }", "public ArrayList<PhotoAlbum> getContents() {\n return ( ArrayList<PhotoAlbum> ) contents;\n }", "public ArrayList<Card> getCards() {return cards;}", "@Override\n\tpublic List<Album> findAlbumsByIdSinger(Long idSinger) {\n\t\treturn _albumDao.findAlbumsByIdSinger(idSinger);\n\t}", "public ArrayList<Card> getCards()\n\t{\n\t\treturn cards;\n\t}", "public List<Card> getCards(){\r\n\t\treturn cards;\r\n\t}", "public List<Card> getCards() {\n\t\treturn new ArrayList<Card>(this.content);\n\t}", "public List<Card> getCards() throws RemoteException {\n return mainScreenProvider.getCards();\n }", "public ArrayList<Card> giveAllCards() {\n\t\tArrayList<Card> temp = new ArrayList<Card>();\n\t\ttemp.addAll(cards);\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t\treturn temp;\n\t}", "public ArrayList<Album> buscarAlbuns() {\r\n \t\r\n ArrayList<Album> albuns = new ArrayList<Album>();\r\n Conexao conector = new Conexao();\r\n \r\n if(conector.conectar() == false) {\r\n \tSystem.out.println(\"Sem conexao para busca!\");\r\n \treturn null;\r\n }\r\n \r\n try {\r\n String sql = \"SELECT idAlbum, nomeAlbum, artistaAlbum,\"\r\n \t\t+ \" anoLancamentoAlbum, qtdMusicas, estiloMusicalAlbum FROM album\";\r\n pstmt = conector.getConexao().prepareStatement(sql);\r\n resultado = pstmt.executeQuery();\r\n\r\n while (resultado.next()) {\r\n \tAlbum album = new Album();\r\n \talbum.setId(resultado.getInt(1)); \r\n \talbum.setNomeAlbum(resultado.getString(2));\r\n \talbum.setArtista(resultado.getString(3));\r\n \talbum.setAnoLancamento(resultado.getInt(4));\r\n \talbum.setQtdMusicas(resultado.getInt(5));\r\n \talbum.setEstiloMusical(EstilosMusicais.values()[resultado.getInt(6)]);\r\n \talbuns.add(album); \t\r\n }\r\n } catch (SQLException exSQL) { //erro ao buscar no banco\r\n \tSystem.err.println(\"\\nExcecao na Busca: \"+exSQL);\r\n \texSQL.getMessage();\r\n \texSQL.printStackTrace();\r\n } catch (Exception ex) { //erro generico\r\n \tSystem.err.println(\"\\nExcecao: \"+ex);\r\n \tex.getMessage();\r\n \tex.printStackTrace();\r\n\t\t} finally {\r\n \ttry {\r\n \t\tif (pstmt != null) pstmt.close();\r\n \t} catch (SQLException exSQL) { //erro ao fechar statement\r\n \tSystem.err.println(\"\\nExcecao no fechamento do Statement: \"+exSQL);\r\n \texSQL.getMessage();\r\n \texSQL.printStackTrace();\r\n \t} catch (Exception ex) { //erro generico\r\n \tSystem.err.println(\"\\nExcecao: \"+ex);\r\n \tex.getMessage();\r\n \tex.printStackTrace();\r\n \t}\r\n \tconector.desconectar();\r\n }\r\n\r\n return albuns;\r\n }", "public ArrayList<Item> getAllCards()\n {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor res = db.rawQuery( \"SELECT * FROM \" + CARDS_TABLE_NAME + \" ORDER BY \" + CARDS_COLUMN_NAME + \" COLLATE NOCASE\", null );\n res.moveToFirst();\n\n while(res.isAfterLast() == false){\n card = new Item();\n card.setItemId(res.getInt(res.getColumnIndex(CARDS_COLUMN_ID)));\n card.setItemName(res.getString(res.getColumnIndex(CARDS_COLUMN_NAME)));\n card.setItemCategory(res.getString(res.getColumnIndex(CARDS_COLUMN_CATEGORY)));\n card.setItemFormat(res.getString(res.getColumnIndex(CARDS_COLUMN_FORMAT)));\n card.setItemNumber(res.getString(res.getColumnIndex(CARDS_COLUMN_NUMBER)));\n items.add(card);\n res.moveToNext();\n }\n return items;\n }", "public ArrayList<Card> getCards(){\r\n return cards;\r\n }", "public ArrayList<Card> getCards(){\n return this.cards;\n }", "void displayAlbums(FilterableAlbum[] albums);", "public List<Card> getCards() {\n\t\treturn cards;\n\t}", "@JsonIgnore\n\tpublic List<Card> getAvailableCards() {\n\t\tList<Card> availableCards = new ArrayList<>();\n\t\tfor (int i = dealtCards.get(); i < Deck.DECK_SIZE; i++) {\n\t\t\tCard card = cards.get(i);\n\t\t\tavailableCards.add(card);\n\t\t}\n\t\treturn availableCards;\n\t}", "public void getAlbumLinks() {\n Elements elements = document.getElementsByClass(\"\\n\" +\n \" js-link-block-cover-link\\n\" +\n \" link-block-cover-link\\n\" +\n \" \");\n albumsLinks = new String[elements.size()];\n for (int i = 0; i < elements.size(); i++) {\n String element = elements.get(i).attr(\"href\");\n albumsLinks[i] = element;\n }\n }", "List<Card> getCards() {\n return cards;\n }", "@Override\n\tpublic List<Card> findAllCard() {\n\t\treturn cb.findAllCard();\n\t}", "ObservableList<Card> getCardList();", "public List<AlbumDTO> getAlbumList()\n/* */ {\n/* 90 */ return this.albumList;\n/* */ }", "public AlbumSet getAlbumsByArtist(String artistId) {\n\t\t//http://emby:8096/Items?SortBy=SortName&SortOrder=Ascending&IncludeItemTypes=MusicAlbum&Recursive=true&ArtistIds=3c328d23e110ee9d4fbe6b1302635e32\n\t\tAlbumSetQueryParams queryParams = new AlbumSetQueryParams(artistId);\n\t\tURI targetUrl= buildUriWithQueryParams(\"/\"+ EmbyUrlConstants.ITEMS, queryParams);\n\t\treturn restTemplate.getForObject(targetUrl, AlbumSet.class);\n\t}", "public List<Card> list();", "@Override\r\n\tpublic List<CreditCard> findAll() {\n\t\treturn this.cardList;\r\n\t\t\r\n\t}", "public List<Album> getAlbumsByArtist(String albumArtist)\r\n {\r\n\t// iterate over each album in my album collection and where the album \r\n\t// artist is equal to albumArtist, add the album to a list of albums\r\n\tList<Album> albumsByArtist = new ArrayList<>();\r\n\tfor (Album album : albumCollection)\r\n\t{\r\n\t if (album.getAlbumArtist().equals(albumArtist))\r\n\t {\r\n\t\talbumsByArtist.add(album);\r\n\t }\r\n\t}\r\n\treturn albumsByArtist;\r\n }", "List<AlbumImage> selectByAlbum(Integer albumId);", "public List<Card> getCards()\n {\n return this.deckOfCards;\n }", "void displayFilteredAlbums();", "@Test\n public void getAlbumsTest() {\n Integer id = null;\n Integer userId = null;\n List<Album> response = api.getAlbums(id, userId);\n\n // TODO: test validations\n }", "public List<Car>getAllCars(){\r\n return (List<Car>) repository.findAll();\r\n }", "public ArrayList<String> getAllAlbumsOfArtist(Long songid) {\n\t\tString artistName = getArtistName(songid);\n\t\t// get all albums of this artist\n\t\tArrayList<String> albums = new ArrayList<>();\n\t\talbumsidOfArtist = new ArrayList<>();\n\n\t\ttry {\n\t\t\tString sqlQuery = \"select album_name, album_id from album where prod_name like '\" + artistName + \"';\";\n\n\t\t\tstatement = connection.createStatement();\n\t\t\tresultSet = statement.executeQuery(sqlQuery);\n\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tString al = (String) resultSet.getObject(1);\n\t\t\t\tLong alid = (Long) resultSet.getObject(2);\n\n\t\t\t\t// add to return album names and albumid in albumsidOfArtist list\n\t\t\t\talbums.add(al);\n\t\t\t\talbumsidOfArtist.add(alid);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn albums;\n\t}", "public Collection<Card> getCopyOfCardsList() {\n\t\treturn new ArrayList<>(cards);\n\t}", "@Override\n\tpublic List<AlbumResponse> getAlbums(String albumToGet) {\n\t\tlogger.info(\"inside getAlbums method in service\");\n\t\ttry {\n\t\t\tif (albumToGet != null) {\n\t\t\t\tlogger.info(\"album id provided: \" + albumToGet + \", fetching the unique entry\");\n\t\t\t\tLong albumToGetInLong = Long.parseLong(albumToGet);\n\t\t\t\tOptional<Album> album = albumRepository.findById(albumToGetInLong);\n\t\t\t\tif (album.isPresent()) {\n\t\t\t\t\tlogger.info(\"corresponding album found in database\");\n\t\t\t\t\tList<AlbumResponse> responses = AlbumService.convertAlbumEntityToResponseModel(album.get(),\n\t\t\t\t\t\t\tResponseMessageConstants.FETCH_SUCCESSFUL);\n\t\t\t\t\treturn responses;\n\t\t\t\t} else {\n\t\t\t\t\tlogger.error(\"corresponsding album not found in database\");\n\t\t\t\t\tList<AlbumResponse> responses = Arrays\n\t\t\t\t\t\t\t.asList(new AlbumResponse(albumToGet, \"\", null, ResponseMessageConstants.FETCH_UNSUCCESSFUL\n\t\t\t\t\t\t\t\t\t+ \", \" + ResponseMessageConstants.NON_EXISITNG_ID_ERROR));\n\t\t\t\t\treturn responses;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlogger.info(\"album id not provided, fetching all the entries\");\n\t\t\t\tList<Album> albumList = albumRepository.findAll();\n\t\t\t\talbumList.stream().forEach(e -> e.setComments(ResponseMessageConstants.FETCH_SUCCESSFUL));\n\t\t\t\tList<AlbumResponse> responses = AlbumService.convertAlbumEntityToResponseModel(albumList);\n\t\t\t\treturn responses;\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tlogger.error(\"exception while converting albumId from string to long\");\n\t\t\tList<AlbumResponse> responses = Arrays\n\t\t\t\t\t.asList(new AlbumResponse(albumToGet, \"\", null, ResponseMessageConstants.FETCH_UNSUCCESSFUL + \", \"\n\t\t\t\t\t\t\t+ ResponseMessageConstants.INCORRECT_ID_FORMAT_ERROR));\n\t\t\treturn responses;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\tList<AlbumResponse> responses = Arrays.asList(new AlbumResponse(albumToGet, \"\", null,\n\t\t\t\t\tResponseMessageConstants.FETCH_UNSUCCESSFUL + \", \" + ResponseMessageConstants.UNKNOWN_EXCEPTION));\n\t\t\treturn responses;\n\t\t}\n\t}", "public static List<Art> getArts() {\n try {\n List<Art> list = new ArrayList<>();\n Connection connection = Connector.getConnection();\n if (connection != null) {\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(\"SELECT * FROM Arts\");\n while (rs.next()) {\n // gets one art and adds it to list\n list.add(new Art(rs.getInt(\"artId\"), rs.getString(\"artTitle\"), \n rs.getString(\"artExtension\"), rs.getInt(\"creatorId\"), \n rs.getInt(\"categoryId\")));\n }\n }\n return list;\n } catch (SQLException e) {\n }\n return null;\n }", "private void prepareAlbums() {\n// int[] covers = new int[]{\n// R.drawable.album1,\n// R.drawable.album2,\n// R.drawable.album3,\n// R.drawable.album4,\n// R.drawable.album5,\n// R.drawable.album6,\n// R.drawable.album7,\n// R.drawable.album8,\n// R.drawable.album9,\n// R.drawable.album10,\n// R.drawable.album11,\n// R.drawable.album12,\n// R.drawable.album13};\n int [] covers = new int [ALBUM_SIZE];\n for (int i = 0; i < ALBUM_SIZE; i++){\n int temp = i + 1;\n covers[i] = getResources().getIdentifier(\"album\" + temp, \"drawable\", getPackageName() );\n }\n\n Album a = new Album(\"True Romance\", 13, covers[0]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[1]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[2]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[3]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[4]);\n albumList.add(a);\n\n a = new Album(\"I Need a Doctor\", 1, covers[5]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n a = new Album(\"Loud\", 11, covers[6]);\n albumList.add(a);\n\n a = new Album(\"Legend\", 14, covers[7]);\n albumList.add(a);\n\n a = new Album(\"Hello\", 11, covers[8]);\n albumList.add(a);\n\n a = new Album(\"Greatest Hits\", 17, covers[9]);\n albumList.add(a);\n\n a = new Album(\"Top Hits\", 17, covers[10]);\n albumList.add(a);\n\n a = new Album(\"King Hits\", 17, covers[11]);\n albumList.add(a);\n\n a = new Album(\"VIP Hits\", 17, covers[12]);\n albumList.add(a);\n\n a = new Album(\"True Romance\", 13, covers[13]);\n albumList.add(a);\n\n a = new Album(\"Xscpae\", 8, covers[14]);\n albumList.add(a);\n\n a = new Album(\"Maroon 5\", 11, covers[15]);\n albumList.add(a);\n\n a = new Album(\"Born to Die\", 12, covers[16]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[17]);\n albumList.add(a);\n\n // Special image (album19, album20 )has w x h smaller than normal image\n a = new Album(\"Honeymoon\", 14, covers[18]);\n albumList.add(a);\n\n a = new Album(\"Honeymoon\", 14, covers[19]);\n albumList.add(a);\n\n adapter.notifyDataSetChanged();\n }", "public AlbumAdapter(@NonNull Context context, ArrayList<Album> albums) {\n super(context, 0, albums);\n }", "private List<Card> createDeck(){\n List<Card> newDeck= new ArrayList<Card>();\n for (int i =0;i<CardSet.ALL_CARDS.size(); ++i ) {\n newDeck.add(CardSet.ALL_CARDS.get(i));\n }\n return newDeck;\n }", "public List<Album> findAlbumsByName(String name){\n\t\tList<Album> albums = new ArrayList<Album>();\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM Album WHERE Name LIKE ?;\";\n\t\t\tPreparedStatement statement = connection.prepareStatement(sql);\n\t\t\tstatement.setString(1, \"%\" + name + \"%\");\n\t\t\tResultSet set = statement.executeQuery();\n\t\t\tif (set.next()){\n\t\t\t\talbums.add(readAlbum(set));\n\t\t\t}\n\t\t\tstatement.close();\n\t\t\t//connection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn albums;\n\t}", "Response<List<Asset>> getAssets();", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "public List<Song> allSongs() {\n return songRepository.findAll();\n }", "@Override\r\n public int getItemCount() {\r\n return albumList.size();\r\n }", "public ArrayList<Item> getCardsByCategory(String category)\n {\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor res = db.rawQuery( \"SELECT * FROM \" + CARDS_TABLE_NAME +\n \" WHERE \" + CARDS_COLUMN_CATEGORY + \" LIKE '\" + category + \"' \" +\n \"ORDER BY \" + CARDS_COLUMN_NAME + \" COLLATE NOCASE\", null );\n res.moveToFirst();\n\n while(res.isAfterLast() == false){\n card = new Item();\n card.setItemId(res.getInt(res.getColumnIndex(CARDS_COLUMN_ID)));\n card.setItemName(res.getString(res.getColumnIndex(CARDS_COLUMN_NAME)));\n card.setItemCategory(res.getString(res.getColumnIndex(CARDS_COLUMN_CATEGORY)));\n card.setItemFormat(res.getString(res.getColumnIndex(CARDS_COLUMN_FORMAT)));\n card.setItemNumber(res.getString(res.getColumnIndex(CARDS_COLUMN_NUMBER)));\n items.add(card);\n res.moveToNext();\n }\n return items;\n }", "public void displayByAlbums()\n {\n Collections.sort(catalog);\n \n System.out.printf(\"%-39s %-30s %s %n\",\"ALBUM\", \"ARTIST\", \"TRACKS\"); \n for(Album a : catalog)\n System.out.println(a.toString(true)); //since true, albums are first. \n \n for(int i=0; i<30; i++)\n System.out.print(\"*\"); //line of asterisks\n System.out.print(\"\\n\\n\");\n }", "public ArrayList<Card> getPlayedCards()\n\t{\n\t\treturn playedCards;\n\t}", "public void getSongList() {\n\t\t// retrieve song info\n\t\tsongList = new ArrayList<Song>();\n\t\tContentResolver musicResolver = getContentResolver();\n\t\tUri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\n\t\tCursor musicCursor = musicResolver.query(musicUri, null, null, null,\n\t\t\t\tnull);\n\n\t\tif (musicCursor != null && musicCursor.moveToFirst()) {\n\t\t\t// get columns\n\t\t\tint titleColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media.TITLE);\n\t\t\tint idColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media._ID);\n\t\t\tint artistColumn = musicCursor\n\t\t\t\t\t.getColumnIndex(android.provider.MediaStore.Audio.Media.ARTIST);\n\t\t\t// add songs to list\n\t\t\tdo {\n\t\t\t\tlong thisId = musicCursor.getLong(idColumn);\n\t\t\t\tString thisTitle = musicCursor.getString(titleColumn);\n\t\t\t\tString thisArtist = musicCursor.getString(artistColumn);\n\t\t\t\tsongList.add(new Song(thisId, thisTitle, thisArtist));\n\t\t\t} while (musicCursor.moveToNext());\n\n\t\t\tmusicCursor.close();\n\t\t}\n\t}", "public Cards getCards() {\r\n\t\treturn cards;\r\n\t}", "@Test\n public void getAllAlbumsTest() throws InvalidResourceRequestException {\n loginAndSetupNewUser(username);\n\n // Add a new album, with the same name and description as the default album.\n Response response = apiClient.addAlbum(albumName, description);\n assertEquals(Response.Status.OK.getStatusCode(), response.getStatus());\n\n // Check server has record of both albums\n for(Album album : resolver.getAlbums(username)) {\n assertEquals(albumName, album.getAlbumName());\n assertEquals(description, album.getDescription());\n }\n }", "public ArrayList<Card> getHand(){\n return cards;\n }", "public List<CvchannelPack> findAllCvchannelPacks();", "@Override\n\tpublic ArrayList<Carpo> getAllCars() {\n\t\treturn inList.getAll();\n\t}", "public ArrayList<HouseCards> getHouseCardDeck(){\n\t\treturn houseCardDeck;\n\t}", "public ArrayList<card> displayPack()\n {\n dbObj=new dbFlashCards(uid);\n return dbObj.fetchAllCards(packId);\n \n \n \n }", "List<Album> getAlbumFromArtiste(Integer artisteId, Integer userId);", "@Override\n\tpublic List<CreditCard> getAll(){\n\t\t\n\t\treturn creditCardDao.findAll();\n\t}", "public List<CardImage> readAll() {\n List<CardImage> cards = new ArrayList<CardImage>();\n for (String colour : this.colours) {\n for (String number : this.numbers) {\n for (String darkLight : this.darkLight) {\n cards\n .add(\n new CardImage(colour, number, darkLight,\n new Image(getClass().getResource(\n \"cards/\" + colour + seperator + number + seperator + darkLight + \".png\")\n .toExternalForm())));\n }\n }\n }\n return cards;\n }", "List<CompositionSpaceToDraftAssociation> getAll() throws OXException;", "@Query(\"SELECT * FROM FlashCards\")\n List<FlashCards> getCards();", "public List<Card> getCardsInPlay() {\n List<Card> cards = new ArrayList<>(cardsInPlayStack);\n cardsInPlayStack.removeAllElements();\n return cards;\n }", "public RealmResults<PhotoGalleryModel> getPhotos( ) {\n return realm.where(PhotoGalleryModel.class).findAll();\n\n }", "public ResultSet getAlbumsByPerson(int person_id) throws SQLException {\n\t\tquery = \"SELECT a.*, p.name as artist FROM album a \"\n\t\t\t\t+ \"LEFT OUTER JOIN person p ON a.artist_id=p.id \"\n\t\t\t\t+ \"WHERE p.id=\" + person_id + \" ORDER BY a.name\";\n\t\treturn stmt.executeQuery(query);\n\t}", "public List<Cvpack> findAllCvpacks();", "private void prepareAlbums() {\n\n Album a;\n\n for(HashMap.Entry<String,ArrayList<String>> entry : Test.subcatList.get(name).entrySet()){\n key = entry.getKey();\n value = entry.getValue();\n a = new Album(key , value.get(2));\n albumList.add(a);\n System.out.println(\"dddd : \" + key + \" \" + value.get(2));\n }\n\n adapter.notifyDataSetChanged();\n\n }", "@GET\n public Iterator<Album> searchByName(@QueryParam(\"name\") String name) {\n return null;\n }", "public List<Book> getAllBooks()\n {\n List<Book> books = new LinkedList<Book>();\n\n //1. Query para la consulta\n String query = \"Select * FROM \"+ BookReaderContract.FeedBook.TABLE_NAME;\n\n //2. Obtener la referencia a la DB\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(query, null);\n\n //3. Recorrer el resultado y crear un objeto Book\n Book book = null;\n if(cursor.moveToFirst()){\n do{\n book = new Book();\n book.setId(Integer.parseInt(cursor.getString(0)));\n book.setTitle(cursor.getString(1));\n book.setAuthor(cursor.getString(2));\n books.add(book);\n }while(cursor.moveToNext());\n }\n Log.d(\"getAllBooks\",books.toString());\n return books;\n }", "@GetMapping(\"/cards\")\n List<StarbucksCard> all() {\n return repository.findAll();\n }", "@Override\r\n\tpublic void listAlbums() {\n\t\tString AlbumNames=\"\";\r\n\t\tList<IAlbum> album1=model.getUser(userId).getAlbums();\r\n\t\tif(album1.size()==0){\r\n\t\t\tString error=\"No albums exist for user \"+userId+\"\";\r\n\t\t\tsetErrorMessage(error);\r\n\t\t\tshowError();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tIAlbum temp=album1.get(0);\r\n\t\t\r\n\t\tfor(int i=0; i<album1.size(); i++){\r\n\t\t\ttemp=album1.get(i);\r\n\t\t\t/*accessing the photo list now*/\r\n\t\t\tList<IPhoto> photoList=temp.getPhotoList();\r\n\t\t\tif(photoList.size()==0){\r\n\t\t\t\tAlbumNames=AlbumNames+\"\"+album1.get(i).getAlbumName()+\" number of photos: 0\\n\";\r\n\t\t\t}\r\n\t\t\t/*Let's compare*/\r\n\t\t\telse{Date lowest=photoList.get(0).getDate();\r\n\t\t\tDate highest=photoList.get(0).getDate();\r\n\t\t\tfor(int j=0;j<photoList.size();j++){\r\n\t\t\t\tif(photoList.get(j).getDate().before(lowest)){\r\n\t\t\t\t\tlowest=photoList.get(j).getDate();\r\n\t\t\t\t}\r\n\t\t\t\tif(photoList.get(j).getDate().after(highest)){\r\n\t\t\t\t\thighest=photoList.get(j).getDate();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/**/\r\n\t\t\tif(i==album1.size()-1){\r\n\t\t\t\t/*Do I even need this?*/\r\n\t\t\t\tAlbumNames=AlbumNames+\"\"+album1.get(i).getAlbumName()+\" number of photos: \"+album1.get(i).getAlbumSize()+\", \"+lowest+\" - \"+highest+\"\";\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tAlbumNames=AlbumNames+\"\"+album1.get(i).getAlbumName()+\" number of photos: \"+album1.get(i).getAlbumSize()+\", \"+lowest+\" - \"+highest+\"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\tsetErrorMessage(AlbumNames);\r\n\t\tshowError();\r\n\t\t\r\n\r\n\t}", "public Card getAllCards() {\n\t\tfor (Card cardInDeck : cards) {\n\t\t\tSystem.out.println(\"Rank: \" + cardInDeck.getRank() + \"\\n\"\n\t\t\t\t\t+ \"Suit: \" + cardInDeck.getSuit()+ \"\\n\");\n\t\t\t//System.out.println(i++);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic Cards getCards() {\n\t\treturn cards;\n\t}", "ObservableList<Flashcard> getFlashcardList();", "public int[] getCards() {\n \t\treturn cards;\n \t}", "private static ArrayList<Song> createSongs(ResultSet resultSet) throws Exception{\n ArrayList<Song> songs = new ArrayList<>();\n\n while(resultSet.next()) {\n String id = resultSet.getString(\"id\");\n String name = resultSet.getString(\"name\");\n int duration = resultSet.getInt(\"duration\");\n String image = resultSet.getString(\"image\");\n String artistName = getArtist(id);\n String albumName = getAlbum(id);\n ArrayList<String> genre = getGenre(id);\n Song song = new Song(id, name, artistName, albumName, genre, duration, image);\n songs.add(song);\n }\n return songs;\n }", "public List<Bank> findAll() {\n return em.createQuery(\"SELECT b FROM Bank b\").getResultList();\n }", "public ArrayList<PlayingCard> getHand();", "public static MyAlbumList getInstance(Context ctx) throws IOException {\n if (albumList == null) {\n albumList = new MyAlbumList();\n albumList.context = ctx;\n albumList.load();\n }\n return albumList;\n }", "@Override\r\n public String toString()\r\n {\n\tString strAlbums = \"\";\r\n\r\n\t// create a string containing all albums\r\n\tfor (Album album : albumCollection)\r\n\t{\r\n\t strAlbums += album.toString() + \"\\r\\n\";\r\n\t}\r\n\r\n\treturn strAlbums;\r\n }", "public Color[] getCards() {\n\t\treturn cards;\n\t}", "List<MediaMetadata> getAll();", "@Override\n\tpublic List<Car> list() {\n\t\treturn carMapper.list1();\n\t}", "public List<Corona> findAll() {\n return coronaRepository.findAll();\n }", "public ReactorResult<java.lang.String> getAllAlbumTitle_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ALBUMTITLE, java.lang.String.class);\r\n\t}", "public Card[] GetCards() { return mCard; }", "public List<Card> getVegasDeckCardList(){\n return vegasDeckCardList;\n }", "public List<Pic> list() {\n\t\treturn picDao.list();\n\t}", "@Override\n\tpublic ArrayList<Carpo> showAllCars() {\n\t\treturn inList.showAll();\n\t}" ]
[ "0.7291715", "0.688091", "0.6695881", "0.66000754", "0.6347032", "0.6315193", "0.6240534", "0.62130463", "0.61830455", "0.61335427", "0.60493934", "0.60145557", "0.59966946", "0.5983048", "0.5948298", "0.59201026", "0.589361", "0.5852731", "0.58335334", "0.58050656", "0.579951", "0.57840323", "0.5771937", "0.5766412", "0.57629335", "0.57568485", "0.5746875", "0.5738145", "0.5737236", "0.5684848", "0.566127", "0.5642657", "0.56373537", "0.5612149", "0.5574728", "0.5542746", "0.54747003", "0.5472339", "0.5459167", "0.5447747", "0.54452723", "0.5425425", "0.54226005", "0.54112583", "0.53798926", "0.5352138", "0.53510743", "0.53309035", "0.5298315", "0.52693176", "0.5262857", "0.5254705", "0.52392375", "0.52306974", "0.5212124", "0.520753", "0.5201274", "0.51899695", "0.5187272", "0.5180325", "0.5177559", "0.5168789", "0.5151186", "0.51435673", "0.5137197", "0.5136636", "0.51286507", "0.5123412", "0.5122032", "0.510805", "0.5099167", "0.50988024", "0.5089641", "0.50813997", "0.5080611", "0.5075481", "0.50729024", "0.50506526", "0.5048613", "0.50441575", "0.504176", "0.5041319", "0.50349295", "0.5033901", "0.5031285", "0.5025891", "0.5023493", "0.50233936", "0.5019491", "0.50190794", "0.50108445", "0.4999544", "0.49963325", "0.4988773", "0.4986005", "0.49846512", "0.49816996", "0.49699038", "0.49615556", "0.49523565" ]
0.57489336
26
Initializes the new instance using the given parameters. Progress dialog will be displayed by default when grid is created.
public NewGridFormatActionCommand(FormatType formatType, ODOMSelectionManager selectionManager) { super(formatType, selectionManager); this.displayProgress = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public View()\r\n\t{\r\n\t\tsetGUI();\r\n\t\tfinal Multithreading m = new Multithreading(this);\t\r\n\t\t\r\n\t\t/**\r\n\t\t * Anonymous Timer class for updating progress bars.\r\n\t\t * @param DELAY the system delay for time in milliseconds \r\n\t\t * @param ActionListener the ActionListener object\r\n\t\t */\r\n\t\tTimer Timer = new Timer(DELAY, new ActionListener()\r\n\t\t{\r\n\t\t\t/**\r\n\t\t\t * Implemented method for ActionListener\r\n\t\t\t * @param event the event occuring\r\n\t\t\t */\r\n\t\t\tpublic void actionPerformed(ActionEvent event)\r\n\t\t\t{\r\n\t\t\t\tbProgress = m.getbProgress();\r\n\t\t\t\tiProgress = m.getiProgress();\r\n\t\t\t\tmProgress = m.getmProgress();\r\n\t\t\t\tqProgress = m.getqProgress();\r\n\t\t\t\trProgress = m.getrProgress();\r\n\t\t\t\tbubblePB.setValue(bProgress);\r\n\t\t\t\tinsertionPB.setValue(iProgress);\r\n\t\t\t\tmergePB.setValue(mProgress);\r\n\t\t\t\tquickPB.setValue(qProgress);\r\n\t\t\t\tradixPB.setValue(rProgress);\r\n\t\t\t}\t\r\n\t\t});\r\n\t\tTimer.start();\r\n\t}", "private void initProgress()\n {\n\n if (showProgressBar && progressBar == null)\n { // there's an issue if called from matlab of getting the progress frame\n // in matlab's event loop so we can't just create a new one here\n progressBar = new Progress();\n }\n if (progressBar != null)\n {\n progressBar.setChanName(channelName);\n progressBar.setWorkingOn(\"Initializing\");\n progressBar.setEstTime(\"Time remaining: unknown\");\n progressBar.setProgress(-1);\n progressBar.setPosition();\n }\n }", "private void init() {\r\n\r\n createGUI();\r\n\r\n setSize(new Dimension(600, 600));\r\n setTitle(\"Grid - Regular Grid Renderer\");\r\n }", "public Project_Create_Process() {\n initComponents();\n }", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "public Grid() {\n }", "public JDialogParticleAnalysisNew() { }", "public ReportUi() {\n initComponents();\n }", "public void initProgressLoader() {\n progressDialog = new ProgressDialog(this);\n progressDialog.setIndeterminate(true);\n progressDialog.setCancelable(false);\n }", "public Project_Create() {\n initComponents();\n }", "ReportGenerationPanel() {\n initComponents();\n reportPanel.setLayout(new GridBagLayout());\n constraints = new GridBagConstraints();\n constraints.fill = GridBagConstraints.BOTH;\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1.0;\n glue = Box.createVerticalGlue();\n progressPanel = new ReportProgressPanel();\n }", "public GUIView() {\n initComponents();\n setMaxThreads();\n setCountOfElements(1);\n setCountOfThreads(1);\n this.isReadyForCalculation = false;\n }", "public project() {\n\n initComponents();\n }", "public RegularGrid() {\r\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t progressDialog = new AutoTuningInitDialog(mChannelActivity, R.style.dialog);\n\t\t\tprogressDialog.show();\t\t\n\t\t\tsuper.onPreExecute();\n\t\t}", "public ConfEGTaskPanel() {\n initComponents();\n initListenerButton(); \n initState();\n initApplyCellCheckBox();\n }", "public JPClassManager() {\n initComponents();\n\n setVisible(false);\n setBounds(0, 0, MainFrame.jPanelContent.getSize().width + 105, MainFrame.jPanelContent.getSize().height);\n\n jTableClass.setRowHeight(30);\n jTableClass.setShowGrid(true);\n jTableClass.setGridColor(new Color(102, 102, 102));\n\n fillData();\n }", "public createclass() {\n initComponents();\n this.setLocationRelativeTo(null);\n getdata();\n }", "public void initialize() {\n\t\tint consumerCount = 9, max_integer = 10;\r\n\t\tisValidInputs = true;\r\n\t\t\r\n\t\t// Init inputs\r\n\t\tinput_threads.setText(String.valueOf(consumerCount));\r\n\t\tinput_max_num.setText(String.valueOf(max_integer));\r\n\t\tbtn_stop.setDisable(true);\r\n\t\t\r\n\t\tJFXDialogLayout content = new JFXDialogLayout();\r\n\t\tcontent.setHeading(new Text(\"Introdução\"));\r\n\t\tcontent.setBody(new Text(\"\\n Após configurar os parâmetros disponíveis do lado esquerdo,\" +\r\n\t\t\t\t\t\t\t\t \"\\n clique em START para começar a simulação.\\n\" + \r\n\t\t\t\t\t\t\t\t \"\\n Cada bloco representa uma thread, o qual mostra o número\" +\r\n\t\t\t\t\t\t\t\t \"\\n que está sendo processado pela única thread ativa, visto que\" +\r\n\t\t\t\t\t\t\t\t \"\\n cada thread compete pelo 'lock' do monitor. \\n\"));\r\n\t\t\r\n\t\tJFXDialog dialog = new JFXDialog(dialog_pane, content, JFXDialog.DialogTransition.CENTER);\r\n\t\tJFXButton btn_dialog = new JFXButton(\"OK\");\r\n\t\tbtn_dialog.setCursor(Cursor.HAND);\r\n\t\tbtn_dialog.setOnAction(new EventHandler<ActionEvent>(){\r\n\t\t @Override\r\n\t\t public void handle(ActionEvent event){\r\n\t\t dialog.close();\r\n\t\t }\r\n\t\t});\r\n\t\tcontent.setActions(btn_dialog);\r\n\t\tdialog.show();\r\n\t\t\r\n\t\t// Start Button\r\n\t\tbtn_start.setOnAction((event) -> {\r\n\t\t\t\r\n\t\t\tif(Integer.parseInt(input_threads.getText()) > 64 || Integer.parseInt(input_threads.getText()) < 1) {\r\n\t\t\t\tisValidInputs = false;\r\n\t\t\t\tinput_threads.setFocusColor(Color.RED);\r\n\t\t\t\tinput_threads.requestFocus();\r\n\t\t\t} else if(Integer.parseInt(input_max_num.getText()) > 1000 || Integer.parseInt(input_max_num.getText()) < 1) {\r\n\t\t\t\tisValidInputs = false;\r\n\t\t\t\tinput_max_num.setFocusColor(Color.RED);\r\n\t\t\t\tinput_max_num.requestFocus();\r\n\t\t\t} else {\r\n\t\t\t\tisValidInputs = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(isValidInputs) {\r\n\t\t\t\tinitWindow();\r\n\t\t\t\tbtn_start.setDisable(true);\r\n\t\t\t\tbtn_stop.setDisable(false);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public NewEntryWizard()\n {\n setNeedsProgressMonitor( true );\n }", "public SalesReportView() {\n initComponents();\n }", "void initializeView() {\n displayProjectFilter();\n displayTimeFrameFilter();\n\n setUsersIntoComboBox();\n setClientsIntoComboBox();\n setProjectsIntoComboBox();\n setDateRestrictions();\n setValidators();\n setTable();\n\n selectUser();\n selectClient();\n selectProject();\n listenDatePickerStart();\n listenDatePickerEnd();\n\n removeUserFilter();\n removeProjectFilter();\n removeTimeFrameFilter();\n clearAllFilters();\n\n // this is important for hiding user combo box and stuff\n setUpUserRules();\n\n //vBox.translateXProperty().bind((scrollPane.widthProperty().subtract(vBox.widthProperty())).divide(2));\n scrollPane.widthProperty().addListener((observable, oldValue, newValue) -> {\n if (newValue != null) {\n grid.setPrefWidth(newValue.doubleValue() - (oldValue.doubleValue() - scrollPane.getViewportBounds().getWidth()));\n }\n });\n\n //TODO: Refactor this.\n setUpBarChart();\n tbvTasks.getItems().addListener((ListChangeListener.Change<? extends TaskConcrete2> c) -> {\n setUpBarChart();\n });\n\n setToolTipsForButtons();\n changeTableSize();\n }", "private void creatDialog() {\n \t mDialog=new ProgressDialog(this);\n \t mDialog.setTitle(\"\");\n \t mDialog.setMessage(\"正在加载请稍后\");\n \t mDialog.setIndeterminate(true);\n \t mDialog.setCancelable(true);\n \t mDialog.show();\n \n\t}", "public ParamToolGui(ParameterSet mms_params) {\n initComponents();\n jTable1.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n jTable1.setRowSelectionAllowed(false);\n jTable1.setCellSelectionEnabled(true);\n ExcelAdapter myAd = new ExcelAdapter(jTable1);\n\n paramTree.setModel(null);\n loadParameterSet(mms_params);\n \n persistentSplitterTracker = new PersistentSplitterTracker(this, jSplitPane1);\n }", "public MediBill() {\n initComponents();\n loadData();\n setLocationRelativeTo(null);\n }", "public InformationResultPanel() {\n initComponents();\n }", "public Allocation() {\n initComponents();\n }", "public void init() {\n\t\t\n\t\tint padding = displayUtils.getDIP(4);\n\t\t\n\t\tListView.LayoutParams masterParams = new ListView.LayoutParams(ListView.LayoutParams.FILL_PARENT, displayUtils.getDIP(48));\n\t\t\n\t\tsetBackgroundColor(colors.getColor(Colors.LOADING_ITEM_BG));\n\t\t\n\t\tsetLayoutParams(masterParams);\n\t\tsetOrientation(HORIZONTAL);\n\t\t\n\t\tProgressBar progress = new ProgressBar(getContext(), null, android.R.attr.progressBarStyleSmall);\n\t\tprogress.setPadding(padding, padding, padding, padding);\n\t\t\n\t\tTextView text = new TextView(getContext());\n\t\ttext.setTextColor(Color.GRAY);\n\t\ttext.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);\n\t\ttext.setText(\"Loading...\");\n\t\ttext.setPadding(0, padding, padding, padding);\n\t\t\n\t\tLayoutParams progressLayoutParams = new LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tprogressLayoutParams.gravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL;\n\t\tprogressLayoutParams.weight = 0.0f;\n\t\t\n\t\tLayoutParams textParams = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);\n\t\ttextParams.gravity = Gravity.LEFT | Gravity.CENTER_VERTICAL;\n\t\ttextParams.weight = 1.0f;\n\t\ttextParams.setMargins(0, 0, 0, 0);\n\t\t\n\t\tsetLayoutParams(masterParams);\n\t\tprogress.setLayoutParams(progressLayoutParams);\n\t\ttext.setLayoutParams(textParams);\n\t\ttext.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);\n\t\t\n\t\taddView(progress);\n\t\taddView(text);\t\t\n\t}", "public Datamanagement() {\n initComponents();\n }", "public Reportes() {\n initComponents();\n }", "public VisualizarLlamada() {\n initComponents();\n }", "public void initialize() {\n // create pieChart\n chart = new PieChart(pieChartData);\n chart.setTranslateX(-80);\n chart.setTranslateY(20);\n chart.setLegendVisible(false);\n // adjust boxes\n vBoxDesc.setTranslateX(-80);\n vBoxNumbers.setTranslateX(-80);\n // reset labels\n resetLabels();\n // reset Drop Down Boxes\n resetComboBoxes();\n // init waitAlert\n waitAlert = new Alert(Alert.AlertType.NONE);\n waitAlert.initStyle(StageStyle.UNDECORATED);\n waitAlert.initModality(Modality.APPLICATION_MODAL);\n }", "public ReportPane() {\n initComponents();\n }", "public Reports() {\n initComponents();\n }", "public Reports() {\n initComponents();\n }", "public Reports() {\n initComponents();\n }", "public ControlPanel(TileGrid grid){\n\t\tsetSize(WIDTH, HEIGHT);\n\t\t\n\t\t/*itrLabel = new JLabel(\"Number of iterations to run:\");\n\t\tadd(itrLabel);\n\t\titerations = new JTextField(\"50\", 5);\n\t\tadd(iterations);*/\n\t\t\n\t\tstart = new JButton(\"Start game\");\n\t\tstart.addActionListener(this);\n\t\tadd(start);\n\t\treset = new JButton(\"Reset\");\n\t\treset.addActionListener(this);\n\t\tadd(reset);\n\t\tresume = new JButton(\"Resume\");\n\t\tresume.addActionListener(this);\n\t\tadd(resume);\n\t\tstop = new JButton(\"Stop\");\n\t\tstop.addActionListener(this);\n\t\tadd(stop);\n\t\t\n\t\tpresetLabel = new JLabel(\"Preset configurations:\");\n\t\tadd(presetLabel);\n\t\tString[] presetList = {\"Select a preset\", \"Glider\", \"Small Explosion\", \"Gosper Glider Gun\"};\n\t\tpresets = new JComboBox<String>(presetList);\n\t\tpresets.addItemListener(this);\n\t\tadd(presets);\n\t\t\n\t\tthis.grid = grid;\n\t}", "public InvoiceCreate() {\n initComponents();\n }", "public void init() {\n initComponents();\n initData();\n }", "public ProgressMonitor() {\r\n\tif (logger.isDebugEnabled())\r\n\t logger.debug(\"Creating Progress Monitor\");\r\n }", "private void init() {\n List<Contructor> list = servisContructor.getAllContructors();\n for (Contructor prod : list) {\n contructor.add(new ContructorViewer(prod));\n }\n\n Label label = new Label(\"Catalog Contructors\");\n label.setLayoutX(140);\n label.setLayoutY(20);\n label.setStyle(\"-fx-font-size:20px\");\n\n initTable();\n table.setLayoutX(120);\n table.setLayoutY(60);\n table.setStyle(\"-fx-font-size:16px\");\n\n GridPane control = new ControlPanel(this, 2).getPanel();\n control.setLayoutX(120);\n control.setLayoutY(300);\n\n panel.setAlignment(Pos.CENTER);\n panel.add(label, 0, 0);\n panel.add(table, 0, 1);\n panel.add(control, 0, 2);\n }", "public ProcessWorkRequestJPanel() {\n initComponents();\n }", "public DeviceProgressPanel() {\n super();\n\n this.mdlCtrlr = new ProgTableController();\n this.tblDacqStatus = new JTable( this.mdlCtrlr );\n this.paneTblScrollr = new JScrollPane( this.tblDacqStatus );\n \n this.txtDaqStatus = new JTextField();\n\n// this.setViewportView( this.tblDacqStatus );\n this.buildViewPane();\n }", "private void initialize() {\r\n\t\tGridBagConstraints gridBagConstraints1 = new GridBagConstraints();\r\n\t\tgridBagConstraints1.gridx = 0;\r\n\t\tgridBagConstraints1.gridy = 1;\r\n\t\tlaunchSubLabel = new JLabel();\r\n\t\tlaunchSubLabel.setText(Message.getMessage(\"reportmaker.process.sublabel\"));\r\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\t\tgridBagConstraints.gridx = 0;\r\n\t\tgridBagConstraints.gridy = 0;\r\n\t\tthis.setSize(800, 400);\r\n\t\tthis.setLayout(new GridBagLayout());\r\n\t\tthis.setPreferredSize(new Dimension(800, 400));\r\n\t\tthis.setBackground(Color.white);\r\n\t\tthis.add(getLaunchButton(), gridBagConstraints);\r\n\r\n\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\r\n\t\tgridBagConstraints2.insets = new Insets(50, 0, 0, 0);\r\n\t\tgridBagConstraints2.gridx = 0;\r\n\t\tgridBagConstraints2.gridy = 2;\r\n\t\tthis.add(getViewButton(), gridBagConstraints2);\r\n\t\tthis.add(launchSubLabel, gridBagConstraints1);\r\n\t}", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n runOnUiThread(()->{\n pDialog = new ProgressDialog(ImageClassificationActivity.this);\n pDialog.setMessage(\"Initializing\");\n pDialog.setIndeterminate(false);\n pDialog.setMax(100);\n pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n pDialog.setCancelable(true);\n pDialog.setOnCancelListener(this);\n pDialog.show();\n });\n }", "private void statInit() {\n\t\t//\t\n\t\tif (getAD_Process_ID() > 0) {\n\t\t\t//\tFR [ 245 ]\n\t\t\tinitProcessInfo();\n\t\t\tprocessParameterPanel = new ProcessPanel(getWindowNo(), getBrowseProcessInfo());\n\t\t\tprocessParameterPanel.setColumns(ProcessController.COLUMNS_2);\n\t\t\tprocessParameterPanel.setShowButtons(false);\n\t\t\tprocessParameterPanel.setShowDescription(false);\n\t\t\tprocessParameterPanel.createFieldsAndEditors();\n\t\t\t//\tIf don't have parameters then don'show collapsible panel\n\t\t\tif(processParameterPanel.hasParameters()) {\n\t\t\t\t//\tAdd collapsible panel for process pane;\n\t\t\t\tCollapsiblePanel collapsibleProcess = new CollapsiblePanel(Msg.getMsg(Env.getCtx(),(\"Parameter\")));\n\t\t\t\tcollapsibleProcess.add(processParameterPanel.getPanel());\n\t\t\t\tcollapsibleProcess.validate();\n\t\t\t\tprocessPanel.add(collapsibleProcess);\n\t\t\t}\n\t\t}\n\t}", "public SimulationView() {\n initComponents();\n }", "public void init(){\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSwingUtilities.invokeAndWait(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tbuildWindow();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(\"createGUI didn't complete successfully\");\r\n\t\t}\r\n\t}", "public resultview() {\n initComponents();\n }", "protected void init() {\n super.init();\n prefetchCount.setPreferredSize(new Dimension(100,25));\n useTx.setPreferredSize(new Dimension(100,25));\n\n mainPanel.add(receiveTimeout);\n mainPanel.add(prefetchCount);\n mainPanel.add(purgeQueue);\n mainPanel.add(autoAck);\n mainPanel.add(readResponse);\n mainPanel.add(useTx);\n }", "private void init(){\n Slider.init(new PicassoImageLoadingService());\n restaurantApi = RetrofitClient.getInstance(Common.API_RESTAURANT_ENDPOINT).create(RestaurantApi.class);\n dialog = new Dialog(this);\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n ROW = grid.getRowConstraints().size();\n COL = grid.getColumnConstraints().size();\n // Get the Client From ConnectionController\n client = getClientFromConnectionController();\n // Add circle to GridPane\n addCircleToGrid();\n addHandlerForQuitBtn();\n addHandlerForResetBtn();\n }", "public GUI() {\n initComponents();\n }", "public GUI() {\n initComponents();\n }", "public Avontool() {\n initComponents();\n }", "private void initDialog() {\n }", "public quotaGUI() {\n initComponents();\n }", "public ViewInvoicesGUI() {\n initComponents();\n updateDatabase();\n this.setLocationRelativeTo(null);\n \n }", "public PHConstDialog() {\n\t\tinitComponents();\n\t}", "public ParamPanel() {\n this.paramService = new ParamService();\n initComponents();\n doQuery();\n }", "public AjaxIndexProgressMonitor(ProgressQueue queue) {\r\n this(50, queue);\r\n }", "public Prof_Report() {\r\n initComponents();\r\n }", "@Override\n public void initialize() {\n sectionsPanel.removeAll();\n \n section1 = new ProgressReportSectionSettingPanel(this);\n section2 = new ProgressReportSectionSettingPanel(this);\n section3 = new ProgressReportSectionSettingPanel(this);\n section4 = new ProgressReportSectionSettingPanel(this);\n addSectionElement(0,section1);\n addSectionElement(1,section2);\n addSectionElement(2,section3);\n addSectionElement(3,section4);\n \n refresh();\n }", "public Dashboard() {\n initComponents();\n// initComponents();\n build_GUI();\n }", "public BuscarProvedor() {\n initComponents();\n }", "public CadastroProdutoNew() {\n initComponents();\n }", "public NumberProgressBar(Context context) {\n// super(context);\n this(context, null);\n }", "public FrmBillDisplay() {\n initComponents();\n }", "public BBDJPAAdminGUI() {\n initComponents();\n\n myInit();\n }", "public Visualizador() {\n initComponents();\n inicializar();\n }", "public Reportes() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public StandardDialog() {\n super();\n init();\n }", "public GraficaEstatus() {\n initComponents();\n }", "public DatabaseGUI() {\n initComponents();\n refreshDatabaseTables();\n\n }", "public GUI() {\n\t\tinitComponents();\n\t}", "public Transfer() {\n initComponents();\n }", "private void statInit() throws Exception\n \t{\n \t\tlDocumentNo.setLabelFor(fDocumentNo);\n \t\tfDocumentNo.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfDocumentNo.addActionListener(this);\n // Begin Marcos Zúñiga\n lRoutingNo.setLabelFor(fRoutingNo);\n fRoutingNo.setBackground(AdempierePLAF.getInfoBackground());\n fRoutingNo.addActionListener(this);\n lCheckNo.setLabelFor(fCheckNo);\n fCheckNo.setBackground(AdempierePLAF.getInfoBackground());\n fCheckNo.addActionListener(this);\n // End Marcos Zúñiga\n \t\tfIsReceipt.setSelected(!\"N\".equals(Env.getContext(Env.getCtx(), p_WindowNo, \"IsSOTrx\")));\n \t\tfIsReceipt.addActionListener(this);\n // Begin Marcos Zúñiga\n \t\tlA_Name.setLabelFor(fA_Name);\n \t\tfA_Name.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfA_Name.addActionListener(this);\n // End Marcos Zúñiga\n \t\tlDateFrom.setLabelFor(fDateFrom);\n \t\tfDateFrom.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfDateFrom.setToolTipText(Msg.translate(Env.getCtx(), \"DateFrom\"));\n \t\tlDateTo.setLabelFor(fDateTo);\n \t\tfDateTo.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfDateTo.setToolTipText(Msg.translate(Env.getCtx(), \"DateTo\"));\n \t\tlAmtFrom.setLabelFor(fAmtFrom);\n \t\tfAmtFrom.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfAmtFrom.setToolTipText(Msg.translate(Env.getCtx(), \"AmtFrom\"));\n \t\tlAmtTo.setLabelFor(fAmtTo);\n \t\tfAmtTo.setBackground(AdempierePLAF.getInfoBackground());\n \t\tfAmtTo.setToolTipText(Msg.translate(Env.getCtx(), \"AmtTo\"));\n \t\t//\n \t\tparameterPanel.setLayout(new ALayout());\n \t\t// First Row\n \t\tparameterPanel.add(lDocumentNo, new ALayoutConstraint(0,0));\n \t\tparameterPanel.add(fDocumentNo, null);\n \t\tparameterPanel.add(lA_Name, null); // Marcos Zúñiga\n \t\tparameterPanel.add(fA_Name, null); // Marcos Zúñiga\n \t\tparameterPanel.add(fIsReceipt, new ALayoutConstraint(0,5));\n \t\t// 2nd Row\n parameterPanel.add(lRoutingNo, new ALayoutConstraint(1,0)); // Marcos Zúñiga\n parameterPanel.add(fRoutingNo, null); // Marcos Zúñiga\n \t\tparameterPanel.add(lDateFrom, new ALayoutConstraint(1,2));\n \t\tparameterPanel.add(fDateFrom, null);\n \t\tparameterPanel.add(lDateTo, null);\n \t\tparameterPanel.add(fDateTo, null);\n \t\t// 3rd Row\n parameterPanel.add(lCheckNo, new ALayoutConstraint(2,0)); // Marcos Zúñiga\n parameterPanel.add(fCheckNo, null); // Marcos Zúñiga\n \t\tparameterPanel.add(lAmtFrom, new ALayoutConstraint(2,2));\n \t\tparameterPanel.add(fAmtFrom, null);\n \t\tparameterPanel.add(lAmtTo, null);\n \t\tparameterPanel.add(fAmtTo, null);\n \t//\tparameterPanel.add(lOrg_ID, null);\n \t//\tparameterPanel.add(fOrg_ID, null);\n \t\tfIsReceipt.setEnabled(false);\n \t}", "public Gui( final Persistence p ){\r\n\r\n\t\tfinal JFrame frame = new JFrame();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t//final Popups pu = new Popups();\r\n\r\n\t\t// Temporarily holds the row results\r\n\t\tObject[] tempRow;\r\n\r\n\t\tIterator<Ordem> ordens = p.getOrdens().iterator();\r\n\r\n\t\twhile(ordens.hasNext()){\r\n\t\t\tOrdem o = ordens.next();\r\n\t\t\ttempRow = new Object[]{o.getIdOrdem(), o.getIdFuncionario(), o.getIdCliente(),\r\n\t\t\t\t\to.getDescOrigem(), o.getDescdestino(), o.getDataPedido(), o.getVolume()};\r\n\r\n\t\t\tdTableModel.addRow(tempRow);\r\n\t\t\tpo.adicionarOrdem(o);\r\n\t\t}\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//DEFINING JTABLE PERFS \r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t// Increase the font size for the cells in the table\r\n\t\ttable.setFont(new Font(\"Serif\", Font.PLAIN, 18));\r\n\r\n\t\t// Increase the size of the cells to allow for bigger fonts\r\n\t\ttable.setRowHeight(table.getRowHeight()+12);\r\n\r\n\t\t//set columns width\r\n\t\ttable.getColumnModel().getColumn(0).setMinWidth(60);\r\n\t\ttable.getColumnModel().getColumn(0).setMaxWidth(80);\r\n\t\ttable.getColumnModel().getColumn(1).setMinWidth(100);\r\n\t\ttable.getColumnModel().getColumn(1).setMaxWidth(120);\r\n\t\ttable.getColumnModel().getColumn(2).setMinWidth(100);\r\n\t\ttable.getColumnModel().getColumn(2).setMaxWidth(120);\r\n\t\ttable.getColumnModel().getColumn(5).setMinWidth(100);\r\n\t\ttable.getColumnModel().getColumn(5).setMaxWidth(120);\r\n\t\ttable.getColumnModel().getColumn(6).setMinWidth(30);\r\n\t\ttable.getColumnModel().getColumn(6).setMaxWidth(60);\r\n\r\n\t\ttable.setShowGrid(true);\r\n\t\tColor color = new Color(200,200,200);\r\n\t\ttable.setGridColor(color);\r\n\r\n\t\t// Allows the user to sort the data\r\n\t\ttable.setAutoCreateRowSorter(true);\r\n\r\n\t\t// Adds the table to a scrollpane\r\n\t\tJScrollPane scrollPane = new JScrollPane(table);\r\n\r\n\t\t// Adds the scrollpane to the frame\r\n\t\tframe.add(scrollPane, BorderLayout.CENTER);\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//END DEFINING JTABLE PERFS\r\n\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//ADDING TO ORDER AND PERSISTENCE\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t// Creates a button that when pressed executes the code\r\n\t\t// in the method actionPerformed \t \r\n\t\tJButton addOrdem = new JButton(\"Adicionar Ordem\");\r\n\r\n\t\taddOrdem.addActionListener(new ActionListener(){\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e){\r\n\r\n\t\t\t\tString sIDOrdem = \"\", sIDFuncionario = \"\", sIDCliente = \"\", sDescOrigem = \"\",\r\n\t\t\t\t\t\tsDescDestino = \"\", sDataPedido = \"\", sVolume = \"\";\r\n\r\n\t\t\t\t// getText returns the value in the text field\t\t\r\n\t\t\t\tboolean ok = true;\r\n\r\n\t\t\t\tsIDOrdem = tfIDOrdem.getText();\r\n\t\t\t\tif(sIDOrdem.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\t\t\t\t\r\n\t\t\t\tsIDFuncionario = tfIDFuncionario.getText();\r\n\t\t\t\tif(sIDFuncionario.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\t\t\t\t\r\n\t\t\t\tsIDCliente = tfIDCliente.getText();\r\n\t\t\t\tif(sIDCliente.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\t\t\t\t\r\n\t\t\t\tsDescOrigem = tfDescOrigem.getText();\r\n\t\t\t\tif(sDescOrigem.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tsDescDestino = tfDescDestino.getText();\r\n\t\t\t\tif(sDescDestino.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tsVolume = tfVolume.getText();\r\n\t\t\t\tif(sVolume.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tsDataPedido = tfDataPedido.getText();\r\n\t\t\t\tif(sDataPedido.isEmpty())\r\n\t\t\t\t\tok = false;\r\n\r\n\t\t\t\tif(ok){\r\n\t\t\t\t\t// Will convert from string to date\r\n\t\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"dd-MM-yyyy\");\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdataPedido = dateFormatter.parse(sDataPedido);\r\n\r\n\t\t\t\t\t\t//Adiciona a ordem ao ArrayList\r\n\t\t\t\t\t\tOrdem o = new Ordem(Integer.parseInt(sIDOrdem), Integer.parseInt(sIDFuncionario),\r\n\t\t\t\t\t\t\t\tInteger.parseInt(sIDCliente), sDescOrigem, sDescDestino,\r\n\t\t\t\t\t\t\t\tdataPedido,Integer.parseInt(sVolume) );\r\n\r\n\t\t\t\t\t\tif (po.adicionarOrdem(o)){\r\n\t\t\t\t\t\t\t//adicionar ordem ao ficheiro ordens.cvs\r\n\t\t\t\t\t\t\tp.addOrdem(o.toString());\r\n\r\n\t\t\t\t\t\t\tObject[] ordem = {sIDOrdem, sIDFuncionario, sIDCliente, sDescOrigem,\r\n\t\t\t\t\t\t\t\t\tsDescDestino, dataPedido, sVolume};\r\n\r\n\t\t\t\t\t\t\tdTableModel.addRow(ordem);\r\n\t\t\t\t\t\t\tnew Popups().showPrice(frame.getSize(), o);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tnew Popups().orderAlreadyExists(frame.getSize());\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} catch (ParseException e1) {\r\n\t\t\t\t\t\t//data invalida\r\n\t\t\t\t\t\tnew Popups().invalidDate(frame.getSize());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t//e1.printStackTrace();\r\n\t\t\t\t\t} catch (NumberFormatException e1){\r\n\t\t\t\t\t\t//campos numericos invalidos\r\n\t\t\t\t\t\tnew Popups().invalidNumber(frame.getSize());\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t//e1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//campos vazios\r\n\t\t\t\t\tnew Popups().emptyFields(frame.getSize());\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t});\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//END ADDING TO ORDER AND PERSISTENCE\r\n\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//DEFINING LABELS AND BUTTONS AND ADDING TO JTABLE AND JPANEL\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t// Define values for my labels\r\n\t\tlIDOrdem = new JLabel(\"ID Ordem\");\r\n\t\tlIDFuncionario = new JLabel(\"ID Funcionario\");\r\n\t\tlIDCliente = new JLabel(\"ID Cliente\");\r\n\t\tlDescOrigem = new JLabel(\"Morada de Origem\");\r\n\t\tlDescDestino = new JLabel(\"Morada de Destino\");\r\n\t\tlDataPedido = new JLabel(\"Data\");\r\n\t\tlVolume = new JLabel(\"Volume\");\r\n\r\n\t\t// Define the size of text fields\r\n\t\ttfIDOrdem = new JTextField(2);\r\n\t\ttfIDFuncionario = new JTextField(5);\r\n\t\ttfIDCliente = new JTextField(5);\r\n\t\ttfDescOrigem = new JTextField(10);\r\n\t\ttfDescDestino = new JTextField(10);\r\n\t\ttfVolume = new JTextField(2);\r\n\r\n\t\t// Set default text and size for text field\r\n\t\ttfDataPedido = new JTextField(\"dd-MM-yyyy\", 8);\r\n\r\n\t\t// Create a panel to hold editing buttons and fields\r\n\t\tJPanel inputPanel = new JPanel();\r\n\t\tFont font = new Font(\"Serif\", Font.BOLD, 12);\r\n\t\tFont fontIn = new Font(\"Serif\", Font.PLAIN, 12);\r\n\r\n\t\t// Put components in the panel\r\n\t\tinputPanel.add(lIDOrdem).setFont(font);\r\n\t\tinputPanel.add(tfIDOrdem).setFont(fontIn);\r\n\t\tinputPanel.add(lIDFuncionario).setFont(font);\r\n\t\tinputPanel.add(tfIDFuncionario).setFont(fontIn);\r\n\t\tinputPanel.add(lIDCliente).setFont(font);\r\n\t\tinputPanel.add(tfIDCliente).setFont(fontIn);\r\n\t\tinputPanel.add(lDescOrigem).setFont(font);\r\n\t\tinputPanel.add(tfDescOrigem).setFont(fontIn);\r\n\t\tinputPanel.add(lDescDestino).setFont(font);\r\n\t\tinputPanel.add(tfDescDestino).setFont(fontIn);\r\n\t\tinputPanel.add(lDataPedido).setFont(font);\r\n\t\tinputPanel.add(tfDataPedido).setFont(fontIn);\r\n\t\tinputPanel.add(lVolume).setFont(font);\r\n\t\tinputPanel.add(tfVolume).setFont(fontIn);\r\n\r\n\t\t//buttons for add and remove \r\n\t\tinputPanel.add(addOrdem).setFont(font);\r\n\t\t//inputPanel.add(removeOrdem);\r\n\r\n\r\n\t\t// Add the component panel to the frame\r\n\t\tframe.add(inputPanel, BorderLayout.SOUTH);\r\n\r\n\t\t///////////////////////////////////////////////////////////////\r\n\t\t//END DEFINING LABELS AND BUTTONS AND ADDING TO JTABLE AND JPANEL\r\n\r\n\r\n\t\tframe.setSize(1200, 600);\r\n\t\tframe.setVisible(true);\r\n\t}", "public ChooseParameterPanel() {\n initComponents();\n }", "public StatisticsJFrame() {\n initComponents();\n initData();\n }", "public DraftGrid() {\n initComponents();\n markedCard = null;\n emptyGrid = true;\n }", "public Query() {\n initComponents();\n }", "public EmployeeWindow() {\n initComponents();\n }", "public ExecutantGui() {\n initComponents();\n }", "public StatisticsWindow() {\n initComponents();\n }", "private void initialize() {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setBounds(new Rectangle(0, 0, 943, 615));\n this.setPreferredSize(new Dimension(890,570));\n this.setMinimumSize(new Dimension(890,570));\n\n\t\tm_GraphControlGradient = new GraphControl();\n\t\tm_GraphControlGradient.setBounds(new Rectangle(4, 16, 461, 285));\n\t\tm_GraphControlGradient.setControlsEnabled(false);\n\n\t\tm_GraphControlFlowRate = new GraphControl();\n\t\tm_GraphControlFlowRate.setBounds(new Rectangle(3, 16, 462, 241));\n\t\tm_GraphControlFlowRate.setControlsEnabled(false);\n\n\t\tthis.add(getJbtnPreviousStep(), null);\n\t\tthis.add(getJpanelGradientProfile(), null);\n\t\tthis.add(getJpanelFlowProfile(), null);\n\t\tthis.setVisible(true);\n\t\tthis.add(getJbtnHelp(), null);\n\t\tthis.add(getJpanelStep5(), null);\n\t\t\n\t\tthis.tmOutputModel.addTableModelListener(this);\n\t\tthis.addComponentListener(this);\n\t}", "public void init()\n\t\t{\n\t\t\t//Makes Lists\n\t\t\tmakeLists();\n\n\t\t\t//layout for GUI\n\t\t\tGridLayout layout = new GridLayout(2,4, 5 ,5);\n\t\t\tsetLayout(layout);\n\n\t\t\t//add panels to window\n\t\t\tadd(Panel_1);\n\t\t\tadd(Panel_2);\n\t\t\tadd(Panel_3);\n\t\t\tadd(Panel_4);\n\n\t\t\t//create buttons\n\t\t\tCalculateButton = new JButton(\"Calculate\");\n\t\t ExitButton = new JButton(\"Exit\");\n\n\t\t\t//connect event handlers to buttons\n\t\t CalculateButton.addActionListener(new ButtonListener());\n\t\t ExitButton.addActionListener(new ButtonListener());\n\n\t\t\t//add buttons to window\n\t\t add(CalculateButton);\n\t\t add(ExitButton);\n\n\t\t //make window visible\n\t\t\tsetVisible(true);\n\t\t}", "public ProgressCallBackDialog(Frame owner, String title, int totalItems)\n \t{\n \t\tsuper(owner, title);\n \t\tsetLocationRelativeTo(owner);\n \t\tinit(totalItems);\n \t}", "public miniproject() {\n initComponents();\n }", "private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}", "public TetrisGUI() {\r\n initializeFields();\r\n }", "public ConfigurationHandlerImpl() {\n initComponents();\n jProgressBar1.setVisible(false);\n }", "public HealthUI() {\n init();\n }", "public InvoiceR() {\n initComponents();\n }", "public ProjectTasksUI(Stage window, Project project) {\n this.window = window;\n this.project = project;\n setUpLayout();\n setUpPreHeader();\n setUpHeader();\n setUpTasks();\n buildScene();\n }", "public PhotoViewerGUI() {\r\n initComponents();\r\n }", "public void initialize() {\n \n super.initialize();\n \n PreferredSizeX = this.getPreferredSizeX();\n PreferredSizeY = this.getPreferredSizeY();\n this.setPreferredSize(new Dimension(PreferredSizeX, PreferredSizeY));\n \n this.createParameterPanel();\n \n }", "public Operacoes() {\n initComponents();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n // TODO\n processImage = new Image(\"/icons/process.gif\");\n processImageView = new ImageView(processImage);\n processImageView.setVisible(false);\n Rectangle2D d = Screen.getPrimary().getVisualBounds();\n Format format = new SimpleDateFormat(\"d-M-yyyy\");\n tableList = FXCollections.observableArrayList();\n allMembers = FXCollections.observableArrayList();\n db = new DBAccess();\n dateLabel.setText(format.format(new Date()));\n prevDateBtn.setText(\"<\");\n refreshGrid.add(processImageView, 0, 0);\n setColumnSize((d.getWidth() - 265) / 6);\n setProcess();\n prevDateBtn.setVisible(false);\n nextDateBtn.setVisible(false);\n } catch (Exception ex) { System.out.println(ex); }\n }", "public NewBooking() {\n initComponents();\n setDate();\n setTime();\n loadcmbOrigin();\n loadcmbDestination();\n }" ]
[ "0.6457187", "0.63816154", "0.6291307", "0.6263892", "0.6235252", "0.62199104", "0.617638", "0.61610013", "0.6158107", "0.6127325", "0.60903454", "0.60788655", "0.60772824", "0.606007", "0.6020849", "0.60190153", "0.60069877", "0.5976927", "0.59611183", "0.59439576", "0.5938807", "0.5906228", "0.59012645", "0.58833146", "0.5877299", "0.5874153", "0.58670664", "0.58638364", "0.58557624", "0.58414954", "0.58398443", "0.5839172", "0.5816261", "0.58088726", "0.58088726", "0.58088726", "0.57956934", "0.5793218", "0.5789689", "0.57869095", "0.5782032", "0.5774962", "0.57664794", "0.57640684", "0.5763499", "0.575817", "0.5756156", "0.5751397", "0.5746927", "0.5744479", "0.57430613", "0.5739283", "0.57351065", "0.5729096", "0.5729096", "0.57236207", "0.57155097", "0.571406", "0.57129693", "0.57105327", "0.5709425", "0.57083297", "0.5701545", "0.5697403", "0.56822693", "0.5681474", "0.5680282", "0.5677573", "0.56761533", "0.5671088", "0.5667476", "0.56657356", "0.56622225", "0.56595725", "0.5658755", "0.5658547", "0.56574494", "0.56554556", "0.56552434", "0.56473184", "0.56427276", "0.5641177", "0.56388134", "0.5635498", "0.563468", "0.56301546", "0.56280965", "0.56275284", "0.5627431", "0.56267506", "0.56265277", "0.5622246", "0.5620937", "0.56152916", "0.56145704", "0.5613186", "0.5612813", "0.56103104", "0.56093335", "0.5600476", "0.5600051" ]
0.0
-1
Initializes the new instance using the given parameters.
public NewGridFormatActionCommand(FormatType formatType, ODOMSelectionManager selectionManager, boolean displayProgress) { this(formatType, selectionManager); this.displayProgress = displayProgress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Parameters() {\n\t}", "public void init(Object[] parameters) {\n\n\t}", "private Instantiation(){}", "protected void initialize() { \n param1 = SmartDashboard.getNumber(\"param1\");\n param2 = SmartDashboard.getNumber(\"param2\");\n param3 = SmartDashboard.getNumber(\"param3\");\n param4 = SmartDashboard.getNumber(\"param4\");\n command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3);\n }", "public Constructor(){\n\t\t\n\t}", "public ModuleParams()\n\t{\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public BaseParameters(){\r\n\t}", "public ModuleParams() {\n }", "public void init() {\n \n }", "@Override public void init()\n\t\t{\n\t\t}", "private Params()\n {\n }", "public void initialize()\n {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void init(){}", "public SocketParams() {\n init();\n }", "public CMN() {\n\t}", "public void init() {\n\t\t}", "protected void initialize() {\n \t\n }", "public void init() { }", "public void init() { }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "public void init(){\n \n }", "@Override\n\tprotected void initParams() {\n\t\t\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "public void init() {}", "public void init() {}", "public void init() {\r\n\r\n\t}", "public CustomEntitiesTaskParameters() {}", "protected void initialize() {}", "protected void initialize() {}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public ParametersBuilder() {\n this(Parameters.DEFAULT);\n }", "@Override\n public void initialize(Map<String, Param> params) throws TikaConfigException {\n //params have already been set...ignore them\n //TODO -- add other params to the builder as needed\n storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private LocalParameters() {\n\n\t}", "@Override\n public void init() {}", "public void init(Object[] initialParams) {\n\t \n\t}", "public LightParameter()\r\n\t{\r\n\t}", "public Curso() {\r\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "Reproducible newInstance();", "protected void init() {\n }", "public Instance() {\n }", "public void init() {\n\t\n\t}", "@Override\n public void init() {\n }", "private void init() {\n }", "public void init() {\n\n }", "public void init() {\n\n }", "public ParameterizedInstantiateFactory() {\r\n super();\r\n }", "public ObjectFactory() {\n\t}", "public void init()\n {\n }", "public PSRelation()\n {\n }", "public void init() {\n\t\t\n\t}", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "private void init() {\n\n\t}", "public InitialData(){}", "public ObjectFactory() {\r\n\t}", "public void initialize() {\n // empty for now\n }", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "protected void initialize() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "@Override\n\tpublic void init(String[] args) {\n\t\tsuper.init(args);\n\t\tmodel = new ArenaModel();\n\t\tview = new ArenaView(model);\n\t\tmodel.setView(view);\n\t\tupdatePercepts();\n\t}", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }" ]
[ "0.6996005", "0.6920473", "0.68091923", "0.6792459", "0.67817444", "0.6774754", "0.6765213", "0.6746225", "0.6593587", "0.65760994", "0.6540276", "0.65083516", "0.6463393", "0.6372489", "0.63676673", "0.6355538", "0.63458264", "0.6328853", "0.6311476", "0.6306477", "0.628013", "0.628013", "0.62701494", "0.6267258", "0.6262704", "0.6255488", "0.6249078", "0.6249078", "0.6249078", "0.62432677", "0.6242766", "0.6242766", "0.62401545", "0.6234948", "0.6225539", "0.6225539", "0.6223168", "0.6223168", "0.6223168", "0.6223168", "0.62054545", "0.61992174", "0.6199119", "0.61850506", "0.61850506", "0.61850506", "0.6179083", "0.61688155", "0.61660343", "0.615636", "0.6156025", "0.615487", "0.615027", "0.615027", "0.615027", "0.615027", "0.61489534", "0.6145806", "0.614514", "0.6144169", "0.6140953", "0.61360544", "0.6135396", "0.6135396", "0.61324877", "0.6124375", "0.611847", "0.61135674", "0.61059624", "0.6100715", "0.6100715", "0.609078", "0.60877824", "0.60795224", "0.6079011", "0.60780996", "0.60760623", "0.607477", "0.6068809", "0.6063093", "0.6063093", "0.6063093", "0.60630924", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801", "0.6060801" ]
0.0
-1
This action command can only be performed when a single empty format is selected and the format type can reasonably be created at the selected point in the document.
public boolean enable(ODOMActionDetails details) { return ((details.getNumberOfElements() == 1) && selectionIsAppropriate(details.getElement(0)) && canReplace(details.getElement(0))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NewGridFormatActionCommand(FormatType formatType,\n ODOMSelectionManager selectionManager) {\n super(formatType, selectionManager);\n this.displayProgress = true;\n }", "public NewGridFormatActionCommand(FormatType formatType,\n ODOMSelectionManager selectionManager,\n boolean displayProgress) {\n this(formatType, selectionManager);\n this.displayProgress = displayProgress;\n }", "public void formatChanged()\n {\n // for now, just create formatter from scratch, but later we can just detect changes and act accordingly\n setFormatterFromTextPane(formatContainer.getSelectedFormatter());\n setHasChanged(true);\n }", "protected Format doSetFormat(Format format)\n {\n return null;\n }", "private void outputFormatComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_outputFormatComboActionPerformed\n if (outputFormatCombo.getSelectedIndex() != 0 && this.isVisible()) {\n // invoke later to give time for components to update\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n JOptionPane.showMessageDialog(TideParametersDialog.this, JOptionEditorPane.getJOptionEditorPane(\n \"Note that the Tide \" + (String) outputFormatCombo.getSelectedItem()\n + \" format is not compatible with <a href=\\\"https://compomics.github.io/projects/peptide-shaker.html\\\">PeptideShaker</a>.\"),\n \"Format Warning\", JOptionPane.WARNING_MESSAGE);\n }\n });\n }\n }", "public boolean hasFormat() {\r\n return hasFormat;\r\n }", "int insertSelective(FormatOriginRecord record);", "public void addFormat(Format format);", "public void clearFormats();", "private Format()\n {\n super();\n }", "public edu.umich.icpsr.ddi.FormatType addNewFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().add_element_user(FORMAT$10);\n return target;\n }\n }", "protected Format doGetFormat()\n {\n return null;\n }", "@Override\r\n public OwFormat getFormat()\r\n {\n return null;\r\n }", "public void actionPerformed(ActionEvent e)\n {\n int pos = findFieldButtonPosition();\n formatEditor.setCaretPosition(pos);\n }", "public Class<? extends FormatFeature> getFormatWriteFeatureType()\n/* */ {\n/* 426 */ return null;\n/* */ }", "public void InvalidFormat();", "default boolean alwaysFormatEntireFile() {\n return false;\n }", "private void checkAndInsertDefaultEntries() {\n\t\tinsertDefaultMediaFormats();\n\t}", "private void insertDefaultMediaFormats() {\n\t\tif (isTableEmpty(Constants.ContentProviderConstants.TableUris.MEDIA_FORMAT_CONTENT_URI)) {\n\t\t\tLogUtils.i(TAG,\n\t\t\t\t\t\"MEDIA_FORMAT table is empty inserting default media formats\");\n\t\t\tinsertMediaValues(Constants.FileFormatConstants.MUSIC_FORMATS);\n\t\t\tinsertMediaValues(Constants.FileFormatConstants.PIX_FORMATS);\n\t\t\tinsertMediaValues(Constants.FileFormatConstants.VIDEO_FORMATS);\n\t\t\tinsertMediaValues(Constants.FileFormatConstants.DOC_FORMATS);\n\t\t} else {\n\t\t\tLogUtils.i(TAG, \"MEDIA_FORMAT table is not empty\");\n\t\t}\n\t}", "@ApiModelProperty(required = true, value = \"The file type of the file.\")\n public String getFormat() {\n return format;\n }", "public Builder clearFormat() {\n \n format_ = getDefaultInstance().getFormat();\n onChanged();\n return this;\n }", "public BusinessObjectFormat createBusinessObjectFormat(BusinessObjectFormatCreateRequest businessObjectFormatCreateRequest);", "public boolean isSetFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FORMAT$10) != 0;\n }\n }", "public final void mT__215() throws RecognitionException {\n try {\n int _type = T__215;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:213:8: ( 'format' )\n // InternalMyDsl.g:213:10: 'format'\n {\n match(\"format\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public boolean isAllowedLogoDocumentFormat(String format) throws DataServiceException {\r\n\t\treturn false;\r\n\t}", "protected boolean selectionIsAppropriate(Element selection) {\n return selection.getName().equals(FormatType.EMPTY.getElementName());\n }", "public boolean isFormat() {\n\t\treturn isFormat;\n\t}", "public DefaultFormat() {\n }", "private void logFormatTypeChanges(ObjectFormatIdentifier mnFormatId, ObjectFormatIdentifier cnFormatId) {\n\n try {\n if (mnFormatId.getValue().equals(cnFormatId.getValue())) {\n return;\n }\n\n String mnType = nodeCommunications.getCnCore().getFormat(mnFormatId).getFormatType();\n String cnType = nodeCommunications.getCnCore().getFormat(cnFormatId).getFormatType();\n\n if (mnType.equals(cnType)) {\n return;\n }\n\n // if one and only one (XOR) is data, there's been a loggable change \n if (!mnType.equalsIgnoreCase(cnType)) {\n logger.warn(buildStandardLogMessage(null, String.format(\"Format type for %s has changed from %s to %s\",\n task.getPid(), cnFormatId.getValue().toUpperCase(), mnFormatId.getValue().toUpperCase())));\n }\n\n } catch (ServiceFailure | NotFound | NotImplemented | InvalidRequest e) {\n logger.error(buildStandardLogMessage(e,String.format(\"Format type change for %s could not be determined while looking up the ObjectFormat.\",\n task.getPid())), e);\n } catch (Exception e) {\n logger.error(buildStandardLogMessage(e,String.format(\"Format type change for %s could not be determined.\",\n task.getPid())),\n e);\n }\n }", "public\tint\tgetTypeFormatId()\t{ return StoredFormatIds.FORMATABLE_ARRAY_HOLDER_V01_ID; }", "@Override\n public void setFormat(Format format) {\n if (format != Format.XML)\n throw new IllegalArgumentException(\"JAXBHandle supports the XML format only\");\n }", "public void saveStage1(String format)\n {\n super.saveStage1(format);\n try{\n writer.write(\"CB336\");\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(33).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(34).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(35).getText()));\n writer.write(\"\\r\\n\");\n\n writer.write(\"CB714\");\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(36).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(37).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(38).getText()));\n writer.write(\"\\t\");\n writer.write(checkValue(input.get(39).getText())); \n writer.close();\n }\n catch(IOException e){\n JOptionPane.showMessageDialog(null, \"Error in exporting file\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }", "public void setFormat(String format) {\n this.format = format;\n }", "public void setFormat(String format) {\n this.format = format;\n }", "public void setFormat(String format) {\n this.format = format;\n }", "public void setFormat(Format format) {\n this.format = format.getIndex();\n }", "public void actionPerformed(ActionEvent e)\n {\n DBFieldInfo fi = dataObjFieldWrapper.getFormatterField().getFieldInfo();\n UIFormatterListEdtDlg dlg = new UIFormatterListEdtDlg((Frame) UIRegistry.getTopWindow(),\n fi, true, uiFieldFormatterMgrCache);\n dlg.setVisible(true);\n \n if (dlg.getBtnPressed() == CustomDialog.OK_BTN)\n {\n if (dlg.getSelectedFormat() != null)\n { \n setFormatter(dlg.getSelectedFormat());\n }\n }\n }", "public void setFormat(RMFormat aFormat)\n{\n // Add format to first binding\n if((aFormat==null || aFormat instanceof java.text.Format) && getBindingCount()>0)\n getBinding(0).setFormat((java.text.Format)aFormat);\n \n // Pass down to children\n for(int i=0, iMax=getChildCount(); i<iMax; i++)\n getChild(i).setFormat(aFormat);\n}", "public void clickOnPdfFormatButton()\n \t{\n \t\tproductRequirementsPageLocators.clickOnpdfFormatButton.click();\n\n \t}", "public void setFormat(String format) {\r\n _format = format;\r\n }", "public void pageChanged(String inputDocument, String modelType, boolean documentTypeSelected)\n {\n \n if (inputDocument.endsWith(\".docx\") || inputDocument.endsWith(\".odt\")) //$NON-NLS-1$ //$NON-NLS-2$\n {\n isSpreadsheet = false;\n \n if (documentTypeSelected)\n {\n valueToRecognizeReq = controller.getIDRegexOrStyle();\n RecognizedTree newTree = controller.getStylesAndRegex();\n tree.getChildren().clear();\n if (newTree != null)\n {\n tree.getChildren().addAll(newTree.getChildren());\n }\n }\n \n boolean b = Constants.SYSML_EXTENSION.equals(modelType) || Constants.UML_EXTENSION.equals(modelType);\n \n descriptionComposite.setAttributeComboVisible(b);\n } \n else\n {\n isSpreadsheet = true;\n\n if (documentTypeSelected)\n {\n valueToRecognizeReq = controller.getIDColumn();\n RecognizedTree newTree = controller.getColumns();\n tree.getChildren().clear();\n if (newTree != null)\n {\n tree.getChildren().addAll(newTree.getChildren());\n }\n }\n }\n \n if (documentTypeSelected)\n {\n descriptionText = controller.getDescriptionEndText();\n descriptionRegex = controller.getDescriptionRegex();\n }\n \n updateWizard();\n \n if (inputDocument != null)\n {\n if (inputDocument.contains(\"file:\")) //$NON-NLS-1$\n {\n currentFileSystem = new File(URI.createURI(inputDocument).toFileString());\n controller.setCurrentFileSystem(currentFileSystem);\n }\n else if (inputDocument.contains(\"platform:\")) //$NON-NLS-1$\n {\n currentFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(URI.createURI(inputDocument).toPlatformString(true)));\n controller.setCurrentFile(currentFile);\n if (currentFile != null)\n {\n currentFileSystem = currentFile.getLocation().toFile();\n controller.setCurrentFileSystem(currentFileSystem);\n }\n }\n else\n {\n currentFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(URI.createURI(inputDocument).toFileString()));\n controller.setCurrentFile(currentFile);\n if (currentFile != null)\n {\n currentFileSystem = currentFile.getLocation().toFile();\n controller.setCurrentFileSystem(currentFileSystem);\n }\n }\n }\n setDocumentFile(currentFileSystem);\n }", "@SpecAssertion(section = \"4.3\", id = \"43-A2\")\n @Test(groups = { \"format\" }, description = \"4.3 Ensure the format() operation is implemented.\")\n public void testUnitFormatFormat() {\n for (UnitFormat format : TCKSetup.getConfiguration().getUnitFormats4Test()) {\n \tClass<?> type = format.getClass();\n TestUtils.testHasPublicMethod(\"Section 4.3\", type, \"format\", true);\n }\n }", "public void addDataformatToSaveToSystemList(FileType type) {\r\n\t\tList<String> dataformatsToSystem;\r\n\t\tif(this.settings.containsKey(\"dataformatsToSystem\")) {\r\n\t\t\tdataformatsToSystem = new ArrayList<String>(Arrays.asList(String.valueOf(this.settings.get(\"dataformatsToSystem\")).split(\",\")));\r\n\t\t\tif(!dataformatsToSystem.contains(type.toString())) {\r\n\t\t\t\tdataformatsToSystem.add(type.toString());\r\n\t\t\t}\r\n\t\t\tthis.settings.setProperty(\"dataformatsToSystem\", String.join(\",\", dataformatsToSystem));\r\n\t\t} else {\r\n\t\t\tdataformatsToSystem = new ArrayList<>();\r\n\t\t\tdataformatsToSystem.add(type.toString());\r\n\t\t\tthis.settings.setProperty(\"dataformatsToSystem\", String.join(\",\", dataformatsToSystem));\r\n\t\t}\t\t\r\n\t\tthis.saveChanges();\r\n\t}", "@Override\n public void selectionChanged(JavaTextSelection selection) {\n try {\n setEnabled(RefactoringAvailabilityTester.isGeneralizeTypeAvailable(selection));\n } catch (JavaModelException e) {\n setEnabled(false);\n }\n }", "public void mo1606a(Format format) {\n }", "public boolean doSaveAs(int format) {\n\n String title = ResourceUtils.getString(EditorResources.SAVE_TITLE);\n File file = getFileFromDialog(fDocument.getFile(), title, this, FileDialog.SAVE);\n \n if (file == null) {\n return false;\n }\n \n fDocument.setFile(file);\n setTitle(fDocument.getTitle());\n\n fDocument.setFormat(format);\n \n return fDocument.save();\n }", "public interface InputFormat {\n /**\n * Return a FileFilter that can be used to identify files which can be restored\n * with this Storage Format. Typically, each input format has its own \n * recognizable file naming convention.\n *\n * @return FileFilter to be used with a javax.swing.JFileChooser\n */\n public javax.swing.filechooser.FileFilter getFileFilter();\n \n /**\n * Return a JFileChooser accessory that can be used to customize the input\n * format.\n *\n * @return A JFileChooser accessory to be used with a javax.swing.JFileChooser\n * Returns null, if no accessory is provided for this format.\n */\n public JComponent getInputFormatAccessory();\n \n /**\n * Reads figures from a file and replaces the children of the drawing\n * with them.\n * <p>\n * This is a convenience method for calling read(File,Drawing,true).\n *\n * @param file The file.\n * @param drawing The drawing.\n */\n public void read(File file, Drawing drawing) throws IOException;\n \n /**\n * Reads figures from a file and adds them to the specified drawing.\n *\n * @param file The file.\n * @param drawing The drawing.\n * @param replace Set this to true, if the contents of the file replaces the\n * contents of the drawing (for example, when loading a drawing from a file).\n * Set this to false, to add the contents of the file to the drawing (for\n * example, when the file has been dropped into the drawing view).\n */\n public void read(File file, Drawing drawing, boolean replace) throws IOException;\n\n /**\n * Reads figures from a file and adds them to the specified drawing.\n *\n * @param in The input stream.\n * @param drawing The drawing.\n * @param replace Set this to true, if the contents of the stream replaces the\n * contents of the drawing (for example, when loading a drawing from a stream).\n * Set this to false, to add the contents of the file to the drawing (for\n * example, when the stream has been dropped into the drawing view).\n */\n public void read(InputStream in, Drawing drawing, boolean replace) throws IOException;\n\n /**\n * Returns true, if this InputFormat can readFigures TransferData using the \n * specified DataFlavor.\n * \n * @param flavor A DataFlavor.\n */\n public boolean isDataFlavorSupported(DataFlavor flavor);\n \n /**\n * Reads figures from the specified Transferable and adds them to the\n * specified drawing.\n * \n * @param t The Transferable. \n * @param drawing The drawing.\n * @param replace Set this to true, if the contents of the transferable\n * replaces the contents of the drawing (for example, when loading a drawing\n * from a transferable). Set this to false, to add the contents of the \n * transferable to the drawing (for example, when the transferable has been\n * dropped or pasted into the drawing view).\n */\n public void read(Transferable t, Drawing drawing, boolean replace) throws UnsupportedFlavorException, IOException;\n}", "@Override\n\tprotected void handleDrop() {\n\t\tif (getTargetEditPart() instanceof CrosstabEditPart) {\n\t\t\tMCrosstab crosstabModel = (MCrosstab) ((EditPart)getTargetEditPart()).getModel();\n\t\t\tTemplateStyle style = (TemplateStyle) IOUtils.readFromByteArray((byte[])getCurrentEvent().data);\n\t\t\tif (style != null && style instanceof CrosstabStyle){\n\t\t\t\tCrosstabStyle selectedStyle = (CrosstabStyle) style;\n\t\t\t\tif (crosstabModel != null) {\n\t\t\t\t\tShell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();\n\t\t\t\t\tMessageDialog question = new MessageDialog(shell, Messages.EditCrosstabStyleAction_questionTitle, null, Messages.EditCrosstabStyleAction_questionText, MessageDialog.QUESTION, \n\t\t\t\t\t\t\tnew String[]{Messages.EditCrosstabStyleAction_questionUpdate, \n\t\t\t\t\t\t\t\t\t\t Messages.EditCrosstabStyleAction_questionNewStyles, \n\t\t\t\t\t\t\t\t\t\t Messages.EditCrosstabStyleAction_questionCancel}, 0);\n\t\t\t\t\tint response = question.open();\n\t\t\t\t\t// response == 0 update the old styles, response == 1 create new styles, response == 2 cancel the operation\n\t\t\t\t\tif (response == 0 || response == 1) {\n\t\t\t\t\t\tUpdateCrosstabStyleCommand updateCommand = new UpdateCrosstabStyleCommand(crosstabModel, selectedStyle,response == 0);\n\t\t\t\t\t\tCommandStack cs = getCommandStack();\n\t\t\t\t\t\tif (cs!=null) cs.execute(updateCommand);\n\t\t\t\t\t\telse updateCommand.execute();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n PageConsumerEntity.setCTType(\" \");\n }", "public void ach_doc_type_txt_test () {\n\t\t\n\t}", "public void setFormat(edu.umich.icpsr.ddi.FormatType format)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().find_element_user(FORMAT$10, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FormatType)get_store().add_element_user(FORMAT$10);\n }\n target.set(format);\n }\n }", "@UML(identifier=\"fileFormat\", obligation=MANDATORY, specification=ISO_19139)\n Format getFileFormat();", "public boolean canBuildFormatter() {\r\n return isFormatter(getFormatter());\r\n }", "Object getFormat();", "private void createListFormat(Composite section2)\n {\n // Create Label\n Label label = toolkit.createLabel(section2, \"Attributes identification:\"); //$NON-NLS-1$\n label.setData(new GridData(SWT.FILL, SWT.LEFT, false, false, 2, 1));\n\n // Create treeViewer\n listFormat = new TreeViewer(section2, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);\n GridData data = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 6);\n listFormat.getTree().setLayoutData(data);\n\n // Set the label provider\n listFormat.setLabelProvider(new LabelProvider()\n {\n public String getText(Object element)\n {\n // Return the label.\n if (element instanceof String)\n {\n return (String) element;\n }\n else if (element instanceof RecognizedElement)\n {\n return ((RecognizedElement) element).getText();\n }\n else if (element instanceof RecognizedTree)\n {\n return \"root\"; //$NON-NLS-1$\n }\n return null;\n }\n });\n // Set the content provider\n listFormat.setContentProvider(new IStructuredContentProviderTree());\n\n \n // Add inputs\n listFormat.setInput(tree);\n\n listFormat.addSelectionChangedListener(new ISelectionChangedListener()\n {\n private ISelection selection;\n\n public void selectionChanged(SelectionChangedEvent event)\n {\n selection = listFormat.getSelection();\n if (selection instanceof IStructuredSelection)\n {\n IStructuredSelection stru = (IStructuredSelection) selection;\n\n // enable button delete\n buttonDelete.setEnabled(true);\n\n // Get the selection\n if (stru.getFirstElement() instanceof RecognizedElement)\n selectedRule = (RecognizedElement) stru.getFirstElement();\n }\n }\n });\n\n }", "public boolean isInFormatDialog() {\n if(inFormatFragment.getValue() != null)\n return inFormatFragment.getValue();\n else return false;\n }", "private void createRowForNewStyleButton(Composite section)\n {\n buttonNewStyle = toolkit.createButton(section, \"New Style...\", SWT.PUSH); //$NON-NLS-1$\n buttonGridData(buttonNewStyle, SWT.TOP);\n buttonNewStyle.addSelectionListener(new SelectionListener()\n {\n public void widgetDefaultSelected(SelectionEvent e)\n {\n }\n\n public void widgetSelected(SelectionEvent e)\n {\n NewStylePopup dialog = new NewStylePopup(getShell(), documentFile, browser);\n if (dialog.open() == Dialog.OK)\n {\n if (dialog.getStyleInput() != null && dialog.getStyleInput().length() > 0)\n {\n // if the first field is not set\n if (valueToRecognizeReq == null)\n {\n valueToRecognizeReq = new Style(dialog.getStyleInput(), dialog.getRegexInput());\n reqIdComponent.setValueText(valueToRecognizeReq.getText());\n }\n else\n {\n tree.add(new Style(dialog.getStyleInput(), dialog.getRegexInput()));\n listFormat.refresh();\n }\n controller.removeDocumentType();\n updateWizard();\n }\n }\n }\n });\n }", "FileFormat getFormat();", "Format internalSetFormat(Format format)\n {\n return doSetFormat(format);\n }", "public void setOnClickDisplayFormat(int format){\n \t\tthis.displayFormat = format;\n \t}", "public void resetFormato()\r\n {\r\n this.formato = null;\r\n }", "public void doSaveAs()\n {\n super.doSaveAs();\n revalidateSyntax();\n }", "public void setMainFormatType(String mainFormatType) {\n this.mainFormatType = mainFormatType;\n }", "private void showFormatConfirmDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setMessage(R.string.setting_format_desc);\n\t\tbuilder.setNegativeButton(R.string.setting_no,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setPositiveButton(R.string.setting_yes,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t// handler.obtainMessage(REQUEST_FORMAT_SD_CARD).sendToTarget();\n\t\t\t\t\t\tFormatSDCard formatSDCard = new FormatSDCard(handler);\n\t\t\t\t\t\tformatSDCard.start();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tdialog = builder.create();\n\t\tdialog.show();\n\t}", "public void unsetFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FORMAT$10, 0);\n }\n }", "@Override\n public String getFormatName() throws IOException {\n return input == null? myDefaultFormat.getName() : getInfo().getFormat().getName();\n }", "@SuppressWarnings(\"unchecked\")\n public <F> ConverterFormat<F> getFormat(Class<F> formatType) {\n ConverterFormat<F> format = (ConverterFormat<F>) formats.get(formatType);\n\n if (format == null) {\n throw new UnsupportedOperationException(\"The format \" + formatType + \" is not supported.\");\n }\n\n return format;\n }", "public final void insn_format21c_type() throws RecognitionException {\n CommonTree INSTRUCTION_FORMAT21c_TYPE123 = null;\n CommonTree REGISTER124 = null;\n TreeRuleReturnScope nonvoid_type_descriptor125 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:842:3: ( ^( I_STATEMENT_FORMAT21c_TYPE INSTRUCTION_FORMAT21c_TYPE REGISTER nonvoid_type_descriptor ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:843:5: ^( I_STATEMENT_FORMAT21c_TYPE INSTRUCTION_FORMAT21c_TYPE REGISTER nonvoid_type_descriptor )\n {\n match(input, I_STATEMENT_FORMAT21c_TYPE, FOLLOW_I_STATEMENT_FORMAT21c_TYPE_in_insn_format21c_type2289);\n match(input, Token.DOWN, null);\n INSTRUCTION_FORMAT21c_TYPE123 = (CommonTree) match(input, INSTRUCTION_FORMAT21c_TYPE, FOLLOW_INSTRUCTION_FORMAT21c_TYPE_in_insn_format21c_type2291);\n REGISTER124 = (CommonTree) match(input, REGISTER, FOLLOW_REGISTER_in_insn_format21c_type2293);\n pushFollow(FOLLOW_nonvoid_type_descriptor_in_insn_format21c_type2295);\n nonvoid_type_descriptor125 = nonvoid_type_descriptor();\n state._fsp--;\n\n match(input, Token.UP, null);\n\n\n Opcode opcode = opcodes.getOpcodeByName((INSTRUCTION_FORMAT21c_TYPE123 != null ? INSTRUCTION_FORMAT21c_TYPE123.getText() : null));\n short regA = parseRegister_byte((REGISTER124 != null ? REGISTER124.getText() : null));\n\n method_stack.peek().methodBuilder.addInstruction(new BuilderInstruction21c(opcode, regA,\n dexBuilder.internTypeReference((nonvoid_type_descriptor125 != null ? ((smaliTreeWalker.nonvoid_type_descriptor_return) nonvoid_type_descriptor125).type : null))));\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n }", "int insert(FormatOriginRecord record);", "@SuppressWarnings(\"unchecked\")\n @Override\n public Set<?> instantiate() throws IOException {\n OrthoMclFormat format = (OrthoMclFormat) wizard.getProperty(PROP_ORTHOMCL_FORMAT);\n format.setDirectory(wizard.getDirectory());\n //update the format settings\n// format.setFilePerOrganism((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_FILE_PER_ORGANISM));\n// format.setPrefixOrganism((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_PREFIX_FOUR_LETTER_ORGANISM));\n// format.setFilePerMethod((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_FILE_PER_METHOD));\n \n// format.setIsWindows((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_IS_WINDOWS));\n// format.setPerlDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_PERL_DIR));\n// format.setOrthoDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_ORTHO_DIR));\n// format.setMclDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_MCL_DIR));\n\n// format.setDb_userName((String) this.wizard.getProperty(OrthoMclFormat.PROP_USER_NAME));\n// format.setDb_password((String) this.wizard.getProperty(OrthoMclFormat.PROP_PASSWORD));\n// format.setDatabaseName((String) this.wizard.getProperty(OrthoMclFormat.PROP_DB_NAME));\n// format.setDropCreateDatabase((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DROP_CREATE_DB));\n //format.setMysqlBin((String) this.wizard.getProperty(OrthoMclFormat.PROP_MYSQL_BIN));\n\n format.setRunBlastp((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DO_BLASTP));\n format.setRunMakeBlastDb((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DO_MAKEBLAST));\n //format.setBlastBin((String) wizard.getProperty(OrthoMclFormat.PROP_BLAST_BIN));\n format.setMakeblastdbParameters((String) wizard.getProperty(OrthoMclFormat.PROP_MAKEBLASTDB_PARAMETERS));\n format.setBlastpParameters((String) wizard.getProperty(OrthoMclFormat.PROP_BLASTP_PARAMETERS));\n\n format.setMinProteinLength((String) this.wizard.getProperty(OrthoMclFormat.PROP_MIN_PROT_LENGTH));\n format.setMaxPercentStops((String) this.wizard.getProperty(OrthoMclFormat.PROP_MAX_PERCENT_STOPS));\n format.setPercentMatchCutoff((String) this.wizard.getProperty(OrthoMclFormat.PROP_PERCENT_MATCH));\n format.seteValueCutoff((String) this.wizard.getProperty(OrthoMclFormat.PROP_EVALUE_CUTOFF));\n// format.setExecute((Boolean)this.wizard.getProperty(OrthoMclFormat.PROP_EXECUTE));\n try {\n final OrthoMclFormat myFormat = format;\n myFormat.download();\n } catch (DownloadException ex) {\n Exceptions.printStackTrace(ex);\n }\n //set the last directory\n if(format.getDirectory() != null){\n NbPreferences.forModule(OrthoMclFormat.class).put(\"orthomcl-run\", format.getDirectory());\n }\n\n return Collections.emptySet();\n }", "@Override\r\n\tprotected void isBodyValid() {\r\n\t\tif( withinButton.isSelected() \r\n\t\t\t\t&& withinField.getText().equals(\"\")){\r\n//\t\t\tinformation.setText(\"When --within is selected you must specify a file.\");\r\n\t\t\tvalidBody = false;\r\n\t\t}\r\n\t\telse \r\n\t\t\tvalidBody = true;\r\n\t\t\r\n\t\tokForm();\r\n\r\n\t}", "String ensureTypeSpecFormat(Context pContext, TypeRef pTypeRef, Executable.ExecKind pExecKind,\n\t\t\tExecInterface pInterface) {\n\t\t\n\t\tif((pExecKind != null) && pExecKind.isFragment() && (pInterface.getParamCount() != 0)) \n\t\t\treturn \"Mal-form TypeSpec: A fragment should not have a parameter.\" +\n\t\t\t\t\t\"(Executable type \"+pTypeRef+\").\";\n\t\t\n\t\treturn null;\n\t}", "@Test\n\tpublic void testFormats() throws IOException {\n\t\tassertArrayEquals(Formats.FORMATS, ffmpeg.formats().toArray());\n\t\tassertArrayEquals(Formats.FORMATS, ffmpeg.formats().toArray());\n\n\t\tverify(runFunc, times(1)).run(argThatHasItem(\"-formats\"));\n\t}", "public Multimedia.FORMATO pedirFormato(){\n int opcion = -1;\n boolean validado = false;\n Multimedia.FORMATO formato = Multimedia.FORMATO.ERROR;\n do{\n\n System.out.println(\"Elige un formato:\");\n System.out.println(\"1. CD\");\n System.out.println(\"2. DVD\");\n System.out.println(\"3. BLUE_RAY\");\n System.out.println(\"4 ARCHIVO\");\n try {\n opcion = Integer.parseInt(lector.nextLine());\n validado = true;\n if (opcion > 4 || opcion < 1) {\n validado = false;\n System.out.println(\"Por favor, introduce un numero entre el 1 y el 4\");\n }\n }catch (NumberFormatException nfe){\n System.out.println(\"Introduce un valor numerico entre el 1 y el 4\");\n }\n }while(!validado);\n\n switch (opcion){\n case 1:\n formato = Multimedia.FORMATO.CD;\n break;\n case 2:\n formato = Multimedia.FORMATO.DVD;\n break;\n case 3:\n formato = Multimedia.FORMATO.BLUE_RAY;\n break;\n case 4:\n formato = Multimedia.FORMATO.ARCHIVO;\n break;\n default:\n break;\n }\n return formato;\n\n }", "@Override\n public void selected ( final ExampleData document, final PaneData<ExampleData> pane, final int index )\n {\n styleViewer.setText ( document.getExample ().getStyleCode ( StyleManager.getSkin () ) );\n styleViewer.setCaretPosition ( 0 );\n }", "private Formats() {\n }", "public Class<? extends FormatFeature> getFormatReadFeatureType()\n/* */ {\n/* 415 */ return null;\n/* */ }", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "@Override\n public boolean onTextContextMenuItem(int id) {\n if(id != android.R.id.paste || formattingAllowed){\n return super.onTextContextMenuItem(id);\n }\n\n // if its paste and formatting not allowed\n boolean proceeded;\n if(VERSION.SDK_INT >= 23) {\n proceeded = super.onTextContextMenuItem(android.R.id.pasteAsPlainText);\n }else {\n proceeded = super.onTextContextMenuItem(id);\n if (proceeded && getText() != null) {\n // rewrite with plain text so formatting is lost\n setText(getText().toString());\n setSelection(getText().length());\n }\n }\n return proceeded;\n }", "boolean supportsFormat(UUID formatid);", "@Override\n public Format[] getSupportedInputFormats()\n {\n return supportedInputFormats;\n }", "public void setOutputFormat(OutputFormat format);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (typeCombox.getSelectedIndex() == 0) {\n\t\t\t\t\tunitText.setText(\"s\");\n\t\t\t\t\tunitText.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tunitText.setText(\"\");\n\t\t\t\t\tunitText.setEnabled(true);\n\t\t\t\t}\n\t\t\t}", "public boolean fileFormatSupported(String fmt);", "public static void invalidSetCommandPrinter() {\n System.out.println(line);\n System.out.println(INVALID_FORMAT_MSG);\n System.out.println(SET_FORMAT_MSG);\n System.out.println(line);\n }", "@Override\n\tpublic boolean isFormatted() {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic void selectionChanged(IAction action, ISelection selection) {\r\n\t\tif (selection instanceof IStructuredSelection) {\r\n\t\t\tIStructuredSelection ssel = (IStructuredSelection) selection;\r\n\t\t\tObject obj = ssel.getFirstElement();\r\n\t\t\tif (obj != null) {\r\n\t\t\t\tIFile file = (IFile) Platform.getAdapterManager().getAdapter(obj, IFile.class);\r\n\t\t\t\tif (file == null) {\r\n\t\t\t\t\tif (obj instanceof IAdaptable) {\r\n\t\t\t\t\t\tfile = (IFile) ((IAdaptable) obj).getAdapter(IFile.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (file != null) {\r\n\t\t\t\t\tString fileExtension = file.getFileExtension();\r\n\t\t\t\t\t//If file is of type Papyrus diagram, call getUMLModelOfDI method to set the selectedFile variable\r\n\t\t\t\t\tif (\"di\".equals(fileExtension)) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(file);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tselectedFile = file;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//If the file is null, it might be of type PapyrusFile, then the uml file is found by passing mainFile to the getUMLModelOfDI method\r\n\t\t\t\telse {\r\n\t\t\t\t\tIPapyrusFile papyrusFile = (IPapyrusFile) Platform.getAdapterManager().getAdapter(obj, IPapyrusFile.class);\r\n\t\t\t\t\tif (papyrusFile != null) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(papyrusFile.getMainFile());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(selectedFile.getProject().getName());\r\n\t\t\t\tReportGenerator.INSTANCE.setProject(project);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;", "public void actionPerformed(ActionEvent actionEvent) {\r\n Object source = actionEvent.getSource();\r\n /*if Upload , then set 'fileSelected' as true, get the filename from file chooser and set it to the txtFilename,\r\n set the BLOB data and enable the view button*/\r\n if(source.equals(awardAddDocumentForm.btnUpload)){\r\n CoeusFileChooser fileChooser = new CoeusFileChooser(dlgAwardUploadDoc);\r\n fileChooser.setAcceptAllFileFilterUsed(true);\r\n fileChooser.showFileChooser();\r\n if(fileChooser.isFileSelected()){\r\n String fileName = fileChooser.getSelectedFile();\r\n if(fileName != null && !fileName.trim().equals(EMPTY_STRING)){\r\n int index = fileName.lastIndexOf('.');\r\n if(index != -1 && index != fileName.length()){\r\n setFileSelected(true);\r\n awardAddDocumentForm.txtFileName.setText(fileChooser.getFileName().getName());\r\n setBlobData(fileChooser.getFile());\r\n //Added with case 4007: Icon based on mime type\r\n CoeusDocumentUtils docTypeUtils = CoeusDocumentUtils.getInstance();\r\n CoeusAttachmentBean attachmentBean = new CoeusAttachmentBean(fileName,getBlobData());\r\n setMimeType(docTypeUtils.getDocumentMimeType(attachmentBean));\r\n //4007 End\r\n awardAddDocumentForm.btnView.setEnabled(true);\r\n }else{\r\n CoeusOptionPane.showErrorDialog(coeusMessageResources.parseMessageKey(\r\n \"correspType_exceptionCode.1012\"));\r\n setFileSelected(false);\r\n setBlobData(null);\r\n setMimeType(null);//4007\r\n return;\r\n }\r\n }\r\n }\r\n } else if(source.equals(awardAddDocumentForm.btnOk)){\r\n try{\r\n /*Check the function type and awardDocumentBean is null or not*/\r\n if(awardDocumentBean != null){\r\n if(functionType == MODIFY_DOCUMENT){\r\n awardDocumentBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n newVersion = false;\r\n newDocumentId = false;\r\n ComboBoxBean cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n if(!cmbTypeCode.getCode().equals(\"\") && !cmbTypeCode.getDescription().equals(\"\")){\r\n if(awardAddDocumentForm.cmbDocumentType.getSelectedItem() != null\r\n && !awardAddDocumentForm.cmbDocumentType.getSelectedItem().equals(EMPTY_STRING)){\r\n cmbTypeCode =(ComboBoxBean)awardAddDocumentForm.cmbDocumentType.getSelectedItem();\r\n awardDocumentBean.setDocumentTypeCode(Integer.parseInt(cmbTypeCode.getCode()));\r\n awardDocumentBean.setDocumentTypeDescription((awardAddDocumentForm.cmbDocumentType.getSelectedItem().toString()));\r\n docTypeEmpty = false;\r\n }\r\n }\r\n \r\n if(awardAddDocumentForm.txtDescription.getText() != null &&\r\n !awardAddDocumentForm.txtDescription.getText().equals(EMPTY_STRING)){\r\n if(awardAddDocumentForm.txtDescription.getText().length() > 200){\r\n String description = awardAddDocumentForm.txtDescription.getText().substring(0,201);\r\n awardDocumentBean.setDescription(description);\r\n docTypeEmpty = false;\r\n }else{\r\n awardDocumentBean.setDescription(awardAddDocumentForm.txtDescription.getText());\r\n }\r\n }else {\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"awardDocuments_DescDoc_exceptionCode.1115\"));\r\n docTypeEmpty = true;\r\n awardAddDocumentForm.txtDescription.requestFocusInWindow();\r\n return;\r\n }\r\n if(awardAddDocumentForm.txtFileName.getText() != null\r\n && !awardAddDocumentForm.txtFileName.getText().equals(EMPTY_STRING)){\r\n awardDocumentBean.setFileName(awardAddDocumentForm.txtFileName.getText());\r\n docTypeEmpty = false;\r\n }else{\r\n CoeusOptionPane.showInfoDialog(coeusMessageResources.parseMessageKey(\"awardDocuments_AttachDoc_exceptionCode.1113\"));\r\n docTypeEmpty = true;\r\n awardAddDocumentForm.btnUpload.requestFocusInWindow();\r\n return;\r\n }\r\n if(fileSelected && getBlobData() != null){\r\n awardDocumentBean.setDocument(getBlobData());\r\n awardDocumentBean.setMimeType(getMimeType());\r\n }\r\n modifyFormData(awardDocumentBean);\r\n }\r\n } else {\r\n saveFormData();\r\n }\r\n// if(okClicked){\r\n if(isOkClicked() || !docTypeEmpty){\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n }\r\n /* if View, check value for fileSelected,\r\n if true the display the blob data else throw an error msg*/\r\n else if(source.equals(awardAddDocumentForm.btnView)){\r\n if(fileSelected){\r\n try{\r\n viewDocument();\r\n }catch (Exception exception){\r\n exception.printStackTrace();\r\n if(!( exception.getMessage().equals(\r\n coeusMessageResources.parseMessageKey(\r\n \"protoDetFrm_exceptionCode.1130\")) )){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n return;\r\n }\r\n }\r\n }\r\n } else if(source.equals(awardAddDocumentForm.btnCancel)){\r\n dataValuesChanged();\r\n if(dataChanged){\r\n int option = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n JOptionPane.YES_OPTION);\r\n switch(option){\r\n case JOptionPane.YES_OPTION:\r\n try{\r\n if(this.functionType != 'M'){\r\n saveFormData();\r\n } else{\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n if(isOkClicked()){\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }catch(Exception e){\r\n e.printStackTrace();\r\n }\r\n break;\r\n case JOptionPane.NO_OPTION :\r\n dlgAwardUploadDoc.dispose();\r\n break;\r\n default:\r\n \r\n try {\r\n requestDefaultFocusToComp();\r\n } catch (CoeusException ex) {\r\n ex.printStackTrace();\r\n }\r\n break;\r\n }\r\n }else{\r\n dlgAwardUploadDoc.dispose();\r\n }\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n SingleType() {\n this.versions = new FormatVersion[Byte.MAX_VALUE];\n declareVersions();\n Preconditions.checkArgument(this.versions[getWriteVersion()] != null, \"Write version %s is not defined.\", getWriteVersion());\n }", "interface FormatInterface {\n void processing();\n}", "public static void checkFormatSupported(AudioFormat format) {\n\t\tFloatSampleTools.getFormatType(format);\n\t}", "public boolean isPlain() {\n\treturn style == 0;\n }", "default WorkdayEndpointConsumerBuilder format(String format) {\n doSetProperty(\"format\", format);\n return this;\n }", "public static void wrongFileFormat(Command command, String message) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"wrong file type\").replace(\"%format%\", message);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "WithCreate withSourceType(SourceType sourceType);", "private void formatSegmentContent(final TermParserReader p) {\n final TermToken tt = p.current();\n final Token tk = token(tt);\n switch (tt.kind()) { // NOPMD\n case CONTROL:\n p.advance();\n break;\n case IGNORABLE:\n processIgnorable(p, tk);\n break;\n case BLOCK_START:\n space();\n consume(p, Terms.BLOCK_START);\n printControl(\"{\");\n forceNewLine();\n indentLevel++;\n formatBlockContent(p);\n indentLevel--;\n startIndentedLine();\n printControl(\"}\");\n consume(p, Terms.BLOCK_END);\n break;\n default:\n if (tk != null) {\n switch (tk.kind()) {\n case BRACKET:\n print(tk);\n spaceSuppressed = true;\n break;\n case COMMA:\n print(tk);\n break;\n case GRAPHICS:\n if (graphicsWithSuppressedSpace.contains(tk.text())) {\n if (lastPrinted.kind() == Tokens.GRAPHICS) {\n spaceSuppressed = false;\n space();\n }\n print(tk);\n spaceSuppressed = true;\n } else {\n if (lastPrinted.kind() == Tokens.GRAPHICS) {\n spaceSuppressed = false;\n }\n space();\n print(tk);\n }\n break;\n default:\n space();\n print(tk);\n break;\n }\n }\n p.advance();\n break;\n }\n }", "private void browseTemplateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseTemplateActionPerformed\n JFileChooser chooser = new JFileChooser();\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Word document\", new String[]{\"doc\", \"docx\"});\n chooser.setFileFilter(filter);\n chooser.setCurrentDirectory(new java.io.File(\".\"));\n chooser.setDialogTitle(\"Select a file\");\n chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n chooser.setAcceptAllFileFilterUsed(false);\n\n if (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n templateDoc.setText(chooser.getSelectedFile().getPath());\n }\n }", "private String inFormat() {\n File f = cfg.getReadFromFile();\n if (f != null) {\n return \" in format file \" + f.getPath();\n }\n return \" in format \" + StringUtils.defaultString(cfg.getName(), \"(unnamed)\");\n }", "@Test\n public void fieldFormat() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n // Use a document builder to insert a field that displays a result with no format applied.\n Field field = builder.insertField(\"= 2 + 3\");\n\n Assert.assertEquals(\"= 2 + 3\", field.getFieldCode());\n Assert.assertEquals(\"5\", field.getResult());\n\n // We can apply a format to a field's result using the field's properties.\n // Below are three types of formats that we can apply to a field's result.\n // 1 - Numeric format:\n FieldFormat format = field.getFormat();\n format.setNumericFormat(\"$###.00\");\n field.update();\n\n Assert.assertEquals(\"= 2 + 3 \\\\# $###.00\", field.getFieldCode());\n Assert.assertEquals(\"$ 5.00\", field.getResult());\n\n // 2 - Date/time format:\n field = builder.insertField(\"DATE\");\n format = field.getFormat();\n format.setDateTimeFormat(\"dddd, MMMM dd, yyyy\");\n field.update();\n\n Assert.assertEquals(\"DATE \\\\@ \\\"dddd, MMMM dd, yyyy\\\"\", field.getFieldCode());\n System.out.println(\"Today's date, in {format.DateTimeFormat} format:\\n\\t{field.Result}\");\n\n // 3 - General format:\n field = builder.insertField(\"= 25 + 33\");\n format = field.getFormat();\n format.getGeneralFormats().add(GeneralFormat.LOWERCASE_ROMAN);\n format.getGeneralFormats().add(GeneralFormat.UPPER);\n field.update();\n\n int index = 0;\n Iterator<Integer> generalFormatEnumerator = format.getGeneralFormats().iterator();\n while (generalFormatEnumerator.hasNext()) {\n int value = generalFormatEnumerator.next();\n System.out.println(MessageFormat.format(\"General format index {0}: {1}\", index++, value));\n }\n\n\n Assert.assertEquals(\"= 25 + 33 \\\\* roman \\\\* Upper\", field.getFieldCode());\n Assert.assertEquals(\"LVIII\", field.getResult());\n Assert.assertEquals(2, format.getGeneralFormats().getCount());\n Assert.assertEquals(GeneralFormat.LOWERCASE_ROMAN, format.getGeneralFormats().get(0));\n\n // We can remove our formats to revert the field's result to its original form.\n format.getGeneralFormats().remove(GeneralFormat.LOWERCASE_ROMAN);\n format.getGeneralFormats().removeAt(0);\n Assert.assertEquals(0, format.getGeneralFormats().getCount());\n field.update();\n\n Assert.assertEquals(\"= 25 + 33 \", field.getFieldCode());\n Assert.assertEquals(\"58\", field.getResult());\n Assert.assertEquals(0, format.getGeneralFormats().getCount());\n //ExEnd\n }" ]
[ "0.60237247", "0.5617843", "0.54317623", "0.5430402", "0.5369889", "0.5364081", "0.534664", "0.53422683", "0.5327705", "0.53220576", "0.53135127", "0.52969563", "0.52007097", "0.5168228", "0.51574475", "0.5122699", "0.50587976", "0.5041113", "0.503915", "0.5026683", "0.50226325", "0.50198054", "0.5016398", "0.5010874", "0.5008037", "0.4995133", "0.49876627", "0.49824587", "0.49418032", "0.49356455", "0.4930701", "0.49268433", "0.49253824", "0.49253824", "0.49253824", "0.49247184", "0.4918733", "0.49082512", "0.49025694", "0.48905143", "0.48697937", "0.4850388", "0.48451304", "0.48438063", "0.48336855", "0.48269016", "0.48142612", "0.48041114", "0.47863054", "0.47767156", "0.47555575", "0.47506663", "0.47486994", "0.4739722", "0.47377184", "0.47373217", "0.47283554", "0.4719044", "0.4709817", "0.4704903", "0.47033054", "0.4702537", "0.47019306", "0.4697949", "0.469065", "0.46745148", "0.46684137", "0.4652365", "0.4640149", "0.46395904", "0.4636917", "0.46319515", "0.46318662", "0.46257544", "0.46168345", "0.4613967", "0.46125913", "0.4601766", "0.4601766", "0.458693", "0.45859224", "0.45820662", "0.4577943", "0.45770055", "0.4560368", "0.4557838", "0.45570064", "0.45461035", "0.4545131", "0.45450428", "0.4537435", "0.45333466", "0.45312163", "0.4530906", "0.4520123", "0.45192343", "0.45180228", "0.45146337", "0.45044652", "0.45019704", "0.45001486" ]
0.0
-1
Supporting method that is used to make sure that the selection is appropriate for this action command.
protected boolean selectionIsAppropriate(Element selection) { return selection.getName().equals(FormatType.EMPTY.getElementName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void selectionChanged(IAction action, ISelection selection) {\n }", "@Override\n\tpublic void selectionChanged(IAction action, ISelection selection) {\n\t}", "public void selected(String action);", "private void checkSelection() {\n \t\tboolean oldIsSelection = isSelection;\n \t\tisSelection = text.getSelectionCount() > 0;\n \t\tif (oldIsSelection != isSelection) {\n \t\t\tfireEnablementChanged(COPY);\n \t\t\tfireEnablementChanged(CUT);\n \t\t}\n \t}", "@Override\r\n\tpublic void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "@Override\n\tpublic void selectionChanged(IAction arg0, ISelection arg1) {\n\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "boolean applicable(Selection selection);", "public void toSelectingAction() {\n }", "protected void onSelectionPerformed(boolean success) {\n }", "public abstract boolean hasSelection();", "public void selectionChanged(IAction action, ISelection selection) {\n }", "public void selectionChanged(IAction action, ISelection selection) {\n\t\t\r\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\t}", "public boolean isSelectingAction() {\n return false;\n }", "@Test\n\tpublic void argumentTest() {\n\t\tSelectionController selectionController = new SelectionController();\n\t\ttry {\n\t\t\tselectionController.select(null);\n\t\t\tAssert.fail(\"The new selection was null\");\n\t\t} catch (NullPointerException e) {\n\t\t}\n\n\t\ttry {\n\t\t\tselectionController.unselect(null);\n\t\t\tAssert.fail(\"The new unselection was null\");\n\t\t} catch (NullPointerException e) {\n\t\t}\n\n\t\ttry {\n\t\t\tselectionController.reselect(null);\n\t\t\tAssert.fail(\"The new reselection was null\");\n\t\t} catch (NullPointerException e) {\n\t\t}\n\t}", "public void alertSelection() {\n JOptionPane.showMessageDialog(gui.getFrame(),\n \"`Please select a choice.\",\n \"Invalid Selection Error\",\n JOptionPane.ERROR_MESSAGE);\n }", "public boolean canSelectionChange() {\n return true;\n }", "public void setButtonSelection(String action);", "private boolean performAction(int action) {\n TagEditorFragment tagEditorFragment = (TagEditorFragment) caller;\n final int size = rows.getChildCount();\n List<TagEditRow> selected = new ArrayList<>();\n for (int i = 0; i < size; ++i) {\n View view = rows.getChildAt(i);\n TagEditRow row = (TagEditRow) view;\n if (row.isSelected()) {\n selected.add(row);\n }\n }\n switch (action) {\n case MENU_ITEM_DELETE:\n if (!selected.isEmpty()) {\n for (TagEditRow r : selected) {\n r.delete();\n }\n tagEditorFragment.updateAutocompletePresetItem(null);\n }\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_COPY:\n copyTags(selected, false);\n tagEditorFragment.updateAutocompletePresetItem(null);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CUT:\n copyTags(selected, true);\n if (currentAction != null) {\n currentAction.finish();\n }\n break;\n case MENU_ITEM_CREATE_PRESET:\n CustomPreset.create(tagEditorFragment, selected);\n tagEditorFragment.presetFilterUpdate.update(null);\n break;\n case MENU_ITEM_SELECT_ALL:\n ((PropertyRows) caller).selectAllRows();\n return true;\n case MENU_ITEM_DESELECT_ALL:\n ((PropertyRows) caller).deselectAllRows();\n return true;\n case MENU_ITEM_HELP:\n HelpViewer.start(caller.getActivity(), R.string.help_propertyeditor);\n return true;\n default:\n return false;\n }\n return true;\n }", "public void selectionChanged(Action item);", "public void actionPerformed(ActionEvent ae) {\n rb_selection = ae.getActionCommand(); \t \n }", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "public boolean forceSelection();", "public void updateSelection() {\n\t\t\n\t}", "@Override\n protected void updateModelFromUi(@Nullable Selection<DataType> selection) {\n try {\n selection.setSelected(theCheckBox.isChecked());\n Logger.debug(\"Updated selection: \" + selection.toString());\n\n } catch (Exception e) {\n Logger.error(\"Failed to update selection\", e);\n }\n }", "public void selectPressed() {\n\t\tif (edit) {\n\t\t\tdisplayCardHelp = !displayCardHelp;\n\t\t} else {\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_ERROR);\n\t\t}\n\t}", "abstract public void cabMultiselectPrimaryAction();", "protected void handleInvalidSelection(org.eclipse.jface.viewers.ISelection selection, org.eclipse.jface.viewers.ISelection newSelection) {\n\t}", "public void validateSelection()\r\n {\r\n for (int i = 0; i<getSelectedElements().size(); ++i)\r\n {\r\n ReportElement re = (ReportElement)getSelectedElements().elementAt(i);\r\n if (!getCrosstabElement().getElements().contains( re ))\r\n {\r\n getSelectedElements().remove(re);\r\n --i;\r\n }\r\n }\r\n // UPDATE SELECTION NOW!!!\r\n }", "@VisibleForTesting\n protected void applyProvisionalSelection() {\n mSelection.addAll(mProvisionalSelection);\n mProvisionalSelection.clear();\n }", "public void selectionChanged(IAction action, ISelection selection) {\r\n\t\tIStructuredSelection structuredSelection = \r\n\t\t\t(IStructuredSelection) selection;\r\n\t\tif(structuredSelection.getFirstElement() instanceof DiagramEditPart \r\n\t\t\t\t&& structuredSelection.getFirstElement() \r\n\t\t\t\tinstanceof OEPCEditPart){\r\n\t\t\tselectedElement = \r\n\t\t\t\t(OEPCEditPart) structuredSelection.getFirstElement();\r\n\t\t}\r\n\t}", "public boolean canHandle(Object selection);", "@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }", "@Override\r\n\tpublic boolean forceSelection() {\r\n\t\treturn false;\r\n\t}", "protected void ACTION_B_SELECT(ActionEvent arg0) {\n\t\tchoseInterface();\r\n\t}", "public void compareSelectionAction(QuantSearchSelection selection) {\n this.quantSearchSelection = selection;\n SelectionChanged(\"quant_compare\");\n\n }", "public String verifySelection() {\n\t\tList<TransactionType> selections = transactionTypes(selections2());\n\t\tif (selections.isEmpty())\n\t\t\treturn \"Site must be selected\";\n\t\tif (!couplings.hasCouplings())\n\t\t\treturn null;\n\t\tif (selections.size() == 1)\n\t\t\tif (couplings.from() == selections.get(0))\n\t\t\t\treturn ActorType.getActorType(couplings.from()).getName() + \" is selected so \" + ActorType.getActorType(couplings.to()).getName() + \" must be selected\";\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "@Override\n public void selectionChanged(SelectionChangedEvent event) {\n Iterator<String> iterator = selectionActions.iterator();\n while (iterator.hasNext()) {\n updateAction(iterator.next());\n }\n }", "public boolean isSelectionToolAllowedToChangeResourceType() {\n\treturn true;\n}", "@Override\r\n\tpublic void setSelection(List<EObject> selection) {\r\n\t\tthis.selection = selection;\r\n\t\tthis.refactoringProcessor = \r\n\t\t\t\tnew InternalRefactoringProcessor(this.selection);\r\n\t}", "public void approveSelection(){\n\t\t\t\tFile file=getSelectedFile();\n\t\t\t\tSupportedImageFilesFilter filter=new SupportedImageFilesFilter();\n\t\t\t\tif (file.exists() && filter.accept(file)) \n\t\t\t\t\tsuper.approveSelection(); \n\t\t\t\telse \n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"The selected file is not supported or does not exist!\", \"Error\", JOptionPane.ERROR_MESSAGE); \n\t\t\t}", "protected abstract void doSelection() throws IOException;", "@Override\r\n public Command requestCommand() \r\n {\r\n while (!GameFrame.gameDisplay.selectionMade())\r\n {\r\n //System.out.println();\r\n Thread.yield();\r\n }\r\n \r\n Command command = GameFrame.gameDisplay.getSelection();\r\n GameFrame.gameDisplay.resetSelection();\r\n return command;\r\n }", "public void select(int action) {\n\t\tselected = true;\n\t\tthis.action = action;\n\t}", "@Override\r\n\tprotected void onOkSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Ok button implementation\");\r\n\t}", "@Override\n public void selectionChanged(JavaTextSelection selection) {\n try {\n setEnabled(RefactoringAvailabilityTester.isGeneralizeTypeAvailable(selection));\n } catch (JavaModelException e) {\n setEnabled(false);\n }\n }", "public void beginSelection()\n {\n\tisMultiSelection = true;\n\tsetMaxCheckCount(-1);\n }", "public void actionPerformed(ActionEvent event) {\n/* 269 */ String command = event.getActionCommand();\n/* 270 */ if (command.equals(\"GridStroke\")) {\n/* 271 */ attemptGridStrokeSelection();\n/* */ }\n/* 273 */ else if (command.equals(\"GridPaint\")) {\n/* 274 */ attemptGridPaintSelection();\n/* */ }\n/* 276 */ else if (command.equals(\"AutoRangeOnOff\")) {\n/* 277 */ toggleAutoRange();\n/* */ }\n/* 279 */ else if (command.equals(\"MinimumRange\")) {\n/* 280 */ validateMinimum();\n/* */ }\n/* 282 */ else if (command.equals(\"MaximumRange\")) {\n/* 283 */ validateMaximum();\n/* */ }\n/* 285 */ else if (command.equals(\"AutoTickOnOff\")) {\n/* 286 */ toggleAutoTick();\n/* */ }\n/* */ else {\n/* */ \n/* 290 */ super.actionPerformed(event);\n/* */ } \n/* */ }", "@Override\r\n\tpublic boolean isChosen() {\n\t\treturn false;\r\n\t}", "@DISPID(200)\r\n public void selectionChanged() {\r\n throw new UnsupportedOperationException();\r\n }", "public void selectionChanged(GraphSelectionEvent gse) {\n if (!updatingSelection) {\n updatingSelection = true;\n List<Fig> selections = gse.getSelections();\n ActionCut.getInstance().setEnabled(\n selections != null && !selections.isEmpty());\n\n // TODO: If ActionCopy is no longer a singleton, how shall\n // this work?\n ActionCopy.getInstance()\n .setEnabled(selections != null && !selections.isEmpty());\n /*\n * ActionPaste.getInstance().setEnabled( Globals.clipBoard\n * != null && !Globals.clipBoard.isEmpty());\n */\n // the old selection\n Collection currentSelection =\n TargetManager.getInstance().getTargets();\n\n List removedTargets = new ArrayList(currentSelection);\n List addedTargets = new ArrayList();\n for (Object selection : selections) {\n Object owner = TargetManager.getInstance().getOwner(selection);\n if (currentSelection.contains(owner)) {\n removedTargets.remove(owner); // remains selected\n } else {\n // add to selection\n addedTargets.add(owner);\n }\n }\n if (addedTargets.size() == 1\n && removedTargets.size() == currentSelection.size()) {\n // Optimize for the normal case to minimize target changes\n TargetManager.getInstance().setTarget(addedTargets.get(0));\n } else {\n for (Object o : removedTargets) {\n TargetManager.getInstance().removeTarget(o);\n }\n for (Object o : addedTargets) {\n TargetManager.getInstance().addTarget(o);\n }\n }\n updatingSelection = false;\n }\n\n }", "boolean beforeMasterSelectionChange();", "public void cmdOk() {\n\n\t\tif (!m_actionscombo.isValueInModel()) {\n\t\t\tString msg = I18N.getLocalizedMessage(\"Invalid Action Name\");\n\t\t\tString title = I18N.getLocalizedMessage(\"Error\");\n\t\t\tJOptionPane.showMessageDialog(null, msg, title, JOptionPane.ERROR_MESSAGE);\n\t\t} else\n\t\t\tsuper.cmdOk();\n\t}", "@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendInstruction(message);\n\t\tString selected = this.getResponse();\n\t\treturn TurnAction.valueOf(selected);\n\t}", "@Override\r\n\t\t\tpublic void seleccionar() {\n\r\n\t\t\t}", "@Override\n protected void processSelect() {\n \n }", "public void chooseOptionAssignToOnBulkActionsDropDown() {\n getLogger().info(\"Choose option: Assign to.\");\n clickElement(optionAssignTo, \"Assign To Option\");\n }", "private void doSelect(MouseEvent e) {\n if (e != null && e.getClickCount() > 1)\n doOK();\n }", "public void approveSelection()\r\n/* 24: */ {\r\n/* 25:23 */ if ((!getFileFilter().accept(getSelectedFile())) && \r\n/* 26:24 */ ((getFileFilter() instanceof FileNameExtensionFilter)))\r\n/* 27: */ {\r\n/* 28:25 */ String[] extensions = ((FileNameExtensionFilter)getFileFilter()).getExtensions();\r\n/* 29:26 */ String ext = extensions.length > 0 ? extensions[0] : \"\";\r\n/* 30:27 */ setSelectedFile(new File(getSelectedFile().getAbsolutePath() + ((ext == null) || (ext.length() == 0) ? \"\" : new StringBuilder().append(\".\").append(ext).toString())));\r\n/* 31: */ }\r\n/* 32:32 */ File f = getSelectedFile();\r\n/* 33:33 */ if ((f.exists()) && (getDialogType() == 1))\r\n/* 34: */ {\r\n/* 35:34 */ int result = JOptionPane.showConfirmDialog(this, \"Are you sure you want to override existing file?\", \"Existing file\", 1, 3);\r\n/* 36:40 */ switch (result)\r\n/* 37: */ {\r\n/* 38: */ case 0: \r\n/* 39:42 */ super.approveSelection();\r\n/* 40:43 */ return;\r\n/* 41: */ case 2: \r\n/* 42:45 */ cancelSelection();\r\n/* 43:46 */ return;\r\n/* 44: */ }\r\n/* 45:48 */ return;\r\n/* 46: */ }\r\n/* 47:51 */ super.approveSelection();\r\n/* 48: */ }", "public void actionPerformed(ActionEvent e) {\n Object source = e.getSource();\n GSelection<Variant> sel = viewer.getSelection();\n Variant v = sel.isEmpty() ? null : sel.first();\n\n ImOption.apply(viewer.getModel()).foreach(schedule -> {\n\n // Force a repaint of the action if it's a button. This is an AWT bug.\n if (source instanceof JButton)\n ((JButton) source).repaint();\n\n if (source == add) {\n\n // Add a new variant. Selection will not change but position might.\n VariantEditor ve = new VariantEditor(context.getShell().getPeer());\n if (JOptionPane.CANCEL_OPTION != ve.showNew(\"Untitled\", (byte) 0, (byte) 0, (byte) 0))\n schedule.addVariant(ve.getVariantName(), ve.getVariantConditions(), ve.getVariantWindConstraint(), ve.getVariantLgsConstraint());\n setUpDownEnabledState(sel);\n\n } else if (source == del) {\n\n // Delete the selected variant. Selection will change.\n if (JOptionPane.NO_OPTION == JOptionPane.showConfirmDialog(context.getShell().getPeer(),\n \"Do you really want to remove this variant?\",\n \"Confirm Remove\", JOptionPane.YES_NO_OPTION))\n return;\n\n schedule.removeVariant(v);\n\n } else if (source == up) {\n\n // Move up. Selection will not change but position will.\n schedule.moveVariant(v, -1);\n setUpDownEnabledState(sel);\n\n } else if (source == down) {\n\n // Move down. Selection will not change but position will.\n schedule.moveVariant(v, 1);\n setUpDownEnabledState(sel);\n\n } else if (source == dup) {\n\n // Duplicate. Selection will not change but position might.\n Variant dup = schedule.duplicateVariant(v);\n dup.setName(\"Copy of \" + dup.getName());\n setUpDownEnabledState(sel);\n\n }\n });\n }", "public void buildSelectedAction() {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (!selectedItems.isEmpty()) {\n\t\t\tnavigationController.clickProgress();\n\t\t\tprojectService.build(selectedItems, false);\n\t\t}\n\t}", "private SelectOSAction() {\r\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n state = \"select\";\r\n instruction.setText(\"Drag the rectangle to cover the whole shape which you want to select\");\r\n\r\n }", "public void searchSelectionAction(QuantSearchSelection selection) {\n this.quantSearchSelection = selection;\n SelectionChanged(\"quant_searching\");\n\n }", "@Test\n\tpublic void furtherSelectionTest() {\n\t\tSelectionController selectionController = new SelectionController();\n\t\tint[] selection = { 1, 2, 3, 4, 5, 6 };\n\t\tint[] unSelecion = { 1, 2, 3 };\n\t\tint[] resultSelection = { 4, 5, 6 };\n\t\tint[] negativeSelection = { -1 };\n\n\t\t// select something and unselect parts of it\n\t\tselectionController.select(selection);\n\t\tassertArrayEquals(\"Selection was different\", selection, selectionController.getSelection());\n\t\tselectionController.unselect(unSelecion);\n\t\tassertArrayEquals(\"Selection was different after unselection\", resultSelection,\n\t\t\t\tselectionController.getSelection());\n\n\t\t// do a reselection\n\t\tselectionController.reselect(unSelecion);\n\t\tassertArrayEquals(\"Selection was different after reselection\", unSelecion, selectionController.getSelection());\n\n\t\tassertTrue(\"Item 1 is selected\", selectionController.isSelected(1));\n\t\tassertTrue(\"Item 2 is selected\", selectionController.isSelected(2));\n\t\tassertTrue(\"Item 3 is selected\", selectionController.isSelected(3));\n\t\tassertFalse(\"Item 4 is not selected\", selectionController.isSelected(4));\n\t\tassertFalse(\"Item 5 is not selected\", selectionController.isSelected(5));\n\t\tassertFalse(\"Item 6 is not selected\", selectionController.isSelected(6));\n\n\t\t// unselect all elements\n\t\tselectionController.unselect(unSelecion);\n\t\tassertFalse(\"Nothing was selected\", selectionController.isSomethingSelected());\n\t\tassertEquals(\"The array should have length zero\", 0, selectionController.getSelection().length);\n\n\t\t// select something negative\n\t\tselectionController.select(negativeSelection);\n\t\tassertFalse(\"Nothing should be selected\", selectionController.isSomethingSelected());\n\t\tassertEquals(\"The array should have length zero after selection\", 0, selectionController.getSelection().length);\n\n\t\t// reselect something negative\n\t\tselectionController.select(selection);\n\t\tselectionController.reselect(negativeSelection);\n\t\tassertFalse(\"Nothing should be reselected\", selectionController.isSomethingSelected());\n\t\tassertEquals(\"The array should have length zero after reselection\", 0,\n\t\t\t\tselectionController.getSelection().length);\n\n\t}", "@MediumTest\n @Feature({ \"TextSelection\" })\n public void testEditableSelectionActionBar() throws Throwable {\n doSelectionActionBarTest(TestPageType.EDITABLE);\n }", "private void checkSelectable() {\n \t\tboolean oldIsSelectable = isSelectable;\n \t\tisSelectable = isSelectAllEnabled();\n \t\tif (oldIsSelectable != isSelectable) {\n \t\t\tfireEnablementChanged(SELECT_ALL);\n \t\t}\n \t}", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n int id = item.getItemId();\n //use switch condition\n switch (id){\n case R.id.select_delete:\n //when click delete\n //use for loop\n for (NoteEntity noteSelect :selectList) {\n //remove select item from list\n list.remove(noteSelect);\n mainViewModel.deleteById(noteSelect.getId());\n }\n //check condition\n if (list.size()==0){\n //when list is empty\n //visible text view\n tvEmpty.setVisibility(View.VISIBLE);\n }\n mode.finish();\n break;\n case R.id.select_all:\n //when click on select all\n //check condition\n if (selectList.size() == list.size()){\n //when all item selected\n //set isSelectAll false\n isSelectAll = false;\n //clear select list\n selectList.clear();\n }else {\n //when all item unselected\n //set isSelectAll true\n isSelectAll = true;\n //clear list\n selectList.clear();\n //add all values in select list\n selectList.addAll(list);\n }\n //set text in view mode\n mainViewModel.setSelectedLiveData(String.valueOf(selectList.size()));\n //notify adaptor\n notifyDataSetChanged();\n break;\n }\n return true;\n }", "public boolean isSelectionChanged();", "protected abstract boolean takeAction (Shape selected, int x, int y);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent actionevent) {\n\t\t\t\tif (select.isSelected()) {\r\n\t\t\t\t\tservice.selectTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tservice.cancleTask(row);\r\n\t\t\t\t\t// service.getTask(row).setSelected(false);\r\n\t\t\t\t}\r\n\t\t\t\t// System.out.println(\"after: \" + service.getSelectedSet());\r\n\r\n\t\t\t}", "public void setSelection(Pair selection);", "@Override\r\n\tprotected void onCancelActionSelection(SelectionEvent e) {\n\t\tSystem.out.println(\"Cancel button implementation\");\r\n\t}", "@Override\n public void selectionChanged(IAction action, ISelection selection) {\n if (selection != null) {\n action.setEnabled(true);\n return;\n }\n IJavaElement javaElement = JavaEditorUtils.getCurrentSelectedJaveElement();\n if (JavaEditorUtils.isJavaElementSupported(javaElement) == true) {\n action.setEnabled(true);\n return;\n }\n action.setEnabled(false);\n }", "@Override\n protected void setUpPerformAction(ListenerIdentifier id)\n {\n super.setUpPerformAction(id);\n\n int selectionMask = canIDCauseSelection(id);\n\n if (isSelectionFlagSet(selectionMask,\n CogToolLID.CAUSES_WIDGET_SELECTION))\n {\n delayedWidgetSelection.setActive(true);\n }\n\n if (id == FrameEditorLID.Reorder) {\n delayedRepainting.requestRepaint(SHAPE_CHANGE_REPAINT);\n }\n }", "@Test\n\tpublic void testApplyToOptions_SetEquate_Selection() {\n\n\t\t// put the cursor on a scalar\n\t\tputCursorOnOperand(0x1004bbd, 0);\n\n\t\t// make a selection containing the scalar above.\n\t\tmakeSelection(tool, program, addr(\"1004bbd\"), addr(\"1004bc5\"));\n\n\t\tSetEquateDialog d = showSetEquateDialog();\n\n\t\tJRadioButton applyToCurrentButton =\n\t\t\t(JRadioButton) findComponentByName(d.getComponent(), \"applyToCurrent\");\n\t\tfinal JRadioButton applyToSelectionButton =\n\t\t\t(JRadioButton) findComponentByName(d.getComponent(), \"applyToSelection\");\n\t\tfinal JRadioButton applyToAllButton =\n\t\t\t(JRadioButton) findComponentByName(d.getComponent(), \"applyToAll\");\n\t\tJCheckBox overwriteExistingEquatesButton =\n\t\t\t(JCheckBox) findComponentByName(d.getComponent(), \"Overwrite\");\n\n\t\t//change as of 7.0 - dialog should come up with \"current location\" enabled.\n\t\tassertNotNull(applyToCurrentButton);\n\t\tassertTrue(applyToCurrentButton.isEnabled());\n\t\tassertFalse(applyToCurrentButton.isSelected());\n\n\t\t//have selection in this case so should be enabled but not selected\n\t\tassertNotNull(applyToSelectionButton);\n\t\tassertTrue(applyToSelectionButton.isEnabled());\n\t\tassertTrue(applyToSelectionButton.isSelected());\n\n\t\t//entire program should be enabled but not selected\n\t\tassertNotNull(applyToAllButton);\n\t\tassertTrue(applyToAllButton.isEnabled());\n\t\tassertFalse(applyToAllButton.isSelected());\n\n\t\t//overwrite existing should be visible and enabled, but not selected\n\t\tassertTrue(overwriteExistingEquatesButton.isVisible());\n\t\tassertTrue(overwriteExistingEquatesButton.isEnabled());\n\t\tassertFalse(overwriteExistingEquatesButton.isSelected());\n\n\t\t//select applyToSelection and verify that the other buttons respond accordingly\n\t\tapplyToSelectionButton.setSelected(true);\n\t\trunSwing(\n\t\t\t() -> applyToSelectionButton.getActionListeners()[0].actionPerformed(null));\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tassertFalse(applyToAllButton.isSelected());\n\t\tassertFalse(applyToCurrentButton.isSelected());\n\t\tassertTrue(applyToSelectionButton.isSelected());\n\t\tassertTrue(overwriteExistingEquatesButton.isEnabled());\n\t\tassertFalse(overwriteExistingEquatesButton.isSelected());\n\n\t\tclose(d);\n\t}", "protected void checkSelectGesture(GraphicsNodeEvent evt) {\n\n\t\tGraphicsNodeMouseEvent mevt = null;\n\t\tif (evt instanceof GraphicsNodeMouseEvent) {\n\t\t\tmevt = (GraphicsNodeMouseEvent) evt;\n\t\t}\n\n\t\tGraphicsNode source = evt.getGraphicsNode();\n\t\tif (isDeselectGesture(evt)) {\n\t\t\tif (selectionNode != null) {\n\t\t\t\tselectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);\n\t\t\t}\n\t\t\tclearSelection();\n\t\t} else if (mevt != null) {\n\n\t\t\tPoint2D p = mevt.getPoint2D();\n\n\t\t\tif ((source instanceof Selectable) && (isSelectStartGesture(evt))) {\n\t\t\t\tif (selectionNode != source) {\n\t\t\t\t\tif (selectionNode != null) {\n\t\t\t\t\t\tselectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t\tselectionNode = source;\n\t\t\t\t\tif (source != null) {\n\t\t\t\t\t\tselectionNodeRoot = source.getRoot();\n\t\t\t\t\t\tselectionNodeRoot.addTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t((Selectable) source).selectAt(p.getX(), p.getY());\n\t\t\t\tdispatchSelectionEvent(new SelectionEvent(null, SelectionEvent.SELECTION_STARTED, null));\n\n\t\t\t} else if (isSelectEndGesture(evt)) {\n\t\t\t\tif (selectionNode == source) {\n\t\t\t\t\t((Selectable) source).selectTo(p.getX(), p.getY());\n\t\t\t\t}\n\t\t\t\tObject oldSelection = getSelection();\n\t\t\t\tif (selectionNode != null) {\n\t\t\t\t\tShape newShape;\n\t\t\t\t\tnewShape = ((Selectable) selectionNode).getHighlightShape();\n\t\t\t\t\tdispatchSelectionEvent(new SelectionEvent(oldSelection, SelectionEvent.SELECTION_DONE, newShape));\n\t\t\t\t}\n\t\t\t} else if (isSelectContinueGesture(evt)) {\n\n\t\t\t\tif (selectionNode == source) {\n\t\t\t\t\tboolean result = ((Selectable) source).selectTo(p.getX(), p.getY());\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\tShape newShape = ((Selectable) selectionNode).getHighlightShape();\n\n\t\t\t\t\t\tdispatchSelectionEvent(new SelectionEvent(null, SelectionEvent.SELECTION_CHANGED, newShape));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ((source instanceof Selectable) && (isSelectAllGesture(evt))) {\n\t\t\t\tif (selectionNode != source) {\n\t\t\t\t\tif (selectionNode != null) {\n\t\t\t\t\t\tselectionNodeRoot.removeTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t\tselectionNode = source;\n\t\t\t\t\tif (source != null) {\n\t\t\t\t\t\tselectionNodeRoot = source.getRoot();\n\t\t\t\t\t\tselectionNodeRoot.addTreeGraphicsNodeChangeListener(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t((Selectable) source).selectAll(p.getX(), p.getY());\n\t\t\t\tObject oldSelection = getSelection();\n\t\t\t\tShape newShape = ((Selectable) source).getHighlightShape();\n\t\t\t\tdispatchSelectionEvent(new SelectionEvent(oldSelection, SelectionEvent.SELECTION_DONE, newShape));\n\t\t\t}\n\t\t}\n\t}", "@MediumTest\n @Feature({ \"TextSelection\" })\n public void testNoneditableSelectionActionBar() throws Throwable {\n doSelectionActionBarTest(TestPageType.NONEDITABLE);\n }", "public void onSelectionChanged();", "public static void menuActions(int selection){\n\t\tselection = 1;\n\t\tswitch (selection){\n\t\t\tcase 1: //prompt user to input a new record, save response.\n\t\t\t\t//call method addNew here\n\t\t\tbreak; \n\t\t\tcase 2: //prompt user to search using first, last, or telephone\n\t\t\t//call method to search\n\t\t\t//display results\n\t\t\t//if multiple, select which to delete\n\t\t\t//call method for arraylist to delete \n\t\t\tbreak;\n\t\t\tcase 3: //prompt user to search by telephone\n\t\t\t//call method to search by #\n\t\t\t//display results\n\t\t\tbreak;\n\t\t\tcase 4: //prompt user to search by first name\n\t\t\t//call method to search by firstName\n\t\t\t//display results\n\t\t\tbreak;\n\t\t\tcase 5: //prompt user to search by last name\n\t\t\t//call method to search by LastName\n\t\t\t//display results\n\t\t\tbreak;\n\t\t\tcase 6: //prompt user to search by methods 1,2, or 3\n\t\t\t//call method to search\n\t\t\t//display results\n\t\t\t//verify selection with user\n\t\t\t//prompt user to replace input\n\t\t\tbreak;\n\t\t\tcase 7: //terminate program;\n\t\t\tSystem.exit(0);\n\t\t\tbreak;\n\t\t\tdefault: \n\t\t\tSystem.out.print(\"Please enter a valid selection (1-7)\");\n\t\t\t//call userForm to prompt a new menu box;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void testStyleWhenSelectionIsInsideText()\n {\n deferTest(new Command()\n {\n public void execute()\n {\n doTestStyleWhenSelectionIsInsideText();\n }\n });\n }", "@Override\n public boolean onSelection(MaterialDialog dialog, View view, int which, CharSequence text) {\n\n return true;\n }", "@Override\n protected void processUnselect() {\n \n }", "@Override\n\tpublic boolean isDropOk () {\n\t\treturn isAllowed ( selectedAttribute ) ;\n\t}", "public abstract void pickUp();", "@VisibleForTesting\n void cancelProvisionalSelection() {\n mProvisionalSelection.clear();\n }", "@Test\r\n\tpublic void testButtonPressedSafety() {\r\n\t\tSelectionButton button = vend.getSelectionButton(0);\r\n\t\tvend.enableSafety();\r\n\t\tbutton.press();\r\n\t\tassertTrue(vend.getDeliveryChute().removeItems().length==0);\r\n\t}", "public void updateSelectionMode() {\n final int numSelected = getSelectedCount();\n if ((numSelected == 0) || mDisableCab || !isViewCreated()) {\n finishSelectionMode();\n return;\n }\n if (isInSelectionMode()) {\n updateSelectionModeView();\n } else {\n mLastSelectionModeCallback = new SelectionModeCallback();\n getActivity().startActionMode(mLastSelectionModeCallback);\n }\n }", "private static void OnQueryStatusCorrectionList(Object target, CanExecuteRoutedEventArgs args) \r\n {\r\n TextEditor This = TextEditor._GetTextEditor(target); \r\n\r\n if (This == null)\r\n {\r\n return; \r\n }\r\n\r\n if (This.TextStore != null) \r\n {\r\n // Don't do actual reconversion, it just checks if the current selection is reconvertable. \r\n args.CanExecute = This.TextStore.QueryRangeOrReconvertSelection( /*fDoReconvert:*/ false);\r\n }\r\n else\r\n { \r\n // If there is no textstore, this command is not enabled.\r\n args.CanExecute = false; \r\n } \r\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent evt){\r\n\t\t//TODO if scenario => is editing && is moving\r\n\t\t//TODO get selected entity\r\n\t\t//TODO if selected entity != null\r\n\t\t//TODO scale selected entity by scaleFactor\r\n\t}", "public void widgetSelected(SelectionEvent e) {\n\t\tif (getSelection().size()<1) {\n\t\t\tsetErrorMessage(\"Please select one or more automata.\");\n\t\t\tsetPageComplete(false);\n\t\t} else {\n\t\t\tsetErrorMessage(null);\n\t\t\tsetPageComplete(true);\n\t\t}\n\t}", "void afterMasterSelectionChange();", "Guard getSelectguard();", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new ValidTarget());\n }", "protected abstract Optional<T> getSingleSelection();", "protected void attemptGridStrokeSelection() {\n/* 298 */ StrokeChooserPanel panel = new StrokeChooserPanel(this.gridStrokeSample, this.availableStrokeSamples);\n/* */ \n/* 300 */ int result = JOptionPane.showConfirmDialog(this, panel, localizationResources\n/* 301 */ .getString(\"Stroke_Selection\"), 2, -1);\n/* */ \n/* */ \n/* 304 */ if (result == 0) {\n/* 305 */ this.gridStrokeSample.setStroke(panel.getSelectedStroke());\n/* */ }\n/* */ }" ]
[ "0.667187", "0.66663164", "0.6634586", "0.6631937", "0.66159236", "0.6562563", "0.65611786", "0.65611786", "0.6538023", "0.6514697", "0.6513967", "0.6511908", "0.64908767", "0.6461356", "0.64515114", "0.63387233", "0.6334562", "0.6321056", "0.62352407", "0.6150331", "0.61298925", "0.6121586", "0.6111022", "0.6105169", "0.6089339", "0.6070321", "0.6066865", "0.606193", "0.6045867", "0.6039776", "0.6024404", "0.6024208", "0.6005333", "0.59928954", "0.5992874", "0.59902364", "0.598819", "0.59839135", "0.59681386", "0.5967341", "0.5967341", "0.5957449", "0.5952286", "0.5905575", "0.59047526", "0.59038943", "0.5903276", "0.5847416", "0.58412486", "0.58366275", "0.581305", "0.58114296", "0.5810356", "0.5805955", "0.57920676", "0.5782907", "0.5770361", "0.57513785", "0.57414174", "0.5740022", "0.5735172", "0.5729845", "0.5718608", "0.56932104", "0.56805986", "0.56763625", "0.5648543", "0.56470716", "0.5633972", "0.5632218", "0.56311774", "0.5629291", "0.5626445", "0.56206065", "0.56205827", "0.56079674", "0.5597423", "0.55937314", "0.5583087", "0.55737954", "0.55667496", "0.5565991", "0.5564634", "0.55577654", "0.55520374", "0.55476755", "0.553758", "0.553679", "0.5533126", "0.5531967", "0.5531921", "0.55296624", "0.55291927", "0.5524805", "0.55206376", "0.5509994", "0.55028766", "0.55015147", "0.54986835", "0.5493966" ]
0.6259914
18
Determines whether the given element can be replaced by the required type of format without causing layout constraints to be violated.
protected boolean canReplace(ODOMElement element) { Element e = ActionSupport.cloneContainingDeviceLayout(element); e = replace(e, 1, 1); return !LayoutConstraintsProvider.constraints.violated(e, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean isSuitableElement(Element element) {\n \n \t\tif (element instanceof ElementCSSInlineStyle\n \t\t\t\t&& isAttributeAvailable(element, STYLE_TAG_NAME)) {\n \t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "protected boolean canDiagramBeCreatedFromElement(IElement pElement)\n {\n boolean canCreate = false;\n if (pElement != null)\n {\n // fix for CR 6417670\n // IDerivationClassifier is also an instance of IRelationship, so return false only if\n // pElement is not of type IDerivationClassifier.\n if (pElement instanceof IDiagram ||\n pElement instanceof ISourceFileArtifact ||\n (pElement instanceof IRelationship && !(pElement instanceof IDerivationClassifier)) )\n {\n return false;\n }\n \n \n // We shouldn't be able to select elements under an interaction and CDFS.\n // Therefore, we should disable the CDFS menu if you select any children\n // of the interaction.\n IElement owner = pElement.getOwner();\n if (owner == null)\n return false;\n if (owner instanceof IInteraction ||\n pElement instanceof IMessage ||\n pElement instanceof ICombinedFragment ||\n pElement instanceof IOperation ||\n pElement instanceof IAttribute)\n {\n // For operations, we have to make sure the operation can be REed\n // in order to support CDFS\n if (pElement instanceof IOperation)\n {\n// canCreate = false;\n// IUMLParsingIntegrator integrator = getUMLParsingIntegrator();\n// boolean canRE = integrator.canOperationBeREed((IOperation) pElement);\n// if (canRE)\n// {\n canCreate = true;\n// }\n }\n }\n else\n {\n canCreate = true;\n }\n }\n return canCreate;\n }", "@Override\r\n protected boolean canEdit(Object element) {\n return true;\r\n }", "protected boolean isValidElement(Object element) {\r\n\t\treturn element instanceof IRubyProject || element instanceof ISourceFolderRoot;\r\n\t}", "private boolean isSupportedModelElement(ModelElement modelElement, Diagram diagram) {\n Set<Class> allowedElements = DIAGRAM_ELEMENTS_MAP.get(DeployHelper.getTypeInfo(diagram));\n for (Class<?> class1 : allowedElements) {\n if (class1.isAssignableFrom(modelElement.getClass())) {\n return true;\n }\n }\n return false;\n }", "private native boolean iLayoutJS(Element el)\n /*-{\n \tif(el && el.iLayoutJS) {\n \t\ttry {\n \t\t\tel.iLayoutJS();\n \t\t\treturn true;\n \t\t} catch (e) {\n \t\t\treturn false;\n \t\t}\n \t} else {\n \t\treturn false;\n \t}\n }-*/;", "public boolean comesFromDiagramElement() {\n return getOriginalElement() != null;\n }", "boolean elementSupports(Object elementID, int elementConstant) throws Exception;", "public boolean isAcceptable(Class<? extends DataElement> clazz);", "public boolean elementDansSchema(final Element refElement) {\n final Document domdoc = refElement.getOwnerDocument();\n return(domdoc == racine_schema.getOwnerDocument());\n }", "private boolean isInnerType(IModelElement element) {\n \n \t\tif (element != null && element.getElementType() == IModelElement.TYPE) {\n \n \t\t\tIModelElement parent = element.getParent();\n \t\t\tif (parent != null) {\n \t\t\t\tint parentElementType = parent.getElementType();\n \t\t\t\treturn (parentElementType != IModelElement.SOURCE_MODULE);\n \t\t\t}\n \t\t}\n \n \t\treturn false;\n \t}", "public boolean replace(Element oldElement, Element newElement) {\n if (replaceNoNotify(oldElement, newElement)) {\n setChanged();\n Message message = Message.makeModified(newElement);\n notifyObservers(message);\n return true;\n } else {\n return false;\n }\n\n }", "boolean accepts(T element);", "default boolean visitElementContent(MappedElementKind targetKind) {\n\t\treturn true;\n\t}", "public void checkCompatibility(Component component) throws XPathException {\n }", "public void testIsStylePermittedInElement() throws Exception {\n assertFalse(cfg.isStylePermittedInElement(\"test\"));\n assertFalse(cfg.isStylePermittedInElement(\"d1\"));\n assertFalse(cfg.isStylePermittedInElement(\"ind1\"));\n assertFalse(cfg.isStylePermittedInElement(\"ind2\"));\n\n cfg.associateStylisticAndAntiElements(\"test\", \"anti-test\",\n permittedChildren);\n cfg.addDivisibleElementsThatPermitStyles(new String[] {\"d1\"});\n cfg.addIndivisibleElementsThatPermitStyles(\n new String[] {\"ind1\", \"ind2\"});\n\n assertTrue(cfg.isStylePermittedInElement(\"test\"));\n assertTrue(cfg.isStylePermittedInElement(\"d1\"));\n assertTrue(cfg.isStylePermittedInElement(\"ind1\"));\n assertTrue(cfg.isStylePermittedInElement(\"ind2\"));\n\n assertFalse(cfg.isStylePermittedInElement(\"anti-test\"));\n assertFalse(cfg.isStylePermittedInElement(\"child\"));\n assertFalse(cfg.isStylePermittedInElement(\"TEST\"));\n assertFalse(cfg.isStylePermittedInElement(\"D1\"));\n }", "boolean isReplaceable();", "public boolean canLayout(ILayoutContext context) {\n\t\tPictogramElement pe = context.getPictogramElement();\r\n\t\tif (!(pe instanceof ContainerShape))\r\n\t\t\treturn false;\r\n\t\tEList<EObject> businessObjects = pe.getLink().getBusinessObjects();\r\n\t\treturn businessObjects.size() == 1 && businessObjects.get(0) instanceof Statement;\r\n\t}", "public boolean isCompatible(android.renderscript.Element e) { throw new RuntimeException(\"Stub!\"); }", "public boolean isCompliedWith(MModelElement modelElement) {\n\n\t\t//The now possible range is All that's no restriction, so I don't need to check this.\n\n\t\t// check base class\n\t\tif (!BaseClasses.objectMatchsType(modelElement, this.getBaseClass())) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn super.isCompliedWith(modelElement);\n\t}", "protected boolean isStructureKnown() {\n\t\ttry {\n\t\t\treturn ((OpenableElementInfo) getElementInfo()).isStructureKnown();\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isLayoutable() {\n return (rawData != null && !rawData.optBoolean(Constants.HIDDEN_FIELD)\n && rawData.optBoolean(Constants.LAYOUTABLE_FIELD));\n }", "protected boolean isValidInput(Object element) {\r\n\t\treturn element instanceof IRubyModel;\r\n\t}", "public void validateRpd3s1()\n {\n // <b> and <i> are not allowed.\n assertFalse(Type.ERROR, \"rpd3s1.boldMarkup\", containsElement(\"b\"));\n assertFalse(Type.ERROR, \"rpd3s1.italicMarkup\", containsElement(\"i\"));\n }", "public void testIsStylisticElement() throws Exception {\n assertFalse(cfg.isStylisticElement(\"test\"));\n cfg.associateStylisticAndAntiElements(\"test\", null, permittedChildren);\n cfg.associateStylisticAndAntiElements(\"stylistic\", null,\n permittedChildren);\n assertTrue(cfg.isStylisticElement(\"test\"));\n assertTrue(cfg.isStylisticElement(\"stylistic\"));\n assertFalse(cfg.isStylisticElement(\"child\"));\n }", "protected Element replace(Element element,\n int rows,\n int cols) {\n Element replacement = null;\n\n if (!selectionIsAppropriate(element)) {\n throw new IllegalArgumentException(\n \"The action can not replace a \" + //$NON-NLS-1$\n element.getName());\n } else {\n try {\n // selectionManager is optional\n if (selectionManager != null) {\n // disable the selection events\n this.selectionManager.setEnabled(false);\n }\n replacement = FormatPrototype.createSizedGrid(formatType,\n null,\n rows,\n cols,\n progressMonitor);\n\n } finally {\n if (selectionManager != null) {\n // ensure selection events are enabled\n this.selectionManager.setEnabled(true);\n }\n }\n // call common utility method\n replaceElement(element, replacement);\n }\n\n return replacement;\n }", "boolean supportsFormat(UUID formatid);", "private boolean isListValid()\n {\n boolean isValid = true;\n Collection<RecognizedElement> elementsList = tree.getChildren();\n for (Iterator<RecognizedElement> iterator = elementsList.iterator(); iterator.hasNext();)\n {\n RecognizedElement recognizedElement = (RecognizedElement) iterator.next();\n if (isSpreadsheet)\n {\n if (recognizedElement instanceof Style || recognizedElement instanceof Regex)\n {\n isValid = false;\n break;\n }\n }\n else\n {\n if (recognizedElement instanceof Column)\n {\n isValid = false;\n break;\n }\n }\n }\n return isValid;\n }", "protected boolean isSupported(Class<?> type, Type genericType, Annotation[] anns) {\n return type.getAnnotation(XmlRootElement.class) != null\n || JAXBElement.class.isAssignableFrom(type)\n || objectFactoryForClass(type)\n || (type != genericType && objectFactoryForType(genericType))\n || adapterAvailable(type, anns);\n \n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "public boolean getIsVisualElementContainer()\n {\n return root.getType().isAssignableTo(standardDefs.INTERFACE_IVISUALELEMENTCONTAINER);\n }", "public boolean hasReinforcedStructure() {\n return (getStructureType() == EquipmentType.T_STRUCTURE_REINFORCED);\n }", "boolean isInheritableStyle(QName eltName, QName styleName);", "public void testElementWithFormat() {\n ElementWithFormatTestDTO obj = new ElementWithFormatTestDTO();\n obj.element = getDateForFormat(\"28.02.2007:15:21:27\");\n assertTrue(JSefaTestUtil.serialize(XML, obj).indexOf(\"28.02.2007:15:21:27\") >= 0);\n }", "boolean replacementfor(Type o);", "void replace(CtElement element);", "@Override\r\n\tpublic boolean accept(Node node) {\r\n\t\tif(node instanceof Div || node instanceof TableTag || node instanceof TableRow || node instanceof TableColumn)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "boolean isWasLayouting();", "@Override\n\tprotected boolean accepts(Element xmlDoc) {\n\n\t\tfinal Element rootElement = xmlDoc.getDocument().getRootElement();\n\n\t\tboolean isValidQrdaFile = containsClinicalDocumentElement(rootElement)\n\t\t\t\t\t\t\t\t\t&& containsClinicalDocumentTemplateId(rootElement);\n\n\t\tif (!isValidQrdaFile) {\n\t\t\tDEV_LOG.error(NOT_VALID_QRDA_III_FORMAT);\n\t\t}\n\t\t\n\t\treturn isValidQrdaFile;\n\t}", "boolean isReplaceable(TransferDescription description);", "public static void validateElement(Element element) {\n try {\n element.accept(ELEMENT_VALIDATING_VISITOR, null);\n } catch (RuntimeException exception) {\n throw ValidationException.from(exception)\n .append(String.format(\"%s element: %s\", element.getKind(), element));\n }\n }", "public static boolean isRendered(Element sourceElement) {\r\n return !Constants.FALSE.equalsIgnoreCase(sourceElement.getAttribute(\"rendered\")); //$NON-NLS-1$\r\n }", "private static boolean isDiagram(AbstractEditor element){\n\t\treturn true;\n\t}", "static boolean canAddComponentToContainer(IDisplayModel displayModel,\r\n\t\t\t\tIComponent component, IContainer container, boolean forPalette, StatusHolder holder) {\r\n\t\t\r\n\t\tStatusBuilder builder = new StatusBuilder(ComponentSystemPlugin.getDefault());\r\n\t\tIAttributes attr = (IAttributes) component.getAdapter(IAttributes.class);\r\n\t\tif (attr == null) {\r\n\t\t\tif (holder != null) {\r\n\t\t\t\tString fmt = Messages.getString(\"Utilities.NoAttributesAdapterError\"); //$NON-NLS-1$\r\n\t\t\t\tObject params[] = {component.getId()};\r\n\t\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t\t\tholder.setStatus(builder.createStatus(\"\", null)); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean isLayoutObject = attr.getBooleanAttribute(CommonAttributes.IS_LAYOUT_OBJECT, false);\r\n\t\tboolean isTopLevelOnly = attr.getBooleanAttribute(CommonAttributes.IS_TOP_LEVEL_ONLY_LAYOUT_OBJECT, false);\r\n\t\tboolean isExclusiveChild = attr.getBooleanAttribute(CommonAttributes.IS_EXCLUSIVE_CHILD_LAYOUT_OBJECT, false);\r\n\r\n\t\tIComponentInstance parentInstance = Utilities.getComponentInstance(container.getEObject());\r\n\t\tIAttributes parentAttributes = (IAttributes) parentInstance.getComponent().getAdapter(IAttributes.class);\r\n\t\tboolean parentIsTopLevelContentContainer = \r\n\t\t\tparentAttributes.getBooleanAttribute(CommonAttributes.IS_TOP_LEVEL_CONTENT_CONTAINER, false);\r\n\t\tEObject[] potentialSiblings = getLayoutChildren(parentInstance);\r\n\t\t\r\n\t\tboolean currentExclusiveChildError = false;\r\n\t\tif (!forPalette)\r\n\t\t\tcurrentExclusiveChildError = isLayoutObject && containsExclusiveChild(potentialSiblings);\r\n\t\tif (currentExclusiveChildError && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.CurrentExclusiveChildError\"); //$NON-NLS-1$\r\n\t\t\tIComponentInstance containerInstance = \r\n\t\t\t\t(IComponentInstance) EcoreUtil.getRegisteredAdapter(container.getEObject(), IComponentInstance.class);\r\n\t\t\tObject params[] = {containerInstance.getName()};\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t}\r\n\t\t\r\n\t\tboolean topLevelOnlyError = isTopLevelOnly && !parentIsTopLevelContentContainer;\r\n\t\tif (topLevelOnlyError && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.TopLevelOnlyError\"); //$NON-NLS-1$\r\n\t\t\tObject params[] = {component.getFriendlyName()};\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t}\r\n\t\t\r\n\t\tboolean exclusiveChildSiblingsError = false;\r\n\t\tif (!forPalette)\r\n\t\t\texclusiveChildSiblingsError = isExclusiveChild && (potentialSiblings != null); \r\n\t\tif (exclusiveChildSiblingsError && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.ExclusiveChildSiblingsError\"); //$NON-NLS-1$\r\n\t\t\tObject params[] = {component.getFriendlyName()};\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t}\r\n\t\t\r\n\t\tboolean result = !currentExclusiveChildError &&\r\n\t\t\t\t\t\t\t!topLevelOnlyError &&\r\n\t\t\t\t\t\t\t!exclusiveChildSiblingsError;\r\n\t\t\r\n\t\t\r\n\t\tif (!result && (holder != null)) {\r\n\t\t\tIComponentInstance containerInstance = (IComponentInstance) EcoreUtil\r\n\t\t\t.getRegisteredAdapter(container.getEObject(), IComponentInstance.class);\r\n\t\t\tObject params[] = { component.getFriendlyName(), containerInstance.getName() };\r\n\t\t\tholder.setStatus(builder.createMultiStatus(Messages.getString(\"Utilities.CantAddObjectError\"), params)); //$NON-NLS-1$\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private static boolean isElementNode(Node node) {\n return node.getNodeType() == Node.ELEMENT_NODE;\n }", "protected boolean isSourceElement() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validateContent()\n\t{\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "public boolean isExtensionElement();", "protected boolean selectionIsAppropriate(Element selection) {\n return selection.getName().equals(FormatType.EMPTY.getElementName());\n }", "public boolean canBeTransformedWith(Transformation other) {\n return false; // Independent transformation\n }", "public static boolean verifyVisibilityOfElement(WebElement element) {\n\t\ttry {\n\n\t\t\tif (element.isDisplayed())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "boolean isElement(Object object);", "private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\n }", "public static boolean isFrameContentValid(FrameModel frame) {\n return computeReminder(frame.getFrameContent()).equals(padding);\n }", "public void assertChecked(final String elementLocator);", "public boolean isInFormatDialog() {\n if(inFormatFragment.getValue() != null)\n return inFormatFragment.getValue();\n else return false;\n }", "private static void checkNameAndTypeOK(XSElementDecl dElement, int dMin, int dMax, XSElementDecl bElement, int bMin, int bMax) throws XMLSchemaException {\n/* 1067 */ if (dElement.fName != bElement.fName || dElement.fTargetNamespace != bElement.fTargetNamespace)\n/* */ {\n/* 1069 */ throw new XMLSchemaException(\"rcase-NameAndTypeOK.1\", new Object[] { dElement.fName, dElement.fTargetNamespace, bElement.fName, bElement.fTargetNamespace });\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1077 */ if (!bElement.getNillable() && dElement.getNillable()) {\n/* 1078 */ throw new XMLSchemaException(\"rcase-NameAndTypeOK.2\", new Object[] { dElement.fName });\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1085 */ if (!checkOccurrenceRange(dMin, dMax, bMin, bMax)) {\n/* 1086 */ throw new XMLSchemaException(\"rcase-NameAndTypeOK.3\", new Object[] { dElement.fName, \n/* */ \n/* */ \n/* 1089 */ Integer.toString(dMin), (dMax == -1) ? \"unbounded\" : \n/* 1090 */ Integer.toString(dMax), \n/* 1091 */ Integer.toString(bMin), (bMax == -1) ? \"unbounded\" : \n/* 1092 */ Integer.toString(bMax) });\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1098 */ if (bElement.getConstraintType() == 2) {\n/* */ \n/* 1100 */ if (dElement.getConstraintType() != 2) {\n/* 1101 */ throw new XMLSchemaException(\"rcase-NameAndTypeOK.4.a\", new Object[] { dElement.fName, bElement.fDefault\n/* 1102 */ .stringValue() });\n/* */ }\n/* */ \n/* */ \n/* 1106 */ boolean isSimple = false;\n/* 1107 */ if (dElement.fType.getTypeCategory() == 16 || ((XSComplexTypeDecl)dElement.fType).fContentType == 1)\n/* */ {\n/* 1109 */ isSimple = true;\n/* */ }\n/* */ \n/* */ \n/* 1113 */ if ((!isSimple && !bElement.fDefault.normalizedValue.equals(dElement.fDefault.normalizedValue)) || (isSimple && \n/* 1114 */ !bElement.fDefault.actualValue.equals(dElement.fDefault.actualValue))) {\n/* 1115 */ throw new XMLSchemaException(\"rcase-NameAndTypeOK.4.b\", new Object[] { dElement.fName, dElement.fDefault\n/* */ \n/* 1117 */ .stringValue(), bElement.fDefault\n/* 1118 */ .stringValue() });\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1125 */ checkIDConstraintRestriction(dElement, bElement);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1130 */ int blockSet1 = dElement.fBlock;\n/* 1131 */ int blockSet2 = bElement.fBlock;\n/* 1132 */ if ((blockSet1 & blockSet2) != blockSet2 || (blockSet1 == 0 && blockSet2 != 0))\n/* */ {\n/* 1134 */ throw new XMLSchemaException(\"rcase-NameAndTypeOK.6\", new Object[] { dElement.fName });\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1141 */ if (!checkTypeDerivationOk(dElement.fType, bElement.fType, (short)25))\n/* */ {\n/* 1143 */ throw new XMLSchemaException(\"rcase-NameAndTypeOK.7\", new Object[] { dElement.fName, dElement.fType\n/* 1144 */ .getName(), bElement.fType.getName() });\n/* */ }\n/* */ }", "@Override\n public boolean isValid(JsonElement el) {\n return doValidate(el, null);\n }", "private boolean adjustComponents(boolean notify) {\n\n\t\tlock.acquire();\n\t\ttry {\n\t\t\tcheckDeleted();\n\n\t\t\tboolean changed = false;\n\t\t\talignment = -1;\n\n\t\t\tif (!isInternallyAligned()) {\n\t\t\t\tchanged |= adjustUnalignedComponents();\n\t\t\t\tif (notify && changed) {\n\t\t\t\t\tdataMgr.dataTypeChanged(this);\n\t\t\t\t}\n\t\t\t\treturn changed;\n\t\t\t}\n\n\t\t\tint oldLength = structLength;\n\n\t\t\tStructurePackResult packResult =\n\t\t\t\tAlignedStructurePacker.packComponents(this, components);\n\t\t\tchanged = packResult.componentsChanged;\n\n\t\t\t// Adjust the structure\n\t\t\tchanged |= updateComposite(packResult.numComponents, packResult.structureLength,\n\t\t\t\tpackResult.alignment, false);\n\n\t\t\tif (notify & changed) {\n\t\t\t\tif (oldLength != structLength) {\n\t\t\t\t\tnotifySizeChanged();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdataMgr.dataTypeChanged(this);\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\tfinally {\n\t\t\tlock.release();\n\t\t}\n\t}", "private boolean endTagRequired(UAElement element) {\n \t\tString elementName = element.getElementName();\n \t\tif (\"a\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"p\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"div\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"script\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\tif (\"textarea\".equalsIgnoreCase(elementName)) return true; //$NON-NLS-1$\n \t\treturn false;\n \t}", "public boolean isCorrectSize(int height, int width);", "@Override\n\tpublic boolean estaElemento(String elemento) {\n\t\treturn false;\n\t}", "public boolean hasNotStyle(final String elementLocator, final String style);", "@Override\n protected boolean isValidFragment(String fragmentName) {\n return SafeFragment1.class.getName().equals(fragmentName)\n || SafeFragment2.class.getName().equals(fragmentName)\n || SafeFragment3.class.getName().equals(fragmentName);\n }", "private static boolean isDiagram(ConfigurableUnit element) {\n\t\treturn true;\n\t}", "private void check_displaysInputOverlay() {\n onView(withId(R.id.voiceInput))\n .check(matches(isDisplayed()));\n // the permission overlay should not\n onView(withId(R.id.voicePermission))\n .check(doesNotExist());\n }", "public void testIsMergeableElement() throws Exception {\n assertFalse(cfg.isMergeableElement(\"font\"));\n cfg.addMergeableElement(\"font\");\n assertTrue(cfg.isMergeableElement(\"font\"));\n\n cfg.addMergeableElement(\"mergeable\");\n assertTrue(cfg.isMergeableElement(\"font\"));\n assertTrue(cfg.isMergeableElement(\"mergeable\"));\n }", "@XmlElement(\"IsAligned\")\n boolean IsAligned();", "public static boolean checkElement(Element element) \n\t{\n\t\treturn LIST_OF_ELEMENT.containsValue(element);\n\t}", "private boolean isInteger(String element) {\r\n try {\r\n Integer.valueOf(element);\r\n } catch (NumberFormatException e) {\r\n return false;\r\n }\r\n return true;\r\n }", "private static boolean isDiagram(Filesystem element) {\r\n\t\treturn true;\r\n\t}", "public boolean formatCheck()\n\t{\n\t\t// The freeList has to be 2 or greater since the first block (index 0)\n\t\t// is the SuperBlock, and the the second block (index 1) contains\n\t\t// information about Inodes.\n\t\tif (totalBlocks != Kernel.NUM_BLOCKS || totalInodes <= 0 || \n\t\t\tfreeList < 2 || freeList >= totalBlocks && \n\t\t\tlastFreeBlock < 2 || lastFreeBlock >= totalBlocks)\n\t\t{\n\t\t\ttotalBlocks = Kernel.NUM_BLOCKS;\n\t\t\tlastFreeBlock = totalBlocks - 1;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n\tpublic boolean getElemento(T elemento) {\n\t\treturn false;\r\n\t}", "boolean isAutoEnableElementsTranslation();", "public boolean isCompatibleWithFormat(Format format) {\n\t\treturn formats.contains(format);\n\t}", "public boolean isLegalReplacement(byte[] repl) {\n return true;\n }", "public abstract boolean isTypeCorrect();", "public boolean isDisplayed(WebElement ElementToCheck){\n\t\tWebDriverWait wait = new WebDriverWait(driverInstance, Constants.DRIVER_WAIT);\n\t\ttry{\n\t\t\twait.until(ExpectedConditions.visibilityOf(ElementToCheck));\n\t\t\treturn ElementToCheck.isDisplayed();\n\t\t}\n\t\tcatch(Exception E){\n\t\t\tLog.error(\"Element is not getting displayed\");\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean isFrameContentValid(String frameContent) {\n return computeReminder(frameContent).equals(padding);\n }", "public void validateRpd3s9()\n {\n // <sub> and <sup> are not allowed.\n assertFalse(Type.ERROR, \"rpd3s9.sub\", containsElement(\"sub\"));\n assertFalse(Type.ERROR, \"rpd3s9.sup\", containsElement(\"sup\"));\n }", "public boolean isElementPresent(WebElement element) {\n try{\n return element.isDisplayed();\n }catch (RuntimeException e){\n return false;\n }\n }", "private void checkFormat() {\n if (y.pixelStride != 1) {\n throw new IllegalArgumentException(String.format(\n \"Pixel stride for Y plane must be 1 but got %d instead\",\n y.pixelStride\n ));\n }\n if (u.pixelStride != v.pixelStride || u.rowStride != v.rowStride) {\n throw new IllegalArgumentException(String.format(\n \"U and V planes must have the same pixel and row strides \" +\n \"but got pixel=%d row=%d for U \" +\n \"and pixel=%d and row=%d for V\",\n u.pixelStride, u.rowStride,\n v.pixelStride, v.rowStride\n ));\n }\n if (u.pixelStride != 1 && u.pixelStride != 2) {\n throw new IllegalArgumentException(\n \"Supported pixel strides for U and V planes are 1 and 2\"\n );\n }\n }", "public void testTransformWithInvalidElementType() throws Exception {\n try {\n instance.transform(\"invalid\", document, caller);\n fail(\"ClassCastException is excepted.\");\n } catch (ClassCastException cce) {\n // pass\n }\n }", "public boolean isFixedWidth() throws PDFNetException {\n/* 561 */ return IsFixedWidth(this.a);\n/* */ }", "public boolean canBuildFormatter() {\r\n return isFormatter(getFormatter());\r\n }", "public boolean canFill(@Nullable FluidStack resource) {\n if (!canFillFluidType(resource)) {\n return false;\n } else if (fluid != null) {\n return fluid.isFluidEqual(resource);\n } else {\n return true;\n }\n }", "public boolean isStillValid() {\n if (!this.mAbortOnInflation && this.mEntry.getSbn().getGroupKey() == this.mOriginalNotification.getGroupKey() && this.mEntry.getSbn().getNotification().isGroupSummary() == this.mOriginalNotification.getNotification().isGroupSummary()) {\n return true;\n }\n return false;\n }", "@Override\n public boolean needsFormat()\n {\n return delegates.stream().anyMatch(SplittableInputSource::needsFormat);\n }", "public void checkComponent() {\r\n Component component = ViewToEntityConverter.view2Model(view);\r\n validate(component);\r\n }", "boolean isNegativeLengthPermitted(QName eltName, QName styleName);", "public boolean isDefaultElement();", "@Override\n public void setFormat(Format format) {\n if (format != Format.XML)\n throw new IllegalArgumentException(\"JAXBHandle supports the XML format only\");\n }", "private boolean isElementPresent(By cssSelector) {\n\treturn false;\n}", "@Override\n public boolean accepts(@NotNull PsiElement element, ProcessingContext context) {\n CobolStatement_ statementOfTyped = PsiTreeUtil.getParentOfType(element, CobolStatement_.class);\n\n if (statementOfTyped == null) return false;\n\n PsiElement prevLeaf = element;\n while ((prevLeaf = PsiTreeUtil.prevLeaf(prevLeaf)) != null) {\n // If out of statement boundaries, exit.\n CobolStatement_ statementOfLeaf = PsiTreeUtil.getParentOfType(prevLeaf, CobolStatement_.class);\n\n if (!statementOfTyped.equals(statementOfLeaf)) {\n break;\n }\n\n if (types.contains(prevLeaf.getNode().getElementType())) {\n return true;\n }\n }\n\n return false;\n }", "boolean isLengthUnitsPermitted(QName eltName, QName styleName, Length.Unit units);", "boolean hasPlaceholderType();", "boolean isXMLGroup(Object groupID) throws Exception;", "public static boolean overlapUPA(XSElementDecl element, XSWildcardDecl wildcard, SubstitutionGroupHandler sgHandler) {\n/* 1479 */ if (wildcard.allowNamespace(element.fTargetNamespace)) {\n/* 1480 */ return true;\n/* */ }\n/* */ \n/* 1483 */ XSElementDecl[] subGroup = sgHandler.getSubstitutionGroup(element);\n/* 1484 */ for (int i = subGroup.length - 1; i >= 0; i--) {\n/* 1485 */ if (wildcard.allowNamespace((subGroup[i]).fTargetNamespace)) {\n/* 1486 */ return true;\n/* */ }\n/* */ } \n/* 1489 */ return false;\n/* */ }" ]
[ "0.55464506", "0.542513", "0.5401856", "0.5367354", "0.5272628", "0.50903326", "0.50402987", "0.50315344", "0.4999042", "0.4936658", "0.4920476", "0.49172023", "0.48764148", "0.48598176", "0.48589402", "0.48578295", "0.48232117", "0.48167658", "0.4813581", "0.47964102", "0.479426", "0.4794046", "0.47735414", "0.47717786", "0.47715124", "0.47658128", "0.47581917", "0.4746211", "0.4732503", "0.4725707", "0.4725707", "0.47244766", "0.46787626", "0.46680135", "0.46574816", "0.46535558", "0.4653283", "0.4614599", "0.4604491", "0.46042067", "0.46016416", "0.45943877", "0.4583549", "0.45723495", "0.4570123", "0.45666257", "0.45596048", "0.45548543", "0.45523685", "0.4550247", "0.4548768", "0.45449919", "0.45395458", "0.4539169", "0.45362175", "0.4533939", "0.4532611", "0.4529188", "0.4518227", "0.45152083", "0.45107916", "0.4497758", "0.4497408", "0.44890353", "0.44862956", "0.448006", "0.4479126", "0.44763482", "0.44725323", "0.44691417", "0.44681478", "0.4467682", "0.44672757", "0.44666904", "0.44586447", "0.44568884", "0.44533598", "0.44491008", "0.44351506", "0.44291785", "0.44281033", "0.44233128", "0.44215137", "0.4420052", "0.44167224", "0.43799073", "0.43784478", "0.4378028", "0.43770194", "0.4375635", "0.4369302", "0.43664885", "0.43663907", "0.436324", "0.43606335", "0.43596235", "0.43554053", "0.43443164", "0.4342187", "0.43403056" ]
0.75461936
0
This method can called by GridActionRunner then IProgressMonitor is present or can be called in other way when progress dialog is not required.
protected void replaceAndSelect(ODOMActionDetails details, Dimension dimensions, IProgressMonitor monitor) { progressMonitor = monitor; // height = rows, width = columns Element e = replace(details.getElement(0), dimensions.height, dimensions.width); if (progressMonitor != null) { progressMonitor.worked((dimensions.height + dimensions.width) *(GridActionRunner.PROGRESS_SCALE-1)); progressMonitor = null; } setSelection(e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tprotected void onPreExecute() {\n\t\t progressDialog = new AutoTuningInitDialog(mChannelActivity, R.style.dialog);\n\t\t\tprogressDialog.show();\t\t\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n public void initializeValidationData(IProgressMonitor arg0)\n {\n\n }", "@Override\n\tpublic void preExecution() {\n\t\tshowProgressBar();\n\t}", "public interface LoaderProgressMonitor {\n\n /**\n * Called by the <code>ProjectManager</code> when a project-load operation is about to begin.\n * \n * @param libraryCount the number of libraries expected to load\n */\n public void beginLoad(int libraryCount);\n\n /**\n * Called when a library is about to be loaded by the <code>ProjectManager</code>.\n * \n * @param libraryFilename the filename of the library about to be loaded\n */\n public void loadingLibrary(String libraryFilename);\n\n /**\n * Called immediately following a library load.\n */\n public void libraryLoaded();\n\n /**\n * Called when the project-load operation is complete.\n */\n public void done();\n\n}", "private static ProgressMonitor getProgressMonitor(final TaskMonitor aTM)\n{\n return new ProgressMonitor() {\n public void update(int arg0) { aTM.updateTask(arg0); }\n public void start(int arg0) { aTM.startTasks(arg0); }\n public boolean isCancelled() { return aTM.isCancelled(); }\n public void endTask() { aTM.endTask(); }\n public void beginTask(String arg0, int arg1) { aTM.beginTask(arg0, arg1); }\n };\n}", "@Override\n protected void onPreExecute() {\n Utils.showProcessingDialog(_context);\n }", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Adding workouts...\");\n this.progressDialog.show();\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tUtils.showProcessingDialog(_context);\n\t}", "protected abstract void execute(ICustomContext context,\n\t\t\tIProgressMonitor monitor);", "void showQueuingBuildProgress();", "protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) {\r\n\t\tif (!_isCapability) {\r\n\t\t\tnubEditPopUp = new RequirementsPopupDialog(_shell, (Unit) _dmo,\r\n\t\t\t\t\t_initialLocation != null ? _initialLocation : estimate(_editPart, TOP_RIGHT));\r\n\t\t} else if (_dmo instanceof Unit) {\r\n\t\t\tnubEditPopUp = new CapabilitiesPopupDialog(_shell, (Unit) _dmo,\r\n\t\t\t\t\t_initialLocation != null ? _initialLocation : estimate(_editPart, BOTTOM_LEFT));\r\n\t\t}\r\n\r\n\t\tif (nubEditPopUp != null) {\r\n\t\t\tnew UnitFlyOutPropertiesToggler((Unit) _dmo, _domain,\r\n\t\t\t\t\t(UnitFlyOutPropertiesTogglerDialog) nubEditPopUp);\r\n\t\t\tnubEditPopUp.open();\r\n\t\t\tif (initialSelectionProvider != null && nubEditPopUp instanceof ISetSelectionTarget) {\r\n\t\t\t\t((ISetSelectionTarget) nubEditPopUp).selectReveal(initialSelectionProvider\r\n\t\t\t\t\t\t.getSelection());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn CommandResult.newOKCommandResult();\r\n\t}", "public interface ResultProgressHandle {\n \n /**\n * Set the current position and total number of steps. Note it is\n * inadvisable to be holding any locks when calling this method, as it\n * may immediately update the GUI using \n * <code>EventQueue.invokeAndWait()</code>.\n * \n * @param currentStep the current step in the progress of computing the\n * result.\n * @param totalSteps the total number of steps. Must be greater than\n * or equal to currentStep.\n */\n public abstract void setProgress (int currentStep, int totalSteps);\n \n /** \n * Set the current position and total number of steps, and description \n * of what the computation is doing. Note it is\n * inadvisable to be holding any locks when calling this method, as it\n * may immediately update the GUI using \n * <code>EventQueue.invokeAndWait()</code>. \n * @param description Text to describe what is being done, which can\n * be displayed in the UI.\n * @param currentStep the current step in the progress of computing the\n * result.\n * @param totalSteps the total number of steps. Must be greater than\n * or equal to currentStep.\n */\n public abstract void setProgress (String description, int currentStep, int totalSteps);\n \n /**\n * Set the status as \"busy\" - a rotating icon will be displayed instead\n * of a percent complete progress bar.\n * \n * Note it is inadvisable to be holding any locks when calling this method, as it\n * may immediately update the GUI using \n * <code>EventQueue.invokeAndWait()</code>. \n * @param description Text to describe what is being done, which can\n * be displayed in the UI.\n */\n public abstract void setBusy (String description);\n \n /**\n * Call this method when the computation is complete, and pass in the \n * final result of the computation. The method doing the computation\n * (<code>DeferredWizardResult.start()</code> or something it \n * called) should exit immediately after calling this method. If the\n * <code>failed()</code> method is called after this method has been\n * called, a runtime exception may be thrown.\n * @param result the Object which was computed, if any.\n */ \n public abstract void finished(Object result);\n /**\n * Call this method if computation fails. The message may be some text\n * describing what went wrong, or null if no description.\n * @param message The text to display to the user. The method \n * doing the computation (<code>DeferredWizardResult.start()</code> or something it \n * called). If the <code>finished()</code> method is called after this\n * method has been called, a runtime exception may be thrown.\n * should exit immediately after calling this method.\n * It is A description of what went wrong, or null.\n * @param canNavigateBack whether or not the Prev button should be \n * enabled.\n */ \n public abstract void failed (String message, boolean canNavigateBack);\n \n /**\n * Add the component to show for the progress display to the instructions panel. \n */\n public abstract void addProgressComponents (Container panel);\n \n /**\n * Returns true if the computation is still running, i.e., if neither finished or failed have been called.\n *\n * @return true if there is no result yet.\n */\n public boolean isRunning();\n}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n\tprotected void done() {\n\t\t//close the monitor \n\t\tprogressMonitorReporter.closeMonitor();\n\t\t\n\t\t//Inform application that operation isn't being in progress. \n\t\tapplicationInteractor.setOperationInProgress(false);\n\t}", "@Override\n\tpublic void showProgress() {\n\t\twaitDialog(true);\n\t}", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Retrieving workouts list...\");\n this.progressDialog.show();\n }", "void hideQueuingBuildProgress();", "@Override\n public void showProgressSync() {\n }", "@Override\n public void showProgress() {\n\n }", "public void progressMade();", "public void setProgressMonitor(ProgressMonitor pm) {\n\t\tthis.progressMonitor = pm;\n\t}", "protected final void showLoadingDialog() {\n }", "public interface Progress {\n\n\t/**\n\t * @return the task name, may be <code>null</code>\n\t */\n\tpublic String getTaskName();\n\n\t/**\n\t * @return the name of the current subtask, may be <code>null</code>\n\t */\n\tpublic String getSubTask();\n\n\t/**\n\t * @return if the progress is indeterminate\n\t */\n\tpublic boolean isIndeterminate();\n\n\t/**\n\t * @return the already worked work units, should be ignored if\n\t * {@link #isIndeterminate()} is <code>true</code>\n\t */\n\tpublic int getWorked();\n\n\t/**\n\t * @return the total work units, should be ignored if\n\t * {@link #isIndeterminate()} is <code>true</code>\n\t */\n\tpublic int getTotalWork();\n\n\t/**\n\t * @return if the job/task is canceled\n\t */\n\tpublic boolean isCanceled();\n\n\t/**\n\t * Cancel the job/task. Behavior on cancel depends on the implementation of\n\t * job/task.\n\t */\n\tpublic void cancel();\n\n}", "void showModalProgress();", "public void setStateToInProgress() {\n progressBar.setIndeterminate(true);\n progressBarLabel.setText(\"Simulation is in progress...\");\n openFolderButton.setVisible(false);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\taProgressDialog = new ProgressDialog(TargetProducts.this);\n\t\t\taProgressDialog.setMessage(\"Loading Report...\");\n\t\t\taProgressDialog.setIndeterminate(true);\n\t\t\taProgressDialog.setCanceledOnTouchOutside(true);\n\t\t\taProgressDialog.show();\n\t\t}", "@Override\r\n\tprotected void progressFinished() {\n\t}", "void onShowProgress();", "private void showProgressNotification() {\n if (isCollectingBugReport()) {\n mNotificationManager.notify(\n BUGREPORT_IN_PROGRESS_NOTIF_ID, buildProgressNotification());\n }\n }", "@Override\n\tpublic void doSave(IProgressMonitor monitor) {\n\t}", "@Override\n protected void onPreExecute() {\n\n\n dialog = new ProgressDialog(MainArea.this);\n dialog.setTitle(\"Loading Results\");\n dialog.setMessage(\"Please Wait Results Are Loading For You....\");\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n super.onPreExecute();\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\ttoggleShowProgressDialog(true);\n\t\t}", "@Override\n\tprotected void onPreExecute() {\n\t\tsuper.onPreExecute();\n\n\t\tprogress = ProgressDialog.show(act, \"\", \"Please wait ...\", true);\n\t\talert = new AlertDialog.Builder(act);\n\n\t}", "@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }", "public interface ProgressObject {\n /**\n * Retrieve the status of this activity.\n *\n * @return An object containing the status information.\n */\n public DeploymentStatus getDeploymentStatus();\n\n /**\n * Retrieve the list of TargetModuleIDs successfully processed or created\n * by the associated DeploymentManager operation.\n *\n * @return a list of TargetModuleIDs.\n */\n public TargetModuleID[] getResultTargetModuleIDs();\n\n /**\n * Return the ClientConfiguration object associated with the\n * TargetModuleID.\n *\n * @return ClientConfiguration for a given TargetModuleID or <tt>null</tt>\n * if none exists.\n */\n public ClientConfiguration getClientConfiguration(TargetModuleID id);\n\n /**\n * Tests whether the vendor supports a cancel operation for this\n * deployment action.\n *\n * @return <tt>true</tt> if this platform allows this action to be\n * canceled.\n */\n public boolean isCancelSupported();\n\n /**\n * (optional) A cancel request on an in-process operation stops all further\n * processing of the operation and returns the environment to it original\n * state before the operation was executed. An operation that has run to\n * completion cannot be cancelled.\n *\n * @throws OperationUnsupportedException occurs when this optional command\n * is not supported by this implementation.\n */\n public void cancel() throws OperationUnsupportedException;\n\n /**\n * Tests whether the vendor supports a stop operation for the deployment\n * action.\n *\n * @return <tt>true</tt> if this platform allows this action to be\n * stopped.\n */\n public boolean isStopSupported();\n\n /**\n * (optional) A stop request on an in-process operation allows the\n * operation on the current TargetModuleID to run to completion but does\n * not process any of the remaining unprocessed TargetModuleID objects.\n * The processed TargetModuleIDs must be returned by the method\n * getResultTargetModuleIDs.\n *\n * @throws OperationUnsupportedException occurs when this optional command\n * is not supported by this implementation.\n */\n public void stop() throws OperationUnsupportedException;\n\n /**\n * Add a listener to receive progress events on deployment actions.\n *\n * @param pol the listener to receive events\n */\n public void addProgressListener(ProgressListener pol);\n\n /**\n * Remove a progress listener.\n *\n * @param pol the listener to remove\n */\n public void removeProgressListener(ProgressListener pol);\n}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog.show();\n\t\t\tprogressDialog.setMessage(\"Contacting server for sharing...\");\n\t\t}", "private void okPressed() {\n String destPath = pathField.getText();\n \n // Resolves destination folder\n // TODO: move those I/O bound calls to job as they can lock the main thread\n Object ret[] = FileToolkit.resolvePath(destPath, mainFrame.getActiveTable().getCurrentFolder());\n // The path entered doesn't correspond to any existing folder\n if (ret==null || (files.size()>1 && ret[1]!=null)) {\n showErrorDialog(Translator.get(\"this_folder_does_not_exist\", destPath));\n return;\n }\n \n AbstractFile destFolder = (AbstractFile)ret[0];\n String newName = (String)ret[1];\n \t\t\n // Retrieve default action when a file exists in destination, default choice\n // (if not specified by the user) is 'Ask'\n int defaultFileExistsAction = fileExistsActionComboBox.getSelectedIndex();\n if(defaultFileExistsAction==0)\n defaultFileExistsAction = FileCollisionDialog.ASK_ACTION;\n else\n defaultFileExistsAction = DEFAULT_ACTIONS[defaultFileExistsAction-1];\n // We don't remember default action on purpose: we want the user to specify it each time,\n // it would be too dangerous otherwise.\n \t\t\n startJob(destFolder, newName, defaultFileExistsAction);\n }", "@Override\n protected void onPreExecute() {\n\n progressDialog = new SafeProgressDialog(PlanningSettings.this);\n progressDialog.setMessage(\"Creating...\");\n progressDialog.setIndeterminate(false);\n progressDialog.setCancelable(true);\n progressDialog.show();\n super.onPreExecute();\n }", "private void showDialog() {\n if (!progressDialog.isShowing())\n progressDialog.show();\n }", "@Override\n public boolean performFinish() {\n String outputDirName = getFinishPage().getOutputDir();\n File statusDir = new File(outputDirName);\n if (!statusDir.exists() || !statusDir.isDirectory()) {\n UIUtils.errorMessageBox(getShell(), Labels.getString(\"LoadWizard.errorValidFolder\")); //$NON-NLS-1$\n return false;\n }\n // set the files for status output\n try {\n getController().setStatusFiles(outputDirName, false, true);\n getController().saveConfig();\n } catch (ProcessInitializationException e) {\n UIUtils.errorMessageBox(getShell(), e);\n return false;\n }\n\n int val = UIUtils.warningConfMessageBox(getShell(), getConfirmationText());\n\n if (val != SWT.YES) { return false; }\n\n if (!wizardhook_validateFinish()) { return false; }\n\n try {\n ProgressMonitorDialog dlg = new ProgressMonitorDialog(getShell());\n dlg.run(true, true, new SWTLoadRunable(getController()));\n\n } catch (InvocationTargetException e) {\n logger.error(Labels.getString(\"LoadWizard.errorAction\"), e); //$NON-NLS-1$\n UIUtils.errorMessageBox(getShell(), e.getCause() != null ? e.getCause() : e);\n return false;\n } catch (InterruptedException e) {\n logger.error(Labels.getString(\"LoadWizard.errorAction\"), e); //$NON-NLS-1$\n UIUtils.errorMessageBox(getShell(), e.getCause() != null ? e.getCause() : e);\n return false;\n }\n\n return true;\n }", "public void action (ProgressListener progressListener) throws Exception;", "public boolean hasProgress();", "public NewEntryWizard()\n {\n setNeedsProgressMonitor( true );\n }", "@Override\n\tprotected void onPreExecute() {\t\t\n\t\t// setup dialog\n\t\tif (dialog!=null){\n\t\t\tdialog.setProgress(0);\n\t\t\tdialog.setMessage(\"Initialized\");\n\t\t}\n\t\t\n\t\tif (callback!=null){\n\t\t\tcallback.onTaskUpdate(null, 0);\n\t\t}\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n runOnUiThread(()->{\n pDialog = new ProgressDialog(ImageClassificationActivity.this);\n pDialog.setMessage(\"Initializing\");\n pDialog.setIndeterminate(false);\n pDialog.setMax(100);\n pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n pDialog.setCancelable(true);\n pDialog.setOnCancelListener(this);\n pDialog.show();\n });\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tloadingAlert.show();\n\t\t}", "public IStatus redo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {\n \t\treturn null;\n \t}", "public void onPreExecute() {\n progressDialog.show();\n }", "@Override\r\n\tprotected void onPreExecute()\r\n\t{\r\n\t\tprogress = new ProgressDialog(ctx);\r\n\t\tprogress.setTitle(\"Retrieving Parking Information\");\r\n\t\tprogress.setMessage(\"Please wait.\");\r\n\t\tprogress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\r\n\t\tprogress.show();\r\n\t\tsuper.onPreExecute();\r\n\t}", "@Override\r\n\tpublic void run(IAction action) {\r\n\r\n\t\ttry {\r\n\t\t\tif (MigrationGoalsContainer.INSTANCE.getMigrationGoals() == null){\r\n\t\t\t\tMessageDialog.openWarning(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), \"Warning\", \"Please load the Migration Goals before opening the Inventory View\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//Load the model for the selected file and open the inventory view. \r\n\t\t\t\tComponentModelQuery.INSTANCE.loadModel(selectedFile);\r\n\t\t\t\tif (window.getActivePage().findView(InventoryView.ID) != null) {\r\n\t\t\t\t\twindow.getActivePage().hideView(window.getActivePage().findView(InventoryView.ID));\r\n\t\t\t\t}\r\n\t\t\t\twindow.getActivePage().showView(InventoryView.ID);\r\n\t\t\t}\r\n\t\t} catch (PartInitException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t//TODO: HANDLE THIS\r\n\t\t}\r\n\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tshowLoadingProgressDialog();\n\t\t}", "@Override\n public void widgetSelected(SelectionEvent e) {\n \t runInBackgroundProgressService();\n }", "private void actionTimelapseImport ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser folderChooser = new JFileChooser();\r\n\t\t\tfolderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\r\n\t\t\tint isFolderSelected = folderChooser.showOpenDialog(folderChooser);\r\n\r\n\t\t\tif (isFolderSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString folderPath = folderChooser.getSelectedFile().getPath();\r\n\r\n\t\t\t\tDataController.scenarioTimelapseImport(folderPath);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "void showProgress();", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "public interface DevLoadingViewManager {\n\n void showMessage(final String message);\n\n void updateProgress(\n final @Nullable String status, final @Nullable Integer done, final @Nullable Integer total);\n\n void hide();\n}", "private void performSendToStagingArea() {\n MsbColumns columns = MsbClient.getColumnInfo();\n\n final Integer msbID = new Integer((String) sorter.getValueAt(\n selRow, columns.getIndexForKey(\"msbid\")));\n final String checksum = (String) sorter.getValueAt(\n selRow, columns.getIndexForKey(\"checksum\"));\n final String projectid = (String) sorter.getValueAt(\n selRow, columns.getIndexForKey(\"projectid\"));\n\n // Perform SpQueuedMap check and other Swing actions before\n // launching the SwingWorker thread.\n if (remaining.isSelected()) {\n String time =\n SpQueuedMap.getSpQueuedMap().containsMsbChecksum(checksum);\n\n if (time != null) {\n int rtn = JOptionPane.showOptionDialog(null,\n \"This observation was sent to the queue \"\n + time + \".\\n Continue ?\",\n \"Duplicate execution warning\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.WARNING_MESSAGE, null, null,\n null);\n\n if (rtn == JOptionPane.NO_OPTION) {\n return;\n }\n }\n }\n\n logger.info(\"Fetching MSB \" + msbID + \" INFO is: \" + projectid +\n \", \" + checksum);\n\n InfoPanel.logoPanel.start();\n om.enableList(false);\n\n (new SwingWorker<SpItem, Void>() {\n public SpItem doInBackground() {\n return localQuerytool.fetchMSB(msbID);\n }\n\n // Runs on the event-dispatching thread.\n protected void done() {\n // Restore GUI state: we want to do this on the\n // event-dispatching thread regardless of whether the worker\n // succeeded or not.\n om.enableList(true);\n InfoPanel.logoPanel.stop();\n\n try {\n SpItem item = get();\n\n // Perform the following actions of the worker was\n // successful ('get' didn't raise an exception).\n DeferredProgramList.clearSelection();\n om.addNewTree(item);\n buildStagingPanel();\n }\n catch (InterruptedException e) {\n logger.error(\"Execution thread interrupted\");\n }\n catch (ExecutionException e) {\n logger.error(\"Error retriving MSB: \" + e);\n String why = null;\n Throwable cause = e.getCause();\n if (cause != null) {\n why = cause.toString();\n }\n else {\n why = e.toString();\n }\n\n // exceptions are generally Null Pointers or Number Format\n // Exceptions\n logger.debug(why);\n JOptionPane.showMessageDialog(\n null, why, \"Could not fetch MSB\",\n JOptionPane.ERROR_MESSAGE);\n }\n catch (Exception e) {\n // Retaining this catch-all block as one was present in\n // the previous version of this code. Exceptions\n // raised by 'get' should be caught above -- this block\n // is in case the in-QT handling of the MSB fails.\n // (Not sure if that can happen or not.)\n logger.error(\"Error processing retrieved MSB: \" + e);\n JOptionPane.showMessageDialog(\n null, e.toString(), \"Could not process fetched MSB\",\n JOptionPane.ERROR_MESSAGE);\n }\n }\n }).execute();\n }", "@Override\n\t\tprotected void onPreExecute()\n\n\t\t{\n\n\t\t\tthis.dialog.setMessage(\"Exporting database...\");\n\n\t\t\tthis.dialog.show();\n\n\t\t}", "public boolean loadProgress() {\n return false;\n }", "@Override\n\t\t \tprotected void onPreExecute() {\n\t\t try {\n\t\t\t \tpd=new ProgressDialog(Styles_Dialog.this);\n\t\t\t \tpd.setMessage(\"Loading\");\n\t\t\t \tpd.show();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \t\n\t\t \t}", "void startProgress();", "public interface LoaderPresenter {\n void startProgressBar();\n\n void navigateToLoader();\n\n void startDialog();\n\n}", "boolean hasProgress();", "boolean hasProgress();", "public ProgressMonitor() {\r\n\tif (logger.isDebugEnabled())\r\n\t logger.debug(\"Creating Progress Monitor\");\r\n }", "@Override\n protected void onPreExecute() {\n\n this.dialog.setMessage(\"Please wait ...\");\n this.dialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tthis.dialog.setMessage(\"Exporting database...\");\n\t\t\tthis.dialog.show();\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\trefreshMenuItem.setActionView(R.layout.action_progressbar);\r\n\r\n\t\t\trefreshMenuItem.expandActionView();\r\n\t\t}", "@Override\n protected void onPreExecute() {\n progressDialog.setProgress(0);\n //progressBar.setProgress(0);\n super.onPreExecute();\n }", "public abstract DialogBox showProgressBox(String message);", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(SearchView.this, \"Espere...\", \"Recebendo dados\", true, true);\n\t\t\tprogressDialog.setOnCancelListener(new CancelTaskOnCancelListener(this));\n\t\t}", "@Override\n\t\tpublic ProgressDialog getProgressDialog() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic boolean isInProgress() {\n\t\treturn false;\r\n\t}", "private void buildProgressBar() {\r\n try {\r\n if (pBarVisible == true) {\r\n progressBar = new ViewJProgressBar(srcImage.getImageName(), \"Regularized Isotropic Diffusion ...\",\r\n 0, 100, true, this, this);\r\n int xScreen = Toolkit.getDefaultToolkit().getScreenSize().width;\r\n int yScreen = Toolkit.getDefaultToolkit().getScreenSize().height;\r\n progressBar.setLocation(xScreen / 2, yScreen / 2);\r\n progressBar.setVisible(true);\r\n }\r\n }\r\n catch (NullPointerException npe) {\r\n if (Preferences.debugLevel(Preferences.DEBUG_ALGORITHM)) {\r\n Preferences.debug(\r\n \"AlgorithmRegularizedIsotropicDiffusion: NullPointerException found while building progress bar.\");\r\n\r\n }\r\n } // end buildProgressBar()\r\n }", "@Override\r\n\tpublic void onStartedCheckout() {\n\r\n\t\tpDialog = new ProgressDialog(getActivity());\r\n\t\tpDialog.setMessage(\"Please Wait...\");\r\n\t\tpDialog.setCancelable(false);\r\n\t\tpDialog.setCanceledOnTouchOutside(false);\r\n\t\tpDialog.show();\r\n\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSwingWorker<Void,Void> worker = new SwingWorker<Void,Void>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t//frmIpfs.getContentPane().add(infomation,BorderLayout.CENTER);\n\t\t\t\t\t\t//new Thread(infomation).start();\n\t\t\t\t\t\tinfomation.drawStart();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\twait = new waittingDialog();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}}).start();\n\t\t\t\t\t\t\tcenter.start();\n\t\t\t\t\t\t\twait.startSucess();\n\t\t\t\t\t\t\tstartButton.setEnabled(false);\n\t\t\t\t\t\t\tcloseButton.setEnabled(true);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew IODialog();\n\t\t\t\t\t\t} catch (CipherException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew BlockChainDialog();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tnew ExceptionDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t};\n\t\t\t\tworker.execute();\n\t\t\t}", "@Override\n protected void onPreExecute() {\n progress = new ProgressDialog(hostContext);\n progress.setMessage(\"Wait while books are being downloaded...\");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.show();\n }", "@Override\r\n protected void onPreExecute() {\n if( progressDialog == null ) {\r\n progressDialog = ProgressDialog.show( context, context.getString(R.string.pref_sync_callings_now_title),\"\");\r\n }\r\n }", "public void execute() throws CommandLineModuleExecutionException\n {\n try\n { \n MRMDialog mrmDialog = new MRMDialog(file,meanPrecursorDiscoveryMzTolerance,meanDaughterMzTolerance,SICtolerance,peakStrategyClass,traceAllFragments,syncLH,minPeakCutoff,minAreaCutoff);\n if(getBooleanArgumentValue(\"SELECTED_ION_MONITORING\"))\n {\n mrmDialog.topGraphLabel.setText(\"SIM Intensities\");\n mrmDialog._sim = true;\n }\n //mrmDialog.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);\n mrmDialog.setVisible(true);\n \n mrmDialog.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n// Thread.currentThread().yield();\n\n Thread.currentThread().join();\n }\n catch (Exception e)\n {\n throw new CommandLineModuleExecutionException(e);\n }\n }", "public void actionPerformed(ActionEvent event) {\r\n\r\n if ((progressBar != null) && !progressBar.isComplete()) {\r\n completed = false;\r\n\r\n if (Preferences.is(Preferences.PREF_LOG)) {\r\n String tempStr = new String(this.getClass().getName().substring(this.getClass().getName().lastIndexOf(\".\") +\r\n 1) + \" failed.\");\r\n\r\n if (srcImage != null) {\r\n srcImage.getHistoryArea().append(tempStr);\r\n }\r\n }\r\n\r\n threadStopped = true;\r\n\r\n if (progressBar != null) {\r\n progressBar.dispose();\r\n }\r\n }\r\n }", "@Override\n protected Void doInBackground() throws Exception {\n progressLabel.setText(\"Exporting to VCF...\");\n // Switch \"Start\" button to \"Cancel\".\n workButton.removeActionListener(workButton.getActionListeners()[0]);\n workButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent ae) {\n workButton.setEnabled(false);\n workButton.setText(\"Cancelling...\");\n cancel(true);\n }\n });\n workButton.setText(\"Cancel\");\n\n ExportVCF.exportVCF(variantFile, this);\n return null;\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tprogressDialog = ProgressDialog.show(SlyThemesActivity.this, \"\",Constants.PROCESSING_REQUEST);\n\t\t}", "@Override\n protected void onPreExecute() {\n\n dialog.setCancelable(true);\n dialog.setMessage(\"Fetching...\");\n\n dialog.show();\n\n }", "public interface ProgressSupplier {\n /** Returns the progress string to prefix action execution messages with. */\n String getProgressString();\n }", "@Override\n protected void onPreExecute() {\n mProgress = new ProgressDialog(ctx);\n mProgress.setMessage(\"Finding current location\");\n mProgress.show();\n super.onPreExecute();\n }", "protected void okPressed() {\n\t\tconfig.setExportThreadCount(txtThreadCount.getSelection());\n\t\tconfig.setImportThreadCount(txtMaxImportThreadCountPerTable.getSelection());\n\t\tconfig.setCommitCount(txtCommitCount.getSelection());\n\t\tif (txtPageCount != null) {\n\t\t\tconfig.setPageFetchCount(txtPageCount.getSelection());\n\t\t}\n\t\tif (txtFileMaxSize != null) {\n\t\t\tconfig.setMaxCountPerFile(txtFileMaxSize.getSelection());\n\t\t}\n\t\tconfig.setImplicitEstimate(btnImplicitEstimate.getSelection());\n\t\tsuper.okPressed();\n\t}", "private void viewRepositoryCheckReportButtonActionPerformed() {\n ImportExportLogDialog logDialog = null;\n\n if(ascopyREC != null && checkRepositoryMismatch) {\n logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, ascopyREC.getCurrentRecordCheckMessage());\n logDialog.setTitle(\"Current Repository Mismatch Errors\");\n } else {\n logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, repositoryMismatchErrors);\n logDialog.setTitle(\"Repository Mismatch Errors\");\n }\n\n logDialog.showDialog();\n }", "private void process() {\n final PluginsDialog dialog = new PluginsDialog();\n dialog.show();\n }", "@Override\n\tpublic void run(IAction action) {\n\t\n\t\twindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tif (window != null)\n\t\t{\n\t\t\ttry {\n\t\t\t\tIStructuredSelection selection = (IStructuredSelection) window.getSelectionService().getSelection();\n\t\t Object firstElement = selection.getFirstElement();\n \t\tinit();\n \t\t\n \t\tIProject project = (IProject)((IAdaptable)firstElement).getAdapter(IProject.class);\n\t ProjectAnalyzer.firstElement = (IAdaptable)firstElement;\n\t ProjectAnalyzer.url = project.getLocationURI().getPath().toString().substring(1);\n\t File dbFile = new File(ProjectAnalyzer.url + \"\\\\\" + project.getName() + \".db\");\n\t \n\t if(dbFile.exists()){\n\t \tMessageBox dialog = new MessageBox(window.getShell(), SWT.ICON_QUESTION | SWT.OK| SWT.CANCEL);\n\t \t\tdialog.setText(\"Select\");\n\t \t\tdialog.setMessage(\"The DB file of the project exists. \\n Do you want to rebuild the project?\");\n\t \t\tint returnCode = dialog.open();\n\t \t\t\n\t \t\tif(returnCode==SWT.OK){\n\t \t\t\tdbFile.delete();\n\t \t\t\tthis.analysis(project);\n\t \t\t\tthis.showMessage(\"Complete\",\"Rebuild has been complete!\");\n\t \t\t\t//do something\n\t \t\t\tthis.doTask();\n\t \t\t}else{\n\t \t\t\t//do something\n\t \t\t\tthis.doTask();\n\t \t\t}\n\t }else{\n\t \tthis.analysis(project);\n\t \tthis.showMessage(\"Complete\",\"Rebuild has been complete!\");\n\t \t//do something\n\t \tthis.doTask();\n\t }\n \t\t\n\t \n\t\t\t}catch(java.lang.NullPointerException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}catch (java.lang.ClassCastException e2){\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "@SuppressLint(\"NewApi\") @Override\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t\t\t// Shows Progress Bar Dialog and then call doInBackground method\n\t\t\t\t\t\tshowDialog(progress_bar_type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tprgDialog.setProgress(0);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// \n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// ===============================================\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic IStatus runInWorkspace(final IProgressMonitor monitor) throws CoreException\r\n\t\t\t\t\t{\n\t\t\t\t\t\t// Post a documentation generation request.\r\n\t\t\t\t\t\tDocumentationGenerationRequest req = new DocumentationGenerationRequestFromUI(pkgFinal, true, monitor)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tprotected boolean isRunningModal()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tBoolean b = (Boolean)getProperty(IProgressConstants.PROPERTY_IN_DIALOG);\r\n\t\t\t\t\t\t\t\treturn b != null ? b.booleanValue() : false;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tprotected void postponeAction(Action act)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsetProperty(IProgressConstants.KEEP_PROPERTY, Boolean.TRUE);\r\n\t\t\t\t\t\t\t\tsetProperty(IProgressConstants.ACTION_PROPERTY, act);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic boolean importProjects()\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tDictionary<String, String> props = new Hashtable<String, String>();\r\n\t\t\t\t\t\tmonitor.beginTask(\"Generating documentation\", 100);\r\n\r\n\t\t\t\t\t\tfinal BundleContext context = Activator.getDefault().getBundle().getBundleContext();\r\n\t\t\t\t\t\tcontext.registerService(DocumentationGenerationRequest.class.getName(), req, props);\r\n\r\n\t\t\t\t\t\treturn Status.OK_STATUS;\r\n\t\t\t\t\t}", "private void errorLogButtonActionPerformed() {\n ImportExportLogDialog logDialog;\n\n if(ascopy != null && ascopy.isCopying()) {\n logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, ascopy.getCurrentProgressMessage());\n logDialog.setTitle(\"Current Data Transfer Errors\");\n } else {\n logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, migrationErrors);\n logDialog.setTitle(\"Data Transfer Errors\");\n }\n\n logDialog.showDialog();\n }", "public void showProgressDialog() {\n showProgressDialog(null);\n }", "public interface IBaseView {\n\n void showBaseProgressDialog(String msg);\n\n void hideBaseProgressDialog();\n}" ]
[ "0.62517726", "0.61751956", "0.59807307", "0.5980704", "0.59054756", "0.58675927", "0.5856205", "0.58411264", "0.5833097", "0.581295", "0.58118916", "0.5809891", "0.5777093", "0.5777093", "0.57645255", "0.5735805", "0.5716465", "0.57148933", "0.57045084", "0.56770504", "0.56584865", "0.5655173", "0.5651067", "0.5598762", "0.55644673", "0.55499405", "0.5532662", "0.5532662", "0.55130965", "0.54908425", "0.54765815", "0.54401606", "0.5381972", "0.5377588", "0.5377588", "0.5371296", "0.5365649", "0.53541034", "0.53541034", "0.5351662", "0.5350391", "0.53473777", "0.5343949", "0.53431827", "0.5338845", "0.53340787", "0.53336513", "0.5325649", "0.53164905", "0.5305293", "0.5304455", "0.5298657", "0.527402", "0.5268421", "0.52671826", "0.5259288", "0.5255963", "0.5239822", "0.5232404", "0.5228656", "0.5227746", "0.52219814", "0.5218956", "0.5212109", "0.52108747", "0.5205817", "0.5203827", "0.5201595", "0.5201595", "0.52008766", "0.51963097", "0.5184148", "0.51807576", "0.51777434", "0.5177149", "0.5156906", "0.5151113", "0.5149887", "0.5145491", "0.514409", "0.5143559", "0.51429945", "0.513504", "0.51334476", "0.512565", "0.51219636", "0.51193684", "0.511759", "0.51163304", "0.5114805", "0.51122457", "0.5111155", "0.510694", "0.5106454", "0.5106108", "0.5106108", "0.510524", "0.50943065", "0.5094256", "0.50920355", "0.50857127" ]
0.0
-1
The specified format is replaced by a prototypical instance of the required type of grid format, dimensioned as specified.
protected Element replace(Element element, int rows, int cols) { Element replacement = null; if (!selectionIsAppropriate(element)) { throw new IllegalArgumentException( "The action can not replace a " + //$NON-NLS-1$ element.getName()); } else { try { // selectionManager is optional if (selectionManager != null) { // disable the selection events this.selectionManager.setEnabled(false); } replacement = FormatPrototype.createSizedGrid(formatType, null, rows, cols, progressMonitor); } finally { if (selectionManager != null) { // ensure selection events are enabled this.selectionManager.setEnabled(true); } } // call common utility method replaceElement(element, replacement); } return replacement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFormat(edu.umich.icpsr.ddi.FormatType format)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().find_element_user(FORMAT$10, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FormatType)get_store().add_element_user(FORMAT$10);\n }\n target.set(format);\n }\n }", "public void setFormat(Format format) {\n this.format = format.getIndex();\n }", "@Field(0) \r\n\tpublic D2D1_PIXEL_FORMAT format(ValuedEnum<DXGI_FORMAT> format) {\r\n\t\tthis.io.setEnumField(this, 0, format);\r\n\t\treturn this;\r\n\t}", "protected Format doSetFormat(Format format)\n {\n return null;\n }", "Format internalSetFormat(Format format)\n {\n return doSetFormat(format);\n }", "public void setFormat(String format) {\n this.format = format;\n }", "public void setFormat(String format) {\n this.format = format;\n }", "public void setFormat(String format) {\n this.format = format;\n }", "public void setFormat(String format) {\r\n _format = format;\r\n }", "public\tint\tgetTypeFormatId()\t{ return StoredFormatIds.FORMATABLE_ARRAY_HOLDER_V01_ID; }", "public FormattedCellRenderer(Format format) {\r\n this.format = format;\r\n }", "GridType createGridType();", "void setFormat(ImageFormat format);", "@Field(0) \n\tpublic AVBufferSrcParameters format(int format) {\n\t\tthis.io.setIntField(this, 0, format);\n\t\treturn this;\n\t}", "public ImageProperties setFormat(ImageFormatProperties format) {\n this.format = format;\n return this;\n }", "public @NotNull Image reformat(ColorFormat format)\n {\n if (format != ColorFormat.GRAY &&\n format != ColorFormat.GRAY_ALPHA &&\n format != ColorFormat.RGB &&\n format != ColorFormat.RGBA) {throw new UnsupportedOperationException(\"invalid format: \" + format);}\n \n if (this.data != null && this.format != format)\n {\n Color.Buffer output = this.data.copy(format);\n \n this.data.free();\n \n this.data = output;\n this.format = format;\n this.mipmaps = 1;\n }\n return this;\n }", "public void setFormat(RMFormat aFormat)\n{\n // Add format to first binding\n if((aFormat==null || aFormat instanceof java.text.Format) && getBindingCount()>0)\n getBinding(0).setFormat((java.text.Format)aFormat);\n \n // Pass down to children\n for(int i=0, iMax=getChildCount(); i<iMax; i++)\n getChild(i).setFormat(aFormat);\n}", "public static Format getFormat(int format) throws IOException {\r\n\r\n switch (format) {\r\n case Order.FORMAT_FLAT: return new FormatFlat();\r\n case Order.FORMAT_TREE: return new FormatTree();\r\n case Order.FORMAT_NORITSU: return new FormatNoritsu();\r\n case Order.FORMAT_KONICA: return new FormatKonica();\r\n case Order.FORMAT_FUJI: return new FormatFuji();\r\n case Order.FORMAT_FUJI_NEW: return new FormatFujiNew();\r\n case Order.FORMAT_DLS: return new FormatDLSStub();\r\n case Order.FORMAT_KODAK: return new FormatKodak();\r\n case Order.FORMAT_AGFA: return new FormatAgfa();\r\n case Order.FORMAT_LUCIDIOM: return new FormatLucidiom();\r\n case Order.FORMAT_PIXEL: return new FormatPixel();\r\n case Order.FORMAT_DP2: return new FormatDP2();\r\n case Order.FORMAT_BEAUFORT: return new FormatBeaufort();\r\n case Order.FORMAT_DKS3: return new FormatDKS3();\r\n case Order.FORMAT_DIRECT_PDF: return new FormatDirectPDF();\r\n case Order.FORMAT_ZBE: return new FormatZBE();\r\n case Order.FORMAT_FUJI3: return new FormatFuji3();\r\n case Order.FORMAT_HP: return new FormatHP();\r\n case Order.FORMAT_XEROX: return new FormatXerox();\r\n case Order.FORMAT_DIRECT_JPEG: return new FormatDirectJPEG();\r\n case Order.FORMAT_BURN: return new FormatBurn();\r\n case Order.FORMAT_HOT_FOLDER: return new FormatHotFolder();\r\n case Order.FORMAT_DNP: return new FormatDNP();\r\n case Order.FORMAT_PURUS: return new FormatPurus();\r\n case Order.FORMAT_RAW_JPEG: return new FormatRawJPEG();\r\n default:\r\n throw new IOException(Text.get(Format.class,\"e1\"));\r\n }\r\n }", "public abstract void setImageFormat(String format);", "public abstract DataType<T> newInstance(String format);", "public void setFormat(String fmt)\n {\n format = fmt;\n }", "public NumberSliderElement numberFormat( @Nullable NumberFormat format )\n {\n setNumberFormat( format );\n return this;\n }", "public final void updateFormat(CsvFormat format) {\n\t\tnewLine = format.getNormalizedNewline();\n\t\tmultiDelimiter = format.getDelimiterString().toCharArray();\n\t\tif (multiDelimiter.length == 1) {\n\t\t\tmultiDelimiter = null;\n\t\t\tdelimiter = format.getDelimiter();\n\t\t\tdelimiters = new char[]{delimiter, newLine};\n\t\t} else {\n\t\t\tdelimiters = new char[]{multiDelimiter[0], newLine};\n\t\t}\n\t\tquote = format.getQuote();\n\t\tquoteEscape = format.getQuoteEscape();\n\t\tescapeEscape = format.getCharToEscapeQuoteEscaping();\n\t}", "public abstract void format(Job job, Order order, Object formatConfig) throws Exception;", "public final void setFormat(AdFormat format) {\n\t\timpl.setFormat(format);\n }", "public void mo1606a(Format format) {\n }", "public void addFormat(Format format);", "public void setDisplayingFormat(String format){\n\t\tthis.currentShowingMode = format;\n\t}", "public void setFormat(ChartFormat chartFormat) {\n // check for null pointer\n if( chartFormat == null) {\n // error ..\n eHandler.newError(ErrorType.NULL_ARGUMENT, \"setFormat\");\n\n // exit from method\n return;\n } // end of if statement\n\n // set the format\n format = new ChartFormat(chartFormat);\n\n // force repaint of the window to update it\n repaint();\n\n }", "Object getFormat();", "public interface NeuralNetworkFormat extends Format<NeuralNetwork>\n{\n /**\n * @return the connector format provider\n */\n ConnectorFormatProvider getConnectorFormatProvider();\n\n /**\n * @return the layerFormatter\n */\n LayerFormat getLayerFormatter();\n}", "public void setPreviewFormat(int pixel_format) {\n String s = cameraFormatForPixelFormat(pixel_format);\n if (s == null) {\n throw new IllegalArgumentException();\n }\n\n set(\"preview-format\", s);\n }", "@Override\n public void setFormat(Format format) {\n if (format != Format.XML)\n throw new IllegalArgumentException(\"JAXBHandle supports the XML format only\");\n }", "public void setFormat(Connector connector, Format format);", "public NewGridFormatActionCommand(FormatType formatType,\n ODOMSelectionManager selectionManager) {\n super(formatType, selectionManager);\n this.displayProgress = true;\n }", "public void setOutputFormat(OutputFormat format);", "@SuppressWarnings(\"unchecked\")\n public TCS dataFormat(final String format) {\n Short fmt = builder.cacheDataFormat.get(format);\n if (fmt == null) {\n fmt = wb.createDataFormat().getFormat(format);\n builder.cacheDataFormat.put(format, fmt);\n }\n cellStyle_p.setDataFormat(fmt);\n\n return (TCS) this;\n }", "public NewGridFormatActionCommand(FormatType formatType,\n ODOMSelectionManager selectionManager,\n boolean displayProgress) {\n this(formatType, selectionManager);\n this.displayProgress = displayProgress;\n }", "public RuleBasedNumberFormat(int format)\n/* */ {\n/* 822 */ this(ULocale.getDefault(ULocale.Category.FORMAT), format);\n/* */ }", "public BioFormatsFormat() {\n\t\tcacheReaderClasses();\n\t}", "public void setFormat(final NumberFormat f) {\r\n format = f;\r\n }", "public void setCustomFormat(CSVCustomFormat format) {\n Log.d(TAG,\"setCustomFormat \"+format.getFormat().hashCode() + \" \"+getCustomFormatData().getFormat().hashCode());\n if(!format.equals(getCustomFormatData())) {\n Log.d(TAG,\"New Format\");\n csvCustomFormat.setValue(format);\n }\n }", "public edu.umich.icpsr.ddi.FormatType addNewFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FormatType target = null;\n target = (edu.umich.icpsr.ddi.FormatType)get_store().add_element_user(FORMAT$10);\n return target;\n }\n }", "public void m7902a(int format) {\n this.f6691d = format;\n }", "private Format()\n {\n super();\n }", "public abstract DataType<T> newInstance(String format, Locale locale);", "public BaseTypeIdImpl(int formatId)\n {\n this.formatId = formatId;\n setTypeIdSpecificInstanceVariables();\n }", "public Dataset withFormat(String format) {\n setFormat(format);\n return this;\n }", "public Dataset withFormat(InputFormat format) {\n this.format = format.toString();\n return this;\n }", "public static ReportFormat asFormat(Object arg, char style) {\n ReportFormat reportFormat;\n if (arg instanceof ReportFormat) {\n return (ReportFormat)arg;\n }\n if (style == '~') {\n return new LispFormat(arg.toString());\n }\n CharArrayInPort iport = arg instanceof FString ? ((FString)arg).openReader() : new CharArrayInPort(arg.toString());\n try {\n reportFormat = ParseFormat.parseFormat(iport, style);\n }\n catch (Throwable throwable) {\n try {\n iport.close();\n throw throwable;\n }\n catch (IOException ex) {\n throw new RuntimeException(\"Error parsing format (\" + ex + \")\");\n }\n catch (ParseException ex) {\n throw new RuntimeException(\"Invalid format (\" + ex + \")\");\n }\n catch (IndexOutOfBoundsException ex) {\n throw new RuntimeException(\"End while parsing format\");\n }\n }\n iport.close();\n return reportFormat;\n }", "public void setGroup (String format, Object ... args)\n {\n group = String.format (format, args);\n }", "public void setGroup (String format, Object ... args)\n {\n group = String.format (format, args);\n }", "public Class getWriteClass(int formatIndex);", "public void addFormat(ReportGenerator.Format format) {\n formats.add(format);\n }", "public void replaceFormats(List<Format> formats);", "@Override\n public Format setInputFormat(Format format)\n {\n Format inputFormat\n = ((format instanceof VideoFormat)\n && (((VideoFormat) format).getSize() == null))\n ? null // size is required\n : super.setInputFormat(format);\n \n if (logger.isDebugEnabled() && (inputFormat != null))\n logger.debug(\"SwScaler set to input in \" + inputFormat);\n return inputFormat;\n }", "public void setDefaultNumberFormat(NumberFormat format)\n {\n valueRenderer.defaultNumberFormat = format;\n }", "public void unsetFormat()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FORMAT$10, 0);\n }\n }", "public interface GridPrinter {\n\n\tpublic void printGrid(Grid<? extends Object> grid, Writer writer);\n\n\tpublic void printGrid(Grid<? extends Object> grid);\n\n\tpublic String printGridToString(Grid<? extends Object> grid);\n\n}", "public void formatChanged()\n {\n // for now, just create formatter from scratch, but later we can just detect changes and act accordingly\n setFormatterFromTextPane(formatContainer.getSelectedFormatter());\n setHasChanged(true);\n }", "public NumberFormat getGenericNumberFormat(String ns) {\n NumberFormat result = (NumberFormat) cacheNumberFormats.get(cldrFile.getLocaleID() + \"@numbers=\" + ns);\n if (result != null) return result;\n ULocale ulocale = new ULocale(cldrFile.getLocaleID() + \"@numbers=\" + ns);\n result = NumberFormat.getInstance(ulocale);\n cacheNumberFormats.put(cldrFile.getLocaleID() + \"@numbers=\" + ns, result);\n return result;\n }", "default WorkdayEndpointProducerBuilder format(String format) {\n doSetProperty(\"format\", format);\n return this;\n }", "public DataListColumn addFormat(DataListColumnFormat format) {\n if (formats == null) {\n formats = new ArrayList<DataListColumnFormat>();\n }\n formats.add(format);\n return this;\n }", "public Builder clearFormat() {\n \n format_ = getDefaultInstance().getFormat();\n onChanged();\n return this;\n }", "public interface InputFormat {\n /**\n * Return a FileFilter that can be used to identify files which can be restored\n * with this Storage Format. Typically, each input format has its own \n * recognizable file naming convention.\n *\n * @return FileFilter to be used with a javax.swing.JFileChooser\n */\n public javax.swing.filechooser.FileFilter getFileFilter();\n \n /**\n * Return a JFileChooser accessory that can be used to customize the input\n * format.\n *\n * @return A JFileChooser accessory to be used with a javax.swing.JFileChooser\n * Returns null, if no accessory is provided for this format.\n */\n public JComponent getInputFormatAccessory();\n \n /**\n * Reads figures from a file and replaces the children of the drawing\n * with them.\n * <p>\n * This is a convenience method for calling read(File,Drawing,true).\n *\n * @param file The file.\n * @param drawing The drawing.\n */\n public void read(File file, Drawing drawing) throws IOException;\n \n /**\n * Reads figures from a file and adds them to the specified drawing.\n *\n * @param file The file.\n * @param drawing The drawing.\n * @param replace Set this to true, if the contents of the file replaces the\n * contents of the drawing (for example, when loading a drawing from a file).\n * Set this to false, to add the contents of the file to the drawing (for\n * example, when the file has been dropped into the drawing view).\n */\n public void read(File file, Drawing drawing, boolean replace) throws IOException;\n\n /**\n * Reads figures from a file and adds them to the specified drawing.\n *\n * @param in The input stream.\n * @param drawing The drawing.\n * @param replace Set this to true, if the contents of the stream replaces the\n * contents of the drawing (for example, when loading a drawing from a stream).\n * Set this to false, to add the contents of the file to the drawing (for\n * example, when the stream has been dropped into the drawing view).\n */\n public void read(InputStream in, Drawing drawing, boolean replace) throws IOException;\n\n /**\n * Returns true, if this InputFormat can readFigures TransferData using the \n * specified DataFlavor.\n * \n * @param flavor A DataFlavor.\n */\n public boolean isDataFlavorSupported(DataFlavor flavor);\n \n /**\n * Reads figures from the specified Transferable and adds them to the\n * specified drawing.\n * \n * @param t The Transferable. \n * @param drawing The drawing.\n * @param replace Set this to true, if the contents of the transferable\n * replaces the contents of the drawing (for example, when loading a drawing\n * from a transferable). Set this to false, to add the contents of the \n * transferable to the drawing (for example, when the transferable has been\n * dropped or pasted into the drawing view).\n */\n public void read(Transferable t, Drawing drawing, boolean replace) throws UnsupportedFlavorException, IOException;\n}", "public abstract Grid<?> getGrid();", "public void setVicarRealFmt(String format) {\n\t\tvicarRealFmt = format;\n\t}", "@SuppressWarnings(\"unchecked\")\n public <F> ConverterFormat<F> getFormat(Class<F> formatType) {\n ConverterFormat<F> format = (ConverterFormat<F>) formats.get(formatType);\n\n if (format == null) {\n throw new UnsupportedOperationException(\"The format \" + formatType + \" is not supported.\");\n }\n\n return format;\n }", "public void changeEdgeTypeOfGrid(String type) {\n if(type.equals(\"toroidal\")) {\n getCellGrid().setGridLimit(GridLimit.TOROIDAL);\n } else if(type.equals(\"finite\")) {\n getCellGrid().setGridLimit(GridLimit.FINITE);\n } else if(type.equals(\"infinite\")) {\n getCellGrid().setGridLimit(GridLimit.INFINITE);\n }\n }", "protected Format doGetFormat()\n {\n return null;\n }", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "public Class getReadClass(int formatIndex);", "public String getFormat() {\n\t\treturn format;\n\t}", "public Class<F> getFormatType() {\n\t\treturn formatType;\n\t}", "public void reFormatPieceLayer() {\r\n\t\tbody.removeAll();\r\n\t\tfor (int i = 0; i < 8 * 8; i++) {\r\n\t\t\tChessPiece tmpPiece = piece.get(order[i]);\r\n\t\t\tif (tmpPiece == null) {\r\n\t\t\t\tspacePieces[i].position = order[i];\r\n\t\t\t\tpiece.put(order[i], spacePieces[i]);\r\n\t\t\t\tbody.add(spacePieces[i]);\r\n\t\t\t} else {\r\n\t\t\t\tpiece.put(order[i], tmpPiece);\r\n\t\t\t\tbody.add(tmpPiece);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbody.repaint();\r\n\t}", "public boolean isCompatibleWithFormat(Format format) {\n\t\treturn formats.contains(format);\n\t}", "public void setFormat(String format) {\n\t\tString contents = getText().trim();\n\t\tdouble value = 0;\n\t\tif (contents.length() != 0) {\n\t\t\ttry {\n\t\t\t\tvalue = parser.parse(contents).doubleValue();\n\t\t\t} catch (ParseException ex) {\n\t\t\t\tthrow new ErrorException(ex);\n\t\t\t}\n\t\t}\n\t\tformatString = format;\n\t\tif (format == null) {\n\t\t\tformatter = null;\n\t\t\tparser = NumberFormat.getNumberInstance(Locale.US);\n\t\t} else {\n\t\t\tformatter = (format.length() == 0) ? new DecimalFormat() : new DecimalFormat(format);\n\t\t\tparser = formatter;\n\t\t}\n\t\tif (contents.length() != 0) {\n\t\t\tsetValue(value);\n\t\t}\n\t}", "com.ctrip.ferriswheel.proto.v1.GridOrBuilder getGridOrBuilder();", "private ARXInteger(String format){\r\n if (format == null || format.equals(\"Default\")){\r\n this.format = null;\r\n this.string = null; \r\n this.locale = null;\r\n } else {\r\n this.format = new DecimalFormat(format);\r\n this.string = format;\r\n this.locale = null;\r\n }\r\n }", "@Override\n void collectRelatedFormats(Catalog catalog,\n Map<String, Format> newFormats) {\n assert proxyClassName != null;\n catalog.createFormat(proxyClassName, newFormats);\n }", "public Object[][] getFileFormats(Long filetypeNr)\r\n\t\t\tthrows ProcessingException;", "@Override\n\tpublic ImageFormatAllowableConversionList getFormatConfiguration(\n\t\t\tImageFormat format) {\n\t\treturn null;\n\t}", "private static Object[] formatShapedGrid(Object[] itemStacksRaw, int width, int height) {\n int rawIndex = 0;\n Object[] itemStacks = new Object[9];\n for(int y = 0; y < height; y++) {\n for(int x = 0; x < width; x++) {\n itemStacks[y * 3 + x] = itemStacksRaw[rawIndex++];\n if(rawIndex >= itemStacksRaw.length) break;\n }\n if(rawIndex >= itemStacksRaw.length) break;\n }\n return itemStacks;\n }", "public void setSupportFormat(String supportFormat) {\r\n\t\tthis.supportFormat = supportFormat;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public Set<?> instantiate() throws IOException {\n OrthoMclFormat format = (OrthoMclFormat) wizard.getProperty(PROP_ORTHOMCL_FORMAT);\n format.setDirectory(wizard.getDirectory());\n //update the format settings\n// format.setFilePerOrganism((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_FILE_PER_ORGANISM));\n// format.setPrefixOrganism((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_PREFIX_FOUR_LETTER_ORGANISM));\n// format.setFilePerMethod((Boolean) this.wizard.getProperty(GroupingWizardPanel.PROP_FILE_PER_METHOD));\n \n// format.setIsWindows((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_IS_WINDOWS));\n// format.setPerlDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_PERL_DIR));\n// format.setOrthoDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_ORTHO_DIR));\n// format.setMclDir((String) this.wizard.getProperty(OrthoMclFormat.PROP_MCL_DIR));\n\n// format.setDb_userName((String) this.wizard.getProperty(OrthoMclFormat.PROP_USER_NAME));\n// format.setDb_password((String) this.wizard.getProperty(OrthoMclFormat.PROP_PASSWORD));\n// format.setDatabaseName((String) this.wizard.getProperty(OrthoMclFormat.PROP_DB_NAME));\n// format.setDropCreateDatabase((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DROP_CREATE_DB));\n //format.setMysqlBin((String) this.wizard.getProperty(OrthoMclFormat.PROP_MYSQL_BIN));\n\n format.setRunBlastp((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DO_BLASTP));\n format.setRunMakeBlastDb((Boolean) this.wizard.getProperty(OrthoMclFormat.PROP_DO_MAKEBLAST));\n //format.setBlastBin((String) wizard.getProperty(OrthoMclFormat.PROP_BLAST_BIN));\n format.setMakeblastdbParameters((String) wizard.getProperty(OrthoMclFormat.PROP_MAKEBLASTDB_PARAMETERS));\n format.setBlastpParameters((String) wizard.getProperty(OrthoMclFormat.PROP_BLASTP_PARAMETERS));\n\n format.setMinProteinLength((String) this.wizard.getProperty(OrthoMclFormat.PROP_MIN_PROT_LENGTH));\n format.setMaxPercentStops((String) this.wizard.getProperty(OrthoMclFormat.PROP_MAX_PERCENT_STOPS));\n format.setPercentMatchCutoff((String) this.wizard.getProperty(OrthoMclFormat.PROP_PERCENT_MATCH));\n format.seteValueCutoff((String) this.wizard.getProperty(OrthoMclFormat.PROP_EVALUE_CUTOFF));\n// format.setExecute((Boolean)this.wizard.getProperty(OrthoMclFormat.PROP_EXECUTE));\n try {\n final OrthoMclFormat myFormat = format;\n myFormat.download();\n } catch (DownloadException ex) {\n Exceptions.printStackTrace(ex);\n }\n //set the last directory\n if(format.getDirectory() != null){\n NbPreferences.forModule(OrthoMclFormat.class).put(\"orthomcl-run\", format.getDirectory());\n }\n\n return Collections.emptySet();\n }", "@Override\n public Format setOutputFormat(Format format)\n {\n Format outputFormat = super.setOutputFormat(format);\n \n if (logger.isDebugEnabled() && (outputFormat != null))\n logger.debug(\"SwScaler set to output in \" + outputFormat);\n return outputFormat;\n }", "private Grid(Grid oldGrid) {\n\n grid = new String[Main.Y_SIZE][Main.X_SIZE][Main.Z_SIZE];\n this.gateDatabase = oldGrid.gateDatabase;\n this.netDatabase = oldGrid.netDatabase;\n\n for (int i = 0; i < Main.Z_SIZE; i++) {\n for (int k = 0; k < Main.X_SIZE; k++) {\n for (int n = 0; n < Main.Y_SIZE; n++) {\n grid[n][k][i] = oldGrid.grid[n][k][i];\n }\n }\n }\n }", "public self format(String format) {\n\t\tfor (X vaporView : members)\n\t\t\tvaporView.format(format);\n\t\treturn (self) this;\n\n\t}", "public DecimalFormat getNumberFormat(int displayType, Language language, String pattern) {\n\t\treturn null;\n\t}", "private void setUpFormat() {\n form = (DecimalFormat)NumberFormat.getNumberInstance();\n form.setMaximumFractionDigits(precision);\n }", "public DatasetStorageFormat format() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().format();\n }", "default WorkdayEndpointConsumerBuilder format(String format) {\n doSetProperty(\"format\", format);\n return this;\n }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "interface FormatInterface {\n void processing();\n}", "public interface Grid {\n /**\n * @name getCell\n * @desc Ritorna la cella specificata dai parametri.\n * @param {int} x - Rappresenta la coordinata x della cella.\n * @param {int} y - Rappresenta la coordinata y della cella.\n * @returns {Client.Games.Battleship.Types.Cell}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell getCell(int x, int y);\n /**\n * @name getHeigth\n * @desc Ritorna l'altezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getHeight();\n /**\n * @name getLength\n * @desc Ritorna la lunghezza della griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public int getLength();\n /**\n * @name Equals\n * @desc Ritorna true se i grid sono uguali.\n * @returns {boolean}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public boolean equals(Grid grid);\n /**\n * @name getGrid\n * @desc Ritorna la la griglia del campo da gioco.\n * @returns {int}\n * @memberOf Client.Games.Battleship.Types.Grid\n */\n public Cell [][] getCells();\n}", "public static String stringFormat(String format, Object... objs) {\n\n String retVal = \"\";\n\n Pattern p = Pattern.compile(\"([{][^}]*[}])\");\n\n Matcher m = p.matcher(format);\n\n String individualFormat;\n int order = -1;\n int pos = -1;\n\n //loc_re.match(format);\n\n retVal = format;\n\n int loc_Conta = 0;\n\n while (m.find()) {\n\n if (m.group().length() == 0) {\n continue;\n }\n\n pos = m.group().indexOf(\":\");\n\n if (pos > 0) {\n individualFormat = m.group().substring(pos + 1, m.group().length() - pos + 1);\n\n order = Integer.parseInt(m.group().substring(1, pos));\n\n //Logger.getLogger(GeneralFunc.class).log(Level.DEBUG, \"individualFormat \" + individualFormat + \"orden: \" + order);\n\n retVal = retVal.replace(m.group(), formatObject(objs[order], individualFormat, '.'));\n } else {\n retVal = retVal.replace(m.group(), formatObject(objs[Integer.parseInt(m.group().substring(1, m.group().length() - 1))], \"\", '.'));\n }\n\n loc_Conta++;\n }\n\n\n return retVal;\n }", "public void setMainFormatTypeClass(Class<?> mainFormatTypeClass) {\n this.mainFormatTypeClass = mainFormatTypeClass;\n }", "public void setOnClickDisplayFormat(int format){\n \t\tthis.displayFormat = format;\n \t}", "ImageFormat getFormat();", "public native void setMagick(String imageFormat) throws MagickException;", "public Grid3d convertGrid(final Grid3d inputGrid, final PostStack3d velocityVolume, final Method conversionMethod,\n final AreaOfInterest areaOfInterest, final String outputGridName, final Grid3d referenceGrid,\n final IProgressMonitor monitor, final ILogger logger, final IRepository repository) {\n\n // Determine the grid.\n GridGeometry3d gridGeometry = inputGrid.getGeometry();\n Domain inputDomain = inputGrid.getZDomain();\n ConversionDirection conversionMode = null;\n\n if (inputDomain.equals(Domain.TIME)) {\n conversionMode = ConversionDirection.TIME_TO_DEPTH;\n } else if (inputDomain.equals(Domain.DISTANCE)) {\n conversionMode = ConversionDirection.DEPTH_TO_TIME;\n } else {\n logger.error(\"Invalid domain type. Must be time or depth.\");\n return null;\n }\n\n // Initialize.\n Grid3d outputGrid = null;\n\n try {\n\n // Convert the grid z values.\n float[][] result = convertGridValues(inputGrid, velocityVolume, conversionMethod, conversionMode, areaOfInterest,\n monitor, logger);\n\n // Create a new grid object.\n switch (conversionMode) {\n\n case TIME_TO_DEPTH:\n if (repository == null) {\n // If the repository is null we just want an in memory grid.\n outputGrid = Grid3dFactory.createInMemory(outputGridName, gridGeometry,\n UNIT_PREFS.getVerticalDistanceUnit(), result, inputGrid.getNullValue());\n } else {\n outputGrid = Grid3dFactory.create(repository, referenceGrid, result, outputGridName, gridGeometry,\n UNIT_PREFS.getVerticalDistanceUnit());\n }\n outputGrid.setZDomain(Domain.DISTANCE);\n outputGrid.update();\n break;\n case DEPTH_TO_TIME:\n if (repository == null) {\n // If the repository is null we just want an in memory grid.\n outputGrid = Grid3dFactory.createInMemory(outputGridName, gridGeometry, UNIT_PREFS.getTimeUnit(), result,\n inputGrid.getNullValue());\n } else {\n // Otherwise create the grid in the repository.\n outputGrid = Grid3dFactory.create(repository, referenceGrid, result, outputGridName, gridGeometry,\n UNIT_PREFS.getTimeUnit());\n }\n outputGrid.setZDomain(Domain.TIME);\n outputGrid.update();\n break;\n default:\n logger.error(\"Invalid conversion mode - Convert from (Depth to Time) or (Time to Depth)\");\n return null;\n }\n outputGrid.update();\n\n } catch (Exception e) {\n logger.error(\"Error occurred when executing the horizonStretch algorithm\", e);\n outputGrid = null;\n }\n\n return outputGrid;\n }" ]
[ "0.59683865", "0.5933664", "0.5792562", "0.57851785", "0.57565224", "0.57228935", "0.57228935", "0.57228935", "0.5722732", "0.5712576", "0.5657148", "0.5634334", "0.56188804", "0.5519108", "0.54356486", "0.5414588", "0.54055053", "0.5401526", "0.53833914", "0.53280044", "0.52765995", "0.52646583", "0.52472943", "0.5240936", "0.5209222", "0.5204486", "0.5188171", "0.5182732", "0.5169409", "0.5154513", "0.5148528", "0.5139134", "0.5136136", "0.511972", "0.51062536", "0.50947803", "0.5057988", "0.5049385", "0.50129473", "0.50039977", "0.49957648", "0.49727052", "0.49499214", "0.4919365", "0.4906344", "0.4893118", "0.4892179", "0.48843414", "0.48730952", "0.48697683", "0.48635465", "0.48635465", "0.48446286", "0.4818266", "0.4816067", "0.47931644", "0.47927365", "0.4783683", "0.47688627", "0.47652945", "0.4755647", "0.4746844", "0.47439754", "0.4743907", "0.4732056", "0.47308674", "0.47285375", "0.47215042", "0.4719912", "0.4717605", "0.47158906", "0.47140658", "0.47124177", "0.46966386", "0.46928638", "0.46917176", "0.46724153", "0.46720856", "0.46720734", "0.4672011", "0.46712023", "0.4670657", "0.46686083", "0.46616548", "0.46597955", "0.46581984", "0.46553174", "0.46525684", "0.46513483", "0.46457753", "0.46446687", "0.4643516", "0.4637721", "0.4620522", "0.4618538", "0.46184462", "0.46070847", "0.4604486", "0.46019155", "0.4597566", "0.45944887" ]
0.0
-1
Constructor for the Surround Panel Inherits the attributes of a JPanel. Enables the user to interact with the SurroundGame.
public SurroundPanel(JMenuItem quitItem,JMenuItem newGameItem){ try{ this.addIcons(); }catch(MalformedURLException exception){ exception.printStackTrace(); } this.quitItem = quitItem; this.newGameItem = newGameItem; startUpConditions(); game = new SurroundGame(selectedSize,selectedPlayers, firstTurn); winCounter = new JTextArea(1,10); playerTrack = new JTextArea(1,10); playerTrack.setText(game.toString()); menuBar = new JMenuBar(); menu = new JMenu("Options"); winCounter.setFont(new Font("Serif", Font.BOLD, 24)); playerTrack.setFont(new Font("Serif", Font.BOLD, 24)); southTextArea = new JPanel(); center = new JPanel(); top = new JPanel(); bottom = new JPanel(); setLayout(new BorderLayout()); // board = new JButton[selectedSize][selectedSize]; listener = new ButtonListener(); center.setLayout(new GridLayout(selectedSize, selectedSize,3,2)); southTextArea.setLayout(new GridLayout(1,2,50,0)); dim = new Dimension(30,30); Buttons(); setCells(); quitItem.addActionListener(listener); newGameItem.addActionListener(listener); menu.add(quitItem); menu.add(newGameItem); menuBar.add(menu); top.add(menuBar); bottom.add(winCounter); bottom.add(playerTrack); southTextArea.add(winCounter); southTextArea.add(playerTrack); JLabel title = new JLabel("Surround"); top.add(title); center.setBackground(Color.LIGHT_GRAY); add(setWinPanel(),BorderLayout.EAST); add(center, BorderLayout.CENTER); add(top, BorderLayout.NORTH); add(bottom, BorderLayout.SOUTH); add(southTextArea,BorderLayout.SOUTH); setPreferredSize(new Dimension(1000,800)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GamePanel() {\n this.setLayout(null);\n\n initializeStateLabel();\n\n initializePileLabel();\n\n initializeSetColorButton();\n\n initializeDrawButton();\n initializeHideButton();\n\n this.setVisible(true);\n }", "public GamePanel() {\n setBackground(new Color(0, 200, 0));\n deck = new Deck();\n mainPiles = new Pile[7];\n suitPiles = new Pile[4];\n setInitialLayout(deck);\n deckPile = new Pile(deck.getX() + Card.WIDTH + GamePanel.HORI_DISPL, deck.getY(), Pile.DECK_PILE);\n selectedPile = null;\n CardListener listener = new CardListener(this);\n this.addMouseListener(listener);\n this.addMouseMotionListener(listener);\n this.setFocusable(true);\n }", "public MainPanel()\n\t{\n\t\tsuper();\n\t\t\n\t\tthis.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); \n\t\t_brickbackground = new ImageIcon(\"brickbackground.jpg\").getImage();\n\t\t\n \n\t\t_paddle2 = new PaddleShape();\n\t\t_paddle1 = new PaddleShape();\n \n\t\n\t\t \n\t\t\n\t\t\n\t\tHolder _holder = new Holder(BrickPanel);\n\t\t\n\t\tBrickPanel = new BrickPanel(_holder, _paddle1, _paddle2, controlPanel, this);\n\t\t\n\t\tMainMenu = new MainMenu(this);\n\t\tMainMenu.setLayout(new BoxLayout(MainMenu, BoxLayout.Y_AXIS));\n\t\tMainMenu.setPreferredSize(new Dimension(800, 450));\n\t\tMainMenu.setMaximumSize(new Dimension(800, 450));\n\t\t\n\t\tcontrolPanel = new ControlPanel(BrickPanel, this, _holder, _paddle1, _paddle2, MainMenu);\n\t\tcontrolPanel.setLayout(new GridLayout(1,5));\n\t\tcontrolPanel.setPreferredSize(new Dimension(800, 65));\n\t\tcontrolPanel.setMaximumSize(new Dimension(800, 65));\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tthis.add(BrickPanel); \n\t\tthis.add(controlPanel); \n\t\tthis.add(MainMenu);\n\t\t\n\t\tcontrolPanel.setVisible(false);\n\t\tBrickPanel.setVisible(false);\n\t\tMainMenu.setVisible(true);\n\t\tMyClickListener listener = new MyClickListener(this, BrickPanel, _holder);\n\t\tthis.addMouseListener(listener);\n this.addMouseMotionListener(listener);\n this.addKeyListener(listener);\n\t\tthis.setFocusable(true);\n\t\t\n\t\t//create a button instead of the play rectangle !!!!!!!!!!!!!!!!\n\t\t\n\t\t\n\t\t\n\t}", "public JPanelGameState() {\n initComponents();\n initLabelsArray();\n }", "public DrawPanel() {\n initComponents();\n }", "public GamesPanel() {\n initComponents();\n }", "public void init(){\n \tgamePanel = new GamePanel(this);\n getContentPane().add(gamePanel, BorderLayout.CENTER);\n \n gamePanel.addMouseListener(this);\n gamePanel.addMouseMotionListener(this);\n \n \tgamePanel.game.init();\n }", "public WeaponPanel() {\n initComponents();\n }", "public WithdrawPanel() {\n initComponents();\n }", "public RoundPanelOJ() {\n initComponents();\n setOpaque(false);\n }", "public HoaDonJPanel() {\n initComponents(); \n this.init();\n }", "public RaceBasePanel()\n\t{\n\t\tinitComponents();\n\t\tinitComponentContents();\n\t}", "public GameLostPanel() {\n initComponents();\n }", "public ControlPanel(DrawingPanel c){\n canvas = c;\n this.colorButton = new JButton(\"Pick Color\");\n add(colorButton);\n panel = new JPanel();\n panel.setBackground(Color.BLUE);\n add(panel);\n this.circleButton = new JButton(\"Add Circle\");\n add(circleButton);\n this.squareButton = new JButton(\"Add Square\");\n add(squareButton);\n \n ClickListener listener = new ClickListener();\n this.colorButton.addActionListener(listener);\n this.circleButton.addActionListener(listener);\n this.squareButton.addActionListener(listener);}", "public AnimationPanel() {\n initComponents();\n // create a new game board\n game = new GameOfLife(gridSize);\n }", "public Game(int width, int height)\n {\n //make a panel with dimensions width by height with a black background\n this.setLayout( null );//Don't change\n this.setBackground( new Color(150,150,150 ));\n this.setPreferredSize( new Dimension( constants.getWidth(), constants.getHeight () ));//Don't change\n \n //initialize the instance variables\n over = false;\n player = new Player( (constants.getWidth())/2, (constants.getHeight())/2); //change these numbers and see what happens\n circle = new Circle( 400, 200 );\n label = new JLabel(\"Points: \" + points);\n this.add( label );\n label.setBounds(300,50,400,50);\n label.setForeground(Color.BLUE);\n label.setFont(new Font(\"Arial\",Font.BOLD,32));\n label.setHorizontalAlignment(SwingConstants.CENTER);\n projectileInitW=false;\n projectileInitA=false;\n projectileInitS=false;\n projectileInitD=false;\n this.addKeyListener(this);//allows the program to respond to key presses - Don't change\n track = new Sound(\"song.wav\");\n track.loop();\n this.setFocusable(true);//I'll tell you later - Don't change\n }", "public Game() {\n initComponents();\n }", "public Game() {\n super(\"Project 6 Game\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n gamePanel = new GamePanel();\n setContentPane(gamePanel);\n pack();\n setLocationRelativeTo(null);\n setVisible(true);\n }", "public RiskController() {\r\n\t\trisk = new RiskGameModel();\r\n\t\tinitComponents();\r\n\t\tinitializePhaseView(risk);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetResizable(false);\r\n\t\tjPanel1.repaint();\r\n\t\tjPanel1.addMouseListener(this);\r\n\t\tAttackButton.setVisible(false);\r\n\t}", "public GameWindow(){\n setSize(1012,785);\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n setLayout(null);\n\n JLabel sun = new JLabel(\"SUN\");\n sun.setLocation(37,80);\n sun.setSize(60,20);\n\n GamePanel gp = new GamePanel(sun);\n gp.setLocation(0,0);\n getLayeredPane().add(gp,new Integer(0));\n \n PlantCard sunflower = new PlantCard(new ImageIcon(this.getClass().getResource(\"images/cards/card_sunflower.png\")).getImage());\n sunflower.setLocation(110,8);\n sunflower.setAction((ActionEvent e) -> {\n gp.activePlantingBrush = PlantType.Sunflower;\n });\n getLayeredPane().add(sunflower,new Integer(3));\n\n PlantCard peashooter = new PlantCard(new ImageIcon(this.getClass().getResource(\"images/cards/card_peashooter.png\")).getImage());\n peashooter.setLocation(175,8);\n peashooter.setAction((ActionEvent e) -> {\n gp.activePlantingBrush = PlantType.Peashooter;\n });\n getLayeredPane().add(peashooter,new Integer(3));\n\n PlantCard freezepeashooter = new PlantCard(new ImageIcon(this.getClass().getResource(\"images/cards/card_freezepeashooter.png\")).getImage());\n freezepeashooter.setLocation(240,8);\n freezepeashooter.setAction((ActionEvent e) -> {\n gp.activePlantingBrush = PlantType.FreezePeashooter;\n });\n getLayeredPane().add(freezepeashooter,new Integer(3));\n\n\n\n getLayeredPane().add(sun,new Integer(2));\n setResizable(false);\n setVisible(true);\n }", "public DrawPanel( String [ ] args ) \n {\n super();\n // Create the objects you want to display using awt graphical\n // objects. For now, use the wheels-like \"wrapper\" classes,\n // Rectangle, Ellipse, and Line. The Rectangle and Ellipse wrapper\n // classes are minor variations of SmartRectangle and SmartEllipse\n // from the Sanders and van Dam text.\n //\n // References to the objects you create need to be saved in instance\n // variables\n \n rect1 = new Rectangle( Color.BLUE );\n rect1.setLocation( 100, 100 );\n rect1.setSize( 40, 40 );\n \n rect2 = new Rectangle( Color.RED );\n rect2.setLocation( 200, 200 );\n rect2.setSize( 20, 60 );\n \n line1 = new Line();\n line1.setColor( Color.BLACK );\n line1.setPoints( 120, 120, 210, 230 );\n \n ell1 = new Ellipse( Color.CYAN );\n ell1.setLocation( 10, 400 );\n ell1.setSize( 40, 10 );\n \n ell2 = new Ellipse( Color.MAGENTA );\n ell2.setLocation( 400, 400 );\n ell2.setSize( 30, 30 );\n \n line2 = new Line();\n line2.setColor( Color.BLACK );\n line2.setPoints( 25, 405, 415, 415 ); \n \n buggy1 = new Buggy( Color.RED );\n buggy1.setLocation( 450, 300 );\n buggy2 = new Buggy( Color.CYAN);\n buggy2.setLocation( 400, 20 );\n \n recordplayer1 = new RecordPlayer( Color.BLUE );\n recordplayer1.setLocation( 300, 300 );\n \n recordplayer2 = new RecordPlayer( Color.GREEN );\n recordplayer2.setLocation( 200, 300 );\n \n }", "public BoardPanel() {\n\t\t\tfinal Dimension size = new Dimension(600, 600);\n\t\t\tsetSize(size);\n\t\t\tsetPreferredSize(size);\n\t\t\t\n\t\t\taddMouseListener(new ClickHandler());\n\t\t}", "public JJPanel() {\n\n\t}", "public SnowmanPanel()\n {\n setPreferredSize(new Dimension(300,225));\n setBackground(Color.cyan);\n }", "public GameplayControl(JPanel container, ChatClient client)\n\t{\n\t\tthis.container = container;\n\t\tthis.client = client;\n\t\tgbc = new GameBoardControl(client);\n\t\tgb = new GameBoard(gbc);\n\t}", "public Panel() {\n initComponents();\n\n\n }", "public sosGame() {\n initComponents();\n }", "public NewHeroIPPanel(NewHeroCiv nhCiv, HeroDisplayCiv hdCiv)\n {\n super(NEW_HERO_TITLE);\n _nhCiv = nhCiv;\n _hdCiv = hdCiv;\n\n // GENERAL SETUP\n setPreferredSize(Mainframe.getWindowSize());\n\n int pad = Mainframe.PAD;\n Border matte = BorderFactory.createMatteBorder(pad, pad, pad, pad, Color.WHITE);\n setBorder(matte);\n setBackground(_backColor);\n\n // Set Panel layout to special MiGLayout\n setLayout(new MigLayout(\"\", \"[center]\"));\n\n /* HERO NAME AND PROMPT COMPONENTS */\n // Add name components to the name subpanel\n // Create a hero name prompt label centered across all columns\n add(new JLabel(HERO_NAME_PROMPT), \"push, aligncenter, span\");\n\n // Create the input text field to collect the Hero's name give it default focus\n _nameField = makeNameField();\n add(_nameField, \"push, align center, span\");\n\n /* Label prompts for three horizontal inputs */\n add(new JLabel(HERO_GENDER_PROMPT), \"push, align center, gaptop 5%\");\n add(new JLabel(HERO_HAIR_PROMPT), \"push, align center, gaptop 5%\");\n add(new JLabel(HERO_RACE_PROMPT), \"push, align center, wrap\");\n\n /* Gender radio buttons */\n _genderPanel = new GenderPanel();\n add(_genderPanel.toJPanel());\n /* Hair color drop-down box */\n add(makeHairCombo());\n\n /* Add the Race drop-down combo */\n add(makeRaceCombo(), \"push, align center, wrap\");\n\n /* Add a button panel containing the Submit and Cancel buttons */\n add(makeButtonPanel(), \"push, align center, span, gaptop 50%\");\n\n }", "public NewJPanel() {\n initComponents();\n }", "public NewJPanel() {\n initComponents();\n }", "public HomePanel()\n\t{\n\t\tbCol = new Color(51, 204, 255);\n\t\tcl = new CardLayout();\n\t\t\n\t\t//Initiating sciIm JLabel and adding image onto it\n\t\tsciIm = new JLabel();\n\t\tsciIm.setHorizontalAlignment(JLabel.CENTER);\n\t\tsciIm.setVerticalAlignment(JLabel.CENTER);\n\t\tImageIcon sci = new ImageIcon(\"Science.jpg\");\n\t\tsciIm.setIcon(sci);\n\n\t\t//Initiating JButtons, adding ActionListener, setting colors, setting Fonts\n\t\tFont jbFont = new Font(\"Serif\", Font.PLAIN, 20);\n\n\t\tplay = new JButton(\"Play\");\n\t\tplay.setOpaque(true);\n\t\tplay.setBackground(bCol);\n\t\tplay.setFont(jbFont);\n\t\tplay.addActionListener(this);\n\t\t\n\t\tinst = new JButton(\"Instructions\");\n\t\tinst.setBackground(bCol);\n\t\tinst.setOpaque(true);\n\t\tinst.setFont(jbFont);\n\t\tinst.addActionListener(this);\n\n\t\ths = new JButton(\"High Scores\");\n\t\ths.setBackground(bCol);\n\t\ths.setOpaque(true);\n\t\ths.setFont(jbFont);\n\t\ths.addActionListener(this);\n\t\t\n\t\ttePan = new JButton(\"All Science Terms\");\n\t\ttePan.setBackground(bCol);\n\t\ttePan.setOpaque(true);\n\t\ttePan.setFont(jbFont);\n\t\ttePan.addActionListener(this);\n\t\t\n\t\t//Initiating JPanel, setting color and BorderLayout,\n\t\t//and adding JLabel with image and buttons panel\n\t\tbase = new JPanel();\n\t\tbase.setBackground(bCol);\n\t\tbase.setLayout(new BorderLayout());\n\t\tbase.add(sciIm, BorderLayout.CENTER);\n\t\tBasePanel bp = new BasePanel();\n\t\tbase.add(bp, BorderLayout.SOUTH);\n\n\t\t//Setting cardLayout to entire panel and adding instances\n\t\t//of other panels to cardLayout.\n\t\tsetLayout(cl);\n\t\tip = new InstructPanel();\n\t\thsp = new HigScoPanel();\n\t\t//gp = new GamePanel();\n\t\tfp = new InfoPanel();\n\t\ttp = new TermsPanel();\n\t\tadd(\"Info\", fp);\n\t\tadd(\"Base\", base);\n\t\tadd(\"Instructions\", ip);\n\t\tadd(\"High Scores\", hsp);\n\t\t//add(\"Game\", gp);\n\t\tadd(\"Terms\", tp);\n\t\tcl.show(this, \"Base\");\n\t}", "GamePanel(PBG g) {\n setPreferredSize(new Dimension(PBG.DIMENSION1, PBG.DIMENSION2));\n setBackground(Color.GRAY);\n this.game = g;\n }", "public PaperSettingsJPanel() {\n initComponents();\n }", "public plough() {\n initComponents();\n }", "public BuildingsPanel() {\n \n player = Player.getInstance();\n buttons = new JButton[8];\n structureData = new Building[10];\n \n initComponents();\n init();\n }", "public SpriteClipperGUI() {\n initComponents();\n\n /* Set up the button group */\n rsAnchorGroup = new ButtonGroup();\n rsAnchorGroup.add(tlRadioButton);\n rsAnchorGroup.add(tcRadioButton);\n rsAnchorGroup.add(trRadioButton);\n rsAnchorGroup.add(clRadioButton);\n rsAnchorGroup.add(crRadioButton);\n rsAnchorGroup.add(blRadioButton);\n rsAnchorGroup.add(bcRadioButton);\n rsAnchorGroup.add(brRadioButton);\n rsAnchorGroup.add(ccRadioButton);\n rsAnchorGroup.setSelected(blRadioButton.getModel(), true);\n\n connSelector.setSelectedIndex(1);\n\n spriteClipper.addObserver(this);\n clippedList.addListSelectionListener(spriteDetailer);\n addKeyListener(this);\n }", "public GameView() {\n initComponents();\n gameView(30, 30);\n }", "public displayGurps() {\n initComponents();\n }", "public RepalyPanel() {\n\t\t\ttry {\n//\t\t\t\tthis.addMouseListener(new MouseAdapter() {\n//\t\t\t\t\t@Override\n//\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n//\t\t\t\t\t\tSystem.out.println(e.getX() + \" \" + e.getY());\n//\t\t\t\t\t}\n//\t\t\t\t});\n\n\t\t\t\tsetLayout(null);\n\n\t\t\t\t// 退出按键\n\t\t\t\tjbRestart = MyButton.makeButton(restart, restart_down,\n\t\t\t\t\t\trestart_hover);\n\t\t\t\tadd(jbRestart);\n\t\t\t\tjbRestart.setBounds(540, 355, 140, 56);\n\t\t\t\tjbRestart.addActionListener(this);\n\n\t\t\t\t// 确认退出按键\n\t\t\t\tjbContinue = MyButton.makeButton(continue_pic, continue_down,\n\t\t\t\t\t\tcontinue_hover);\n\t\t\t\tadd(jbContinue);\n\t\t\t\tjbContinue.setBounds(345, 355, 140, 56);\n\t\t\t\tjbContinue.addActionListener(this);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public GameGUI( RiskGameEngine gameEngine )\n\t{\t\n\t\t//this.setPreferredSize( new java.awt.Dimension( 1000, 800 ) );\n\t\tthis.gameEngine = gameEngine;\n\t\t// START SCREEN INIT\n\t\tthis.startScreenHandler = new StartScreenHandler( gameEngine );\n\t\tthis.startScreen = new StartScreenPanel( startScreenHandler );\n\n\t\t// CREATE PLAYERS SCREEN INIT\n\t\tthis.createPlayersScreenHandler = new CreatePlayersScreenHandler(\n\t\t\t\tthis.gameEngine );\n\t\tthis.createPlayersScreen = new CreatePlayersScreenPanel(\n\t\t\t\tthis.createPlayersScreenHandler );\n\t\t\n\t\t//MAIN MAP SCREEN \n\t\tmapScreenHandler = new MapScreenHandler( gameEngine );\n\t\tmapScreen = new MapScreenPanelTest( mapScreenHandler );\n\t\t\n\t\t/* all panels below are internal frames to the main map screen */\n\t\t//CARD SCREEN \n\t\tcardHandler = new CardScreenHandler( gameEngine );\n\t\tcardScreen = new CardScreenPanel( cardHandler );\n\t\tmapScreen.setCardScreenPanel( cardScreen );\n\t\t\n\t\t//ATTACK SCREEN \n\t\tattackHandler = new AttackScreenHandler( gameEngine );\n\t\tattackScreen = new AttackScreenPanel( attackHandler );\n\t\tmapScreen.setAttackScreenPanel( attackScreen );\n\t\t\n\t\t//FORTIFY SCREEN \n\t\tmoveTroopsHandler = new MoveTroopsScreenHandler( gameEngine );\n\t\tmoveTroopsScreen = new MoveTroopsScreenPanel( moveTroopsHandler );\n\t\tmapScreen.setMoveTroopsScreenPanel( moveTroopsScreen );\n\t\t\n\t\tthis.currentPanel = this.startScreen;\t\n\t\tthis.getContentPane().add( currentPanel );\n\t\tthis.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n\t\t\n\t}", "public GamePanel(Context context) {\n super(context);\n\n getHolder().addCallback(this); //adds callback to surfaceholder to intercept events\n\n thread = new MainThread(getHolder(), this); //initialise main thread\n\n setFocusable(true); //set game panel to focusable\n }", "public NetworkPanel() {\n initComponents();\n }", "public void begin() {\n\n JLabel header = new JLabel(\"Reflecting Pond Control Panel\");\n run = new JButton(\"Run\");\n run.addActionListener(this);\n run.setActionCommand(\"run\");\n pause = new JButton(\"Pause\");\n pause.addActionListener(this);\n pause.setActionCommand(\"pause\");\n clear = new JButton(\"Clear Ripples\");\n clear.addActionListener(this);\n clear.setActionCommand(\"clear\");\n\n speed = 50;\n speedLabel = new JLabel(\"The speed is \" + speed);\n speedController = new JSlider(JSlider.HORIZONTAL,1,100,50);\n speedController.addChangeListener(this);\n\n JPanel northPanel = new JPanel();\n JPanel northPanel2 = new JPanel();\n JPanel southPanel = new JPanel();\n southPanel.add(speedLabel);\n southPanel.add(speedController);\n northPanel.add(header);\n northPanel2.add(run);\n northPanel2.add(pause);\n northPanel2.add(clear);\n\n JPanel gridPanel = new JPanel();\n gridPanel.setLayout(new GridLayout(2,1));\n gridPanel.add(northPanel);\n gridPanel.add(northPanel2);\n\n this.add(gridPanel, BorderLayout.NORTH);\n this.add(southPanel, BorderLayout.SOUTH);\n\n\n canvas.addMouseListener(this);\n canvas.addMouseMotionListener(this);\n\n this.validate();\n\n movingRipples = true;\n\n // create an instance of class PondQuadrants\n pond = new PondQuadrants( canvas );\n }", "public Game(JFrame frame) {\n\t\t// uses GridLayout\n\t\tsuper(new GridLayout(2, 1));\n\t\t// add the text\n\t\tthis.add(addText());\n\t\t// add the controls\n\t\tthis.add(addControl());\n\t\t// get the JFrame passed in from GameView so that we can update it later\n\t\tthis.frame = frame;\n\t}", "public DrawPanel()\n {\n initComponents();\n penManager = new PenManager(this);\n penManager.pen.addListener(this);\n }", "public CanvasPanel( )\n {\n // make this canvas panel listen to mouse\n addMouseListener(new PointListener());\n addMouseMotionListener(new PointListener());\n\n setBackground(Color.BLACK);\n }", "public Game() {\n\t\tsuper();\n\t\tgameModel = new GameModel();\n\t\tview = new GamePane(gameModel);\n\t\t\n\t\tadd(view);\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t}", "public DrugUI() {\n initComponents();\n }", "public Game()\n\t{\n\t\tsetSize(Main.FRAMEWIDTH, Main.FRAMEHEIGHT);\n\t\taddMouseListener(mouse);\n\t\taddMouseMotionListener(mouse);\n\t\taddKeyListener(key);\n\t\taddMouseWheelListener(mouse);\n\t\tsetFocusable(true);\n\t\t//setVisible(false);\n\t\t\n\t\tengine.start();\n\t}", "public MotionNetEditorPanel()\n {\n initComponents();\n this.keyFrameControlMap = new HashMap<KeyFrame, KeyFrameControl>();\n this.transitionControlList = new ArrayList<TransitionControl>();\n this.motionNet = null;\n firstKeyFrameRemoved = false;\n setPasteEnable(false);\n this.setBounds(0, 0, this.getWidth(), this.getHeight());\n this.jointChangeListener = new PropertyChangeListener()\n {\n public void propertyChange(PropertyChangeEvent evt)\n {\n if(evt.getPropertyName().compareTo(\"jointStateChanged\") == 0)\n {\n setPasteEnable(false);\n }\n }\n };\n\n }", "public GameView(ClientWindow window) {\n super(\"game\", window);\n initComponents();\n \n \n this.gamePanel = new GamePanel(this);\n add(gamePanel, BorderLayout.CENTER);\n \n this.chatPanel = new ChatPanel(this);\n add(chatPanel, BorderLayout.SOUTH);\n \n this.scoreboardPanel = new ScoreboardPanel();\n add(scoreboardPanel, BorderLayout.WEST);\n }", "public OverWorldPanel(String mn, String cn, MasterWindow frame){\r\n //super();\r\n eventCaller = frame;\r\n\r\n random = new Random();\r\n moveAnimator = new Timer(100, this);\r\n moveAnimator.setRepeats(true);\r\n moving = false;\r\n\r\n direction = 'n';\r\n prevDirection = 'n';\r\n mapName = mn;\r\n currentMap = new ImageIcon(mapName);\r\n characterName = cn;\r\n playerName = characterName + direction + \".png\";\r\n currentCharacter = new ImageIcon(playerName);\r\n\r\n this.setFocusable(true);\r\n requestFocusInWindow();\r\n addKeyListener(new AL());\r\n//sets up the map in the panel using the map loader methods. come back later to make the\r\n//start based on the panel size for a resizable screen\r\n mapX = invisMap.getMapStartX(mapName);\r\n mapY = invisMap.getMapStartY(mapName);\r\n protagonistX = -mapX + 250;\r\n protagonistY = -mapY + 250;\r\n System.out.println(\"protagonist x and y\" + protagonistX + \" \" + protagonistY);\r\n this.setFocusable(true);\r\n requestFocusInWindow();\r\n //System.out.println(KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner());\r\n // not sure what to do for this yet protagonist = new Player(panelWidth/2, panelHeight/2);\r\n }", "protected void initGameWindow(){\r\n \r\n // Erstellt das GameGrid\r\n this.gg_grid = new GameGrid();\r\n this.gg_grid.setBounds(this.xCoordGrid, this.yCoordGrid, this.widthGrid, this.heightGrid);\r\n this.gg_grid.addMouseListener(this);\r\n //Add game logic\r\n this.gg_logic = new GameLogic(gg_grid);\r\n this.gg_logic.drawLogic();\r\n // Erstellt das Steuerungs-Panel\r\n this.gg_panel = new JPanel();\r\n this.gg_panel.setBounds(this.xCoordPanel, this.yCoordPanel, this.widthPanel, this.heightPanel); \r\n // Erstellt die anderen Komponenten\r\n // Buttons + ActionListener\r\n this.gg_start = new JButton(\"Start\");\r\n this.gg_start.addActionListener(this);\r\n \r\n this.gg_stop = new JButton(\"Stop\");\r\n this.gg_stop.addActionListener(this);\r\n \r\n this.gg_reset = new JButton(\"Reset\");\r\n this.gg_reset.addActionListener(this);\r\n \r\n // Sliders + SliderDesign + ChangeListener\r\n this.gg_velocity = new JSlider(JSlider.HORIZONTAL, 0, 2, 1);\r\n this.gg_velocity.setMajorTickSpacing(1);\r\n this.gg_velocity.setPaintTicks(true);\r\n this.gg_velocity.addChangeListener(this);\r\n \r\n this.gg_groesse = new JSlider(JSlider.HORIZONTAL, 0, 2, 1);\r\n this.gg_groesse.setMajorTickSpacing(1);\r\n this.gg_groesse.setPaintTicks(true);\r\n this.gg_groesse.addChangeListener(this);\r\n \r\n // Fügt die Komponenten dem JPanel hinzu\r\n this.gg_panel.add(new JLabel(\"Langsam\"));\r\n this.gg_panel.add(gg_velocity);\r\n this.gg_panel.add(new JLabel(\"Schnell\"));\r\n this.gg_panel.add(gg_start);\r\n this.gg_panel.add(gg_stop);\r\n this.gg_panel.add(gg_reset);\r\n this.gg_panel.add(new JLabel(\"Klein\"));\r\n this.gg_panel.add(gg_groesse);\r\n this.gg_panel.add(new JLabel(\"Groß\"));\r\n \r\n // Fügt JCanvas+JPanel dem JFrame hinzu\r\n this.getContentPane().add(gg_grid);\r\n this.getContentPane().add(gg_panel);\r\n \r\n this.gg_grid.fillCell(5, 5);\r\n \r\n this.pack();\r\n }", "public JPanelStartMafiaGame() {\n initComponents();\n\n }", "public VivariumPanel()\n {\n // Call super constructor\n super();\n\n // Initialize properties\n this.turtles = new HashSet<>();\n this.isDebug = false;\n }", "PinkSquareView(SnakeSmash game) {\n super(game);\n }", "public SnakeUI() {\r\n setFrame(); \r\n setKeyListener();\r\n setTimer();\r\n startGame();\r\n this.setVisible(true);\r\n }", "public Panel() {\n }", "private void initComponents()\n {\n\n gamePanel = new java.awt.Panel();\n livesLabel = new java.awt.Label();\n startButton = new java.awt.Button();\n timeLabel = new java.awt.Label();\n resetButton = new java.awt.Button();\n livesTextField = new java.awt.TextField();\n timeTextField = new java.awt.TextField();\n youWinLabel = new java.awt.Label();\n gameOverLabel = new java.awt.Label();\n\n setMinimumSize(new java.awt.Dimension(720, 410));\n addWindowListener(new java.awt.event.WindowAdapter()\n {\n public void windowClosing(java.awt.event.WindowEvent evt)\n {\n exitForm(evt);\n }\n });\n setLayout(null);\n\n gamePanel.setBackground(java.awt.Color.cyan);\n gamePanel.addKeyListener(new java.awt.event.KeyAdapter()\n {\n public void keyPressed(java.awt.event.KeyEvent evt)\n {\n keyPressedHandler(evt);\n }\n });\n add(gamePanel);\n gamePanel.setBounds(10, 10, 700, 320);\n\n livesLabel.setText(\"Lives Remaining:\");\n add(livesLabel);\n livesLabel.setBounds(570, 370, 100, 20);\n livesLabel.getAccessibleContext().setAccessibleName(\"Lives Remaining:\");\n\n startButton.setLabel(\"Start Game\");\n startButton.addMouseListener(new java.awt.event.MouseAdapter()\n {\n public void mouseClicked(java.awt.event.MouseEvent evt)\n {\n startButtonHandler(evt);\n }\n });\n add(startButton);\n startButton.setBounds(10, 340, 90, 24);\n\n timeLabel.setText(\"Current Time:\");\n add(timeLabel);\n timeLabel.setBounds(590, 340, 80, 20);\n\n resetButton.setLabel(\"Reset Game\");\n resetButton.addMouseListener(new java.awt.event.MouseAdapter()\n {\n public void mouseClicked(java.awt.event.MouseEvent evt)\n {\n resetButtonHandler(evt);\n }\n });\n add(resetButton);\n resetButton.setBounds(10, 370, 90, 24);\n\n livesTextField.setEditable(false);\n add(livesTextField);\n livesTextField.setBounds(670, 370, 40, 20);\n\n timeTextField.setEditable(false);\n add(timeTextField);\n timeTextField.setBounds(670, 340, 40, 20);\n\n youWinLabel.setFont(new java.awt.Font(\"Dialog\", 3, 24)); // NOI18N\n youWinLabel.setForeground(new java.awt.Color(0, 255, 0));\n youWinLabel.setText(\"You Win!\");\n youWinLabel.setVisible(false);\n add(youWinLabel);\n youWinLabel.setBounds(100, 330, 110, 30);\n\n gameOverLabel.setFont(new java.awt.Font(\"Dialog\", 3, 24)); // NOI18N\n gameOverLabel.setForeground(new java.awt.Color(255, 0, 0));\n gameOverLabel.setText(\"You Lose...\");\n gameOverLabel.setVisible(false);\n add(gameOverLabel);\n gameOverLabel.setBounds(100, 360, 130, 30);\n\n pack();\n }", "public GamePanel() {//initializer for the GamePanel class\n\t\taddMouseListener(this);//add the listeners\n\t\taddMouseMotionListener(this);\n\t\taddKeyListener(this);\n\t\t\n\t\tkeys = new boolean[KeyEvent.KEY_LAST+1];//make the keys list \n\t\t\n\t\t//GameImage slider = null;\n\t\t\n\t\tblocks = new ArrayList<Block>();//stores the blocks.\n\t\t//image = null;\n\t\t\n\t\t//load pause button \n\t\ttry {\n\t\t\tpauseButton = new GameImage(ImageIO.read(new File(\"src/pause.png\")), 0,0);\n\t\t\tpauseButton.resize(40, 40);//resize to be smaller\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\ttry {//load the slider\n\t\t\tslider = new GameImage(ImageIO.read(new File(\"src/2dplatform.png\")), 0, 0);//get the slider image and create a new GameImage instance\n\t\t\toriginalSliderWidth = 100;//store the original dimensions and resize accordingly\n\t\t\toriginalSliderHeight = 20;\n\t\t\tslider.resize(originalSliderWidth, originalSliderHeight);//resize and position image\n\t\t\tslider.setX(GamePlay.getMiddleX() - slider.getWidth()/2);//set the appropriate x and y\n\t\t\tslider.setY(GamePlay.getScreenHeight() - 100);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//load the logo\n\t\ttry {\n\t\t\tlogo = new GameImage(ImageIO.read(new File(\"src/gameLogo.png\")),0,0);\n\t\t\tlogo.resize(200, 50);//resize \n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {//load the background. Resize.\n\t\t\tbackground = new GameImage(ImageIO.read(new File(\"src/b.jpg\")), 0, 0);\n\t\t\tbackground.resize(GamePlay.getScreenWidth(), GamePlay.getScreenHeight());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\ttry {//load and resize ball.\n\t\t\tball = new GameImage(ImageIO.read(new File(\"src/ball.png\")), 0, 0);\n\t\t\tball.resize(20, 20);\n\t\t\tball.setX(slider.getX() + slider.getWidth()/2 - ball.getWidth()/2);\n\t\t\tball.setY(slider.getY()-ball.getHeight()-5);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t//load health powerup image\n\t\ttry {\n\t\t\thealthPowerUp = new GameImage(ImageIO.read(new File(\"src/healthPowerUp.png\")),0,0);\n\t\t\thealthPowerUp.resize(10, 10);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//load long powerup image\n\t\ttry {\n\t\t\tlongPowerUp = new GameImage(ImageIO.read(new File(\"src/longPowerUp.png\")), 0, 0);\n\t\t\tlongPowerUp.resize(10, 10);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//load the bonus points\n\t\ttry {\n\t\t\tbonusPointsPowerUp = new GameImage(ImageIO.read(new File(\"src/bonusPointsPowerUp.png\")), 0,0);\n\t\t\tbonusPointsPowerUp.resize(10, 10);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t//music\n\t\tbackgroundMusic.loop();\n\t\t\n\t\t\n\t\t\n\t\tmakeBricks(12,8);//make 12 rows of bricks, 8 columns of bricks\n\t}", "public SquareController(){\r\n \t\r\n this.model = new Square();\r\n this.view = new SquareView(model);\r\n view.addMouseListener(this);\r\n}", "public DashBoardPanel() {\n initComponents();\n }", "public GamePanel(int width, int height, int amount, int size) {\n\t\tsuper(); // calls and instance of JPanel (super class)\n\t\tthis.boxSize = size;\n\t\tthis.panelWidth = width;\n\t\tthis.panelHeight = height;\n\t\tcountDown.setText(\"Game Starting in 5 Seconds!\");\n\t\tadd(countDown);\n\t\tadd(score);\n\t\tadd(time);\n\t\tcreateTokens(amount);// call upon the createTokens method to create the number of desired tokens\n\t\tmouseActions();\n\t\tupdate();\n\t\t\n\t\t //calls the mouseActions class to identify the mouse actions\n\t}", "public Game(){\n\t\tDimension size = new Dimension(width * scale, height * scale);\n\t\tsetPreferredSize(size);\n\t\t\n\t\tscreen = new Screen(width, height);//instantiated the new screen\n\t\t\n\t\tframe = new JFrame();\n\t\t\n\t}", "public CreateNewEventJPanel() {\n }", "public GameDataJPanel(GameData gameData) {\n this.gameData = gameData;\n // Setting up the swing components;\n JPanel programTitlePanel = new JPanel(new FlowLayout());\n JLabel title = new JLabel(\"Actively rendering graphics and Swing \" + \"Components!\");\n programTitlePanel.add(title);\n changeColor = new JButton(\"Change color\");\n changeColor.addActionListener(this);\n JPanel changeColorPanel = new JPanel(new FlowLayout());\n changeColorPanel.add(changeColor);\n limitFps = new JButton(\"Unlimit FPS\");\n limitFps.addActionListener(this);\n JPanel fpsAndUpdatePanel = new JPanel(new FlowLayout());\n fpsAndUpdatePanel.add(limitFps);\n\n JPanel holder = new JPanel(new GridLayout(2, 1));\n holder.add(programTitlePanel);\n holder.add(changeColorPanel);\n\n this.setLayout(new BorderLayout());\n this.add(BorderLayout.NORTH, holder);\n this.add(BorderLayout.SOUTH, fpsAndUpdatePanel);\n\n // Now set the JPanel's opaque, along with other Swing components\n // whose backgrounds we don't want shown, so we can see the\n // application's graphics underneath those components!\n // (Try commenting some out to see what would otherwise happen!)\n changeColorPanel.setOpaque(false);\n this.setOpaque(false);\n title.setOpaque(false);\n programTitlePanel.setOpaque(false);\n fpsAndUpdatePanel.setOpaque(false);\n holder.setOpaque(false);\n\n limitingFPS = true;\n }", "public AddCourseJPanel() { \n initComponents(); \n }", "public Client() {\n initComponents();\n play = new Play(SIZE);\n sendButton.setEnabled(false);\n moveButton.setEnabled(false);\n reprintField();\n }", "public PlayerPanel(Game game) {\n super(game);\n initComponents();\n setBorder(GUIConstants.PANEL_BORDER);\n cardLabels = new ArrayList<>();\n cardLabels.add(card1Label);\n cardLabels.add(card2Label);\n }", "public StartPanel(JFrame theFrame, Group theGroup) {\n super();\n\n myFrame = theFrame;\n myGroup = theGroup;\n\n setup();\n }", "public abstract void init(JPanel panel);", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) \r\n\t\t\t{\n\t\t\t\tpaintComponent(getGraphics(), player);\r\n\t\t\t}", "public AgentCanvas(SimulationManager theSimulation, ShelterGrid theShelters)\n {\n simulation = theSimulation;\n shelters = theShelters;\n legend_visible = true;\n\n addMouseListener(this); // to handle mouse clicks\n \n // Create shelter grid\n gridWidth = Parameters.getDefaultGridSize();\n gridHeight = gridWidth; // We're square.\n //shelterGrid = new Shelter[gridWidth][gridHeight];\n \n updateGrid(shelters);\n }", "private void createGameGraphics() {\n\t\tgameGraphics=new JPanel();\n\t\tgameGraphics.setPreferredSize(new Dimension(width,height));\n\t\tgameGraphics.setFocusable(false);\n\t\tthis.add(gameGraphics,\"Center\");\n\t\tgameGraphics.setVisible(true);\n\t\tgameGraphics.setDoubleBuffered(true);\n\t\tgameGraphics.setIgnoreRepaint(true);\n\t}", "public LaserCanvas()\r\n\t{\r\n\t\tsuper();\r\n\t\t\r\n\t\tgame = new LaserTutor();\r\n\t\t\r\n\t\tgame.initialize( );\r\n\t}", "public ColorEllipse(javax.swing.JPanel container){//I'm making this shape's subclass ask for a container of type javax.swing.JPanel when isntantiated. \n\t\tsuper(container, new java.awt.geom.Ellipse2D.Double());//I'm passing the superclass constructor the container that will be \n\t\t\t\t\t\t\t\t //received when the shape is created and I'm also passing a new ellipse of type java.awt.geom.Ellipse2D.Double.\n\t}", "public SimulationView() {\n initComponents();\n }", "public MainClass()\r\n\t{\r\n\t\tthis.setPreferredSize(new Dimension(width - 300, height));// This sets the dimensions of the graphic space where cam is drawn\r\n\t\tpanel = new ControlPanel(); // Initialization of various objects incorporated into the main class\r\n\t\twindow = new Window(this, panel);\t\t\t\t//\r\n\t\tdisp = new DispAngleDiagram(stroke);\t\t\t//\r\n\t\trcp = new RenderCamProfile(disp, panel);\t\t//\r\n\t\tinput = new InputHandler(disp);\t\t\t\t\t//\r\n\t\t\r\n\t\tthis.addMouseListener(input);\t\t\t\t\t\r\n\t\tthis.addMouseMotionListener(input);\r\n\t}", "public ButtonPanel(SnakeFrame snakeFrame) {\n\t\tthis.snakeFrame =snakeFrame;\n\t\t//初始化面板信息\n\t\tinitPanel();\n\t\t//初始化组件信息\n\t\tinitComponents();\n\t\t//添加组件\n\t\taddComponents();\n\t}", "private void createUIComponents() {\n JFrame frame = new JFrame(\"labyrinth\");\n myFrame = frame;\n //myLayout = new CardLayout();\n mainPanel = new JPanel(new CardLayout());\n\n\n menuPanel = new JPanel();\n startGamePanel = new JPanel();\n optionsPanel = new JPanel();\n helpPanel = new JPanel();\n generatorPanel = new JPanel();\n simpleGamePanel = new JPanel();\n classicGamePanel = new JPanel();\n\n\n //mainPanel.add(menuPanel,\"menu\");\n //mainPanel.add(startGamePanel,\"startgame\");\n //mainPanel.add(optionsPanel,\"options\");\n //mainPanel.add(generatorPanel,\"generate\");\n //mainPanel.add(simpleGamePanel,\"game\");\n\n //simpleGameMapPanel = new MapPanel(myFrame, mainPanel);\n simpleGameMapPanel = new SimpleGamePanel(myFrame, simpleGamePanel);\n classicGameMapPanel = new ClassicGamePanel(myFrame, classicGamePanel);\n generateMapPanel = new MapPanel(myFrame, generateMapPanel);\n\n\n\n classicGameMapPanel.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n if(SwingUtilities.isRightMouseButton(e)){\n if(myMode == MainWindowMode.CLASSICGAME) {\n ((ClassicGamePanel) classicGameMapPanel).stopDragMiniMap();\n return;\n }\n }\n if(SwingUtilities.isLeftMouseButton(e)) {\n if(myMode == MainWindowMode.CLASSICGAME){\n ClassicGamePanel classicGamePanel = (ClassicGamePanel) classicGameMapPanel;\n if(classicGamePanel.isDragMiniMap()){\n Point point = e.getPoint();\n classicGamePanel.tryAddMiniMap(point);\n }\n }\n }\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n mouseClicked(e);\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n\n\n frame.setFocusable( true );\n frame.addKeyListener(new KeyAdapter() {\n @Override\n public void keyPressed(KeyEvent e) {\n //System.out.println(e.getKeyCode());\n if(myMode == MainWindowMode.SIMPLEGAME) {\n ((MapPanelBase) simpleGameMapPanel).keyPressed(e);\n } else if(myMode == MainWindowMode.CLASSICGAME){\n ((MapPanelBase) classicGameMapPanel).keyPressed(e);\n }\n }\n });\n\n URL labyrinthFile = getClass().getResource(\"/labyrinth.png\");\n try {\n final Image image = ImageIO.read(labyrinthFile);\n helpLabyrinthPanel = new JPanel(){\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(image, 0, 0, null);\n }\n };\n helpLabyrinthPanel.setPreferredSize(new Dimension(-1, image.getHeight(null) + 20));\n } catch (IOException e) {\n e.printStackTrace();\n helpLabyrinthPanel = new JPanel();\n }\n\n URL mainScreenFile = getClass().getResource(\"/main_screen.png\");\n try {\n final Image image = ImageIO.read(mainScreenFile);\n helpMainScreenPanel = new JPanel(){\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(image, 0, 0, null);\n }\n };\n helpMainScreenPanel.setPreferredSize(new Dimension(-1, image.getHeight(null) + 20));\n } catch (IOException e) {\n e.printStackTrace();\n helpMainScreenPanel = new JPanel();\n }\n\n\n URL minotaurFile = getClass().getResource(\"/minotaur.png\");\n try {\n final Image image = ImageIO.read(minotaurFile);\n helpObjectsPanel = new JPanel(){\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(image, 0, 0, null);\n int imageWidth = image.getWidth(null);\n int imageHeight = image.getHeight(null);\n g.setColor(Color.BLACK);\n Graphics2D g2d = (Graphics2D) g;\n FontMetrics fm = g2d.getFontMetrics();\n String text = \"minotaurs are guards of labyrinth, they will kill you if you will step on them. After that you will lose all your equipment and respawn into the hospital\";\n g2d.drawString(text, 3*imageWidth/2, fm.getAscent());\n\n g.setColor(Color.BLUE);\n text = \"A\";\n g2d.drawString(text, imageWidth/2, imageHeight + fm.getAscent());\n g.setColor(Color.BLACK);\n text = \"you can take new bullets in the arsenal. It is guaranted, that you can find a way from hospital to arsenal without minotaurs\";\n g2d.drawString(text, 3*imageWidth/2, imageHeight + fm.getAscent());\n g.setColor(Color.RED);\n int hlength = imageWidth*3/4;\n int hwidth = imageWidth*1/4;\n g2d.fillRect(imageWidth/2 - hlength/2, 5*imageHeight/2 - hwidth/2 , hlength, hwidth);\n g2d.fillRect(imageWidth/2 - hwidth/2, 5*imageHeight/2 - hlength/2 , hwidth, hlength);\n g.setColor(Color.BLACK);\n text = \"you will respawn in the hospital after every accident\";\n g2d.drawString(text, 3*imageWidth/2, 2*imageHeight + fm.getAscent());\n\n int radius = imageWidth/3;\n g2d.fill(new Ellipse2D.Double(imageWidth/2 - radius, 7*imageHeight/2 - radius, 2*radius, 2*radius));\n text = \"portal will teleport you to another determined portal somwhere in the labyrinth. All portals are connected into the cycle\";\n g2d.drawString(text, 3*imageWidth/2, 3*imageHeight + fm.getAscent());\n }\n };\n helpObjectsPanel.setPreferredSize(new Dimension(-1, image.getHeight(null)*4 + 20));\n } catch (IOException e) {\n e.printStackTrace();\n helpObjectsPanel = new JPanel();\n }\n\n URL pickFile = getClass().getResource(\"/pick_mini_map.png\");\n URL putFile = getClass().getResource(\"/put_mini_map.png\");\n try {\n final Image pickImage = ImageIO.read(pickFile);\n final Image putImage = ImageIO.read(putFile);\n helpCollectMapPanel = new JPanel(){\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(pickImage, 0, 0, null);\n g.drawImage(putImage, this.getWidth()/2, 0, null);\n }\n };\n helpCollectMapPanel.setPreferredSize(new Dimension(-1, pickImage.getHeight(null) + 20));\n } catch (IOException e) {\n e.printStackTrace();\n helpCollectMapPanel = new JPanel();\n }\n }", "public SongChordPanel() {\n initComponents();\n }", "public void displayComponent() {\n menuPanel = new InGameMenuPanel();\n objPanel = new ObjectivePanel();\n\n objButtonPanel = new JPanel();\n optionButtonPanel = new JPanel();\n menuButtonPanel = new JPanel();\n endTurnButtonPanel = new JPanel();\n chatContainPanel = new JPanel();\n chatFieldPanel = new JPanel();\n chatDisplayFieldPanel = new JPanel();\n chatTypeSelectionPanel = new JPanel();\n chatTextFieldPanel = new JPanel();\n\n chatContainPanel.setLayout(null);\n chatTextFieldPanel.setLayout(null);\n chatFieldPanel.setLayout(null);\n chatDisplayFieldPanel.setLayout(null);\n setLayout(new BorderLayout());\n\n //chat panel\n chatField = new JTextField(100);\n chatType = new JComboBox(chatTypeName);\n displayChatArea = new JTextArea();\n displayChatArea.setLineWrap(true);\n displayChatArea.setWrapStyleWord(true);\n displayChatArea.setEditable(false);\n chatScrollPane = new JScrollPane(displayChatArea);\n chatScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\n chatContainPanel.setPreferredSize(new Dimension(getWidth(), 130));\n chatFieldPanel.setBounds(0, 90, 600, 45);\n chatDisplayFieldPanel.setBounds(0, 0, 585, 90);\n chatScrollPane.setBounds(0, 0, 585, 90);\n chatTypeSelectionPanel.setBounds(0, 5, 80, 45);\n chatTextFieldPanel.setBounds(85, 0, 500, 40);\n chatField.setBounds(0, 5, 500, 30);\n\n chatContainPanel.setOpaque(false);\n chatFieldPanel.setOpaque(false);\n chatDisplayFieldPanel.setOpaque(false);\n chatTextFieldPanel.setOpaque(false);\n chatTypeSelectionPanel.setOpaque(false);\n\n checkBoolean = true;\n\n //display the panel and paint the cover\n rightPanel = new JPanel() {\n @Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(rightCover.getImage(), 0, 0, getWidth(), getHeight(), null);\n g.drawImage(objButtonIcon.getImage(), 8, 8, null); // paint the objective button icon\n g.drawImage(optionButtonIcon.getImage(), 56, 7, null); // paint the option button\n g.drawImage(menuButtonIcon.getImage(), 105, 7, null); // paint the menu button\n g.drawImage(endTurnButtonIcon.getImage(), 153, 11, null); //paint the end turn button\n g.drawImage(teamLightIcon1.getImage(), 11, 178, null); //paint team light icon for decoration\n g.drawImage(teamLightIcon2.getImage(), 161, 177, null); //paint team light icon for decoration\n }\n };\n\n rightPanel.setPreferredSize(new Dimension(200, 720));\n rightPanel.setLayout(null);\n\n //objective button configuration\n objButtonPanel.setBounds(8, 8, objButtonIcon.getIconWidth(), objButtonIcon.getIconHeight());\n objButtonPanel.setOpaque(false);\n\n //option button configuration\n optionButtonPanel.setBounds(56, 7, optionButtonIcon.getIconWidth(), optionButtonIcon.getIconHeight());\n optionButtonPanel.setOpaque(false);\n //if it's in the player turn, option button will available to press. the optionCheckBoolean will true as long as\n //it's a player turn or a button others than end turn has not been pressed.\n\n //menu button configuration\n menuButtonPanel.setBounds(105, 7, menuButtonIcon.getIconWidth(), menuButtonIcon.getIconHeight());\n menuButtonPanel.setOpaque(false);\n //if it's in the player turn, menu button will available to press. the menuButtonCheckBoolean will true as long as\n //it's a player turn or a button others than end turn has not been pressed.\n\n //end turn button configuration\n endTurnButtonPanel.setBounds(153, 11, endTurnButtonIcon.getIconWidth(), endTurnButtonIcon.getIconHeight());\n endTurnButtonPanel.setOpaque(false);\n //if it's in the player turn, end turn will available to press. the end turn boolean will true as long as\n //it's a player turn or a button others than end turn has not been pressed.\n\n\n //add the button panel\n rightPanel.add(objButtonPanel);\n rightPanel.add(optionButtonPanel);\n rightPanel.add(menuButtonPanel);\n rightPanel.add(endTurnButtonPanel);\n\n //add chat to panel\n chatContainPanel.add(chatDisplayFieldPanel);\n chatContainPanel.add(chatFieldPanel);\n chatFieldPanel.add(chatTypeSelectionPanel);\n chatFieldPanel.add(chatTextFieldPanel);\n chatTypeSelectionPanel.add(chatType);\n chatTextFieldPanel.add(chatField);\n chatDisplayFieldPanel.add(chatScrollPane);\n\n //add the contain button panel in\n add(rightPanel, BorderLayout.EAST);\n add(chatContainPanel, BorderLayout.SOUTH);\n\n }", "protected ImagePanel() {\n pictureBox = new AWTPictureBox(getWidth(), getHeight());\n //add(pictureBox);\n }", "public GUI() {\n super(\"Day Planner\");\n setSize(465,550);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n addWindowListener(new CheckOnExit() {});\n basePanel = new JPanel(new CardLayout());\n init();\n \n \n basePanel.setVisible(true);\n add(basePanel);\n }", "public GameControlsPanel(GameFrame game, World world) {\n super();\n setLayout(new FlowLayout());\n this.world = world;\n this.game = game;\n populateControlPanel();\n }", "public MyFrame() {\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n /**Creating ContentPane on which the JPanels are attached**/\n\n contentPane = new JPanel();\n setContentPane(contentPane);\n c = new CardLayout();\n contentPane.setLayout(c);\n\n loginPanel = new LoginPanel();\n contentPane.add(loginPanel, LOGIN);\n\n menuPanel = new MenuPanel();\n contentPane.add(menuPanel, MENU);\n\n deleteGamePanel = new DeleteGamePanel();\n contentPane.add(deleteGamePanel, DELETE);\n\n highScorePanel = new HighScorePanel();\n contentPane.add(highScorePanel, HIGHSCORE);\n\n playSnakePanel = new PlaySnakePanel();\n contentPane.add(playSnakePanel, PLAY);\n\n joinGamePanel = new JoinGamePanel();\n contentPane.add(joinGamePanel, JOIN);\n\n createGamePanel = new CreateGamePanel();\n contentPane.add(createGamePanel, CREATE);\n\n createdGamesPanel = new CreatedGamesPanel();\n contentPane.add(createdGamesPanel, MYGAMES);\n\n userScoresPanel = new UserScoresPanel();\n contentPane.add(userScoresPanel, SCORES);\n\n\n /**makes sure that JFrame will be visible when starting program**/\n setVisible(true);\n /**cannot rezise the frame**/\n setResizable(false);\n /**Setting the title on the frame**/\n setTitle(\"TheSnakeGame\");\n\n /**setting the bounds of the frame**/\n setBounds(300, 125, (int) SIZE.getWidth(), (int) SIZE.getHeight());\n\n }", "public GameOver() {\n initComponents();\n setForm();\n }", "public RunningGame() {\n initComponents();\n }", "public CanvasPanel() {\n\t \t\taddMouseListener(this);\n\t \t\taddMouseMotionListener(this);\n\t }", "public DisplayPanel(final Ensemble model) {\n this.model = model;\n this.setPreferredSize(new Dimension(700,\n 600));\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(final ComponentEvent e) {\n final Component c = (Component)e.getSource();\n model.setWalls(DisplayPanel.COLS, DisplayPanel.ROWS, c.getWidth() - DisplayPanel.COLS, c.getHeight() - DisplayPanel.ROWS);\n }\n\n });\n }", "public MyFrame() {\n\t\tinitializeGui();\n\t\taddMouseListener(this);\n\t\taddComponentListener(this);\n\t}", "private void initComponents() {\r\n\r\n \tholdPanel = new HoldPanel(getBackground());\r\n \tnextPanel = new NextPanel(getBackground());\r\n linesPanel = new LinesPanel(getBackground());\r\n levelPanel = new LevelPanel(getBackground());\r\n scorePanel = new ScorePanel(getBackground());\r\n statisticsPanel = new StatisticsPanel(getBackground());\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n setBackground(new java.awt.Color(0, 0, 0));\r\n \r\n paintPanel.setBorder(javax.swing.BorderFactory.createCompoundBorder(javax.swing.BorderFactory.createEtchedBorder(), javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)));\r\n\r\n// javax.swing.GroupLayout paintPanelLayout = new javax.swing.GroupLayout(paintPanel);\r\n// paintPanel.setLayout(paintPanelLayout);\r\n// paintPanelLayout.setHorizontalGroup(\r\n// paintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n// .addGap(0, 0, Short.MAX_VALUE)\r\n// );\r\n// paintPanelLayout.setVerticalGroup(\r\n// paintPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n// .addGap(0, 400, Short.MAX_VALUE)\r\n// );\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(statisticsPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(holdPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(linesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)\r\n .addComponent(paintPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(scorePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(nextPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\r\n .addComponent(levelPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(linesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(holdPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(statisticsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(scorePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(nextPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(levelPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addComponent(paintPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n .addContainerGap())\r\n );\r\n\r\n pack();\r\n }", "public void setUpHUDPanel() {\n\n\t\t//Criando e configurando painel que apresenta botoes de acoes\n\t\tthis.playerOptionPanel = new JPanel(null);\n\t\tthis.playerOptionPanel.setBounds(730, 315, 275, 235);\n\t\tthis.playerOptionPanel.setOpaque(false);\n\n\t\t//Criando e configurando botao para jogar/manipular dado\n\t\tthis.moveButton = new JButton(\"JOGAR O DADO\");\n\t\tthis.moveButton.setBounds(45, 25, 175, 45);\n\t\tthis.moveButton.setActionCommand(\"MOVE\");\n\t\tthis.moveButton.setMnemonic(KeyEvent.VK_M);\n\t\tthis.moveButton.setToolTipText(\"Cique aqui para jogar o dado e realizar o movimento\");\n\n\t\t//Adicionando tratador de evento para clique no botao\n\t\tthis.moveButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tmanipulaDice();\n\t\t\t}\n\t\t});\n\n\t\t//Criando e configurando botao para realizar palpite\n\t\tthis.suggestButton = new JButton(\"REALIZAR PALPITE\");\n\t\tthis.suggestButton.setBounds(45, 90, 175, 45);\n\t\tthis.suggestButton.setActionCommand(\"SUGGEST\");\n\t\tthis.suggestButton.setMnemonic(KeyEvent.VK_S);\n\t\tthis.suggestButton.setEnabled(false);\n\t\tthis.suggestButton.setToolTipText(\"Clique aqui para realizar sugestão\");\n\n\t\t//Criando e configurando botao para realizar acusacao\n\t\tthis.accuseButton = new JButton(\"ACUSAR\");\n\t\tthis.accuseButton.setBounds(45, 160, 175, 45);\n\t\tthis.accuseButton.setActionCommand(\"ACCUSE\");\n\t\tthis.accuseButton.setMnemonic(KeyEvent.VK_A);\n\t\tthis.accuseButton.setToolTipText(\"Clique para fazer acusacao. OBS: Acusacao incorreta poderá te eliminar do jogo.\");\n\n\t\t//Adicionando os botoes corretamente no painel\n\t\tthis.playerOptionPanel.add(this.moveButton);\n\t\tthis.playerOptionPanel.add(this.suggestButton);\n\t\tthis.playerOptionPanel.add(this.accuseButton);\n\n\t\t//Incluindo painel em painel maior\n\t\tthis.add(this.playerOptionPanel);\n\t}", "public kinpanel() {\n initComponents();\n }", "public Game(){\n new Window(800, 800, \"Survival Game\", this);\n handler = new Handler();\n camera = new Camera(0,0);\n this.addKeyListener(new KeyInput(handler));\n\n //create the map\n map = new Map(handler);\n map.generateMap();\n map.drawWorld();\n\n player = new Player(100, 100, ID.Player, handler);\n handler.addObject(player);\n handler.addObject(new Bear(600, 600, ID.Bear, player));\n handler.addObject(new Deer(400, 400, ID.Deer, player));\n\n start();\n }", "public Stage_3()\n {\n super();\n super.stageLevel = 3;\n\n this.designAttributes = new DesignAttributes();\n this.drawingPanel = new DrawingPanel();\n this.drawingPanel.setBackground(Color.BLACK);\n this.drawingPanel.setFocusable(true);\n \n // Set up the JButtons\n section1 = new JButton();\n section2 = new JButton();\n section3 = new JButton();\n batButton = new JButton();\n dagButton = new JButton();\n macButton = new JButton();\n \n this.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), \"Escape\");\n // Customized Action for pressing Escape\n Action escapeAction = new AbstractAction()\n {\n @Override\n public void actionPerformed(ActionEvent e)\n {\n CardLayout cl = (CardLayout) (PanelManager.menuCardPanel.getLayout());\n cl.show(PanelManager.menuCardPanel, \"MIDGAMEMENU\");\n }\n };\n \n // Adding an escape action map to the action map\n this.getActionMap().put(\"Escape\", escapeAction);\n \n updateStagePlayer();\n\n add(this.drawingPanel);\n }", "public AppoinmentPanel() {\n initComponents();\n }", "public Door() {\n initComponents();\n }", "public PlayerPanel() {\n initComponents();\n\n panel.initializeButtons(\n new javax.swing.JButton[]{addPlayerButton, editPlayerButton, deletePlayerButton},\n new javax.swing.JButton[]{cancelPlayerButton, savePlayerButton}\n );\n }", "public AddPlayer() {\n initComponents(); \n }" ]
[ "0.6470611", "0.6456944", "0.6336797", "0.6304908", "0.6224593", "0.6224563", "0.62135744", "0.6128607", "0.6126576", "0.6111638", "0.61048824", "0.605479", "0.60383594", "0.60359776", "0.6016455", "0.5999651", "0.5974071", "0.5969982", "0.59699786", "0.5959148", "0.58993363", "0.58890367", "0.5871886", "0.5844789", "0.58446515", "0.5843239", "0.5835969", "0.5833093", "0.5831736", "0.5831736", "0.5830836", "0.58162475", "0.57898575", "0.5758106", "0.5748361", "0.5746494", "0.5744581", "0.5720103", "0.57171273", "0.5712216", "0.5711646", "0.5705784", "0.56944275", "0.56900865", "0.56821156", "0.5662427", "0.56598264", "0.5658894", "0.56473815", "0.5641196", "0.56390995", "0.5637298", "0.5633664", "0.5633458", "0.563065", "0.56208193", "0.5616936", "0.56162024", "0.56144315", "0.5612041", "0.5607897", "0.5595923", "0.55951875", "0.5593558", "0.5591709", "0.55912244", "0.5589751", "0.5579293", "0.55725884", "0.5565711", "0.5562054", "0.5558305", "0.55580384", "0.55570006", "0.5556717", "0.5555383", "0.55441594", "0.55440354", "0.5540971", "0.55301356", "0.55274266", "0.55254054", "0.5524458", "0.5524172", "0.5522777", "0.5517698", "0.5508189", "0.5504591", "0.5498381", "0.5498131", "0.54834616", "0.5483245", "0.5480833", "0.54777503", "0.5477079", "0.5475283", "0.547305", "0.5472743", "0.54717606", "0.5470719" ]
0.639692
2
the index of the array is the player for instance player 1 is the index 0.
public String setWins(int Player){ int winsUpdater = winsTracker[Player].getPlayer(); winsUpdater++; for(int i = 0; i<winsTracker.length;i++){ if(i==Player){ winsTracker[Player].setPlayer(winsUpdater); Player++; return "Player "+Player+"'s wins " +winsUpdater; } } return "null"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player getPlayer(int index) {\r\n return players[index];\r\n }", "int getActivePlayerIndex();", "public int getPlayerPosition(int player)\n {\n return players[player];\n }", "@Override\n public Player getPlayerOnIndex(int index) {\n return players.get(index);\n }", "public int getCurrentPlayerIndex(){\r\n return currentPlayerIndex;\r\n }", "private static int getIndexOfPlayer(PlayerSide playerSide) {\n if (playerSide == PlayerSide.CURRENT_PLAYER){\n return 0;\n } else {\n return 1;\n }\n }", "public Player getPlayer(int i) {\n return this.players[i];\n }", "public final int getPlayerIndex() {\r\n return this.playerIndex;\r\n }", "private static PlayerSide getPlayerByIndex(int index) {\n if (index == 0){\n return PlayerSide.CURRENT_PLAYER;\n } else {\n return PlayerSide.WAITING_PLAYER;\n }\n }", "public static int currentPlayerIndex() {\n return turn-1;\n }", "public int getPlayer()\n {\n return this.player;\n }", "private void increaseCurrentPlayerIndex() {\n\t\tcurrentPlayer++;\n\t\tif(currentPlayer>3)\n\t\t\tcurrentPlayer=0;\n\t}", "public void setCurrentPlayer(int index){\n this.currentPlayer=index%4;\n }", "public Player[] getPlayers() {\r\n return players;\r\n }", "public Player[] getPlayers()\r\n\t{\r\n\t\treturn this.players;\r\n\t}", "public Player[] getPlayers() {\n return this.players;\n }", "public Player[] getPlayers() {\n return this.players;\n }", "public Player[] getPlayers() {\n return players;\n }", "public static Player[] createPlayers(){\r\n\t\tPlayer[] players = new Player[2];\r\n\t\tSystem.out.print(\"Enter three letter nick name of Player1: \");\r\n\t\tplayers[0] = new Player(getName(), 0);\r\n\t\tSystem.out.print(\"Enter three letter nick name of Player2: \");\r\n\t\tplayers[1] = new Player(getName(), 18);\r\n\t\treturn players;\r\n\t}", "public Connect4Player[] getPlayers(){\n\t\tConnect4Player[] output = new Connect4Player[4];\n\t\tif(players.isEmpty()){\n\t\t\tplayers.add(new Connect4Player(this, TOKEN.X));\n\t\t\tplayers.add(new Connect4Player(this, TOKEN.O));\n\t\t}\n\t\toutput[0] = players.get(0);\n\t\toutput[1] = players.get(1);\n\t\treturn output;\n\t}", "public int[] savePlayerPosition(){\n int [] playerPosition = new int[2];\n playerPosition[0] = player.getX();\n playerPosition[1]= player.getY();\n return playerPosition;\n }", "public Player[] getPlayers()\n\t{\n\t\treturn players;\n\t}", "public static int[] findPlayerLocation(Player player){\r\n int playerX = 0;\r\n int playerY = 0;\r\n //finding the player on the board\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n if (player.getPosition() == board[i][j]) {\r\n playerX = i;\r\n playerY = j;\r\n }\r\n }\r\n }\r\n\r\n int[] playerLocation = {playerX, playerY};\r\n\r\n return playerLocation;\r\n }", "public static PlayerClass getPlayerClass(int index) {\r\n PlayerClass[] playerClass = PlayerClass.values();\r\n\r\n return playerClass[index];\r\n }", "public void storePlayer(int index, int val) {\n\t\tplayerArray[index] = val;\n\t}", "private Player aiRequestTarget(Player ai){\n // generates a random player index\n int index = (int) (Math.random() * GoFish.Players.length);\n\n // prevents the logic from outputting and index that is equal\n // to the player object\n while (GoFish.Players[index]==ai){\n index = (int) (Math.random() * GoFish.Players.length);\n }// end while\n\n return GoFish.Players[index];\n }", "public int getPlayer() {\r\n\t\treturn player;\r\n\t}", "public int[] getPlayerInitialPosition() \n\t{\n\t\treturn player_initial_position;\n\t}", "@Override\n public SoccerPlayer playerNum(int idx, String teamName) {\n\n Collection<SoccerPlayer> soccerPlayers = stats.values();\n\n if (teamName == null){\n\n int count = 0;\n\n for (SoccerPlayer sp: soccerPlayers){\n\n if(count == idx){\n\n return sp;\n\n }\n else{\n\n count++;\n\n }\n }\n }\n\n else {\n\n int count = -1;\n\n for (SoccerPlayer sp: soccerPlayers){\n\n if(sp.getTeamName().equals(teamName)){\n\n count++;\n\n if(count == idx){\n\n return sp;\n\n }\n }\n }\n }\n\n return null;\n }", "public Player(int i){\r\n playerID=i;\r\n }", "public int nextPlayer() {\n// int count = 0;\n// for (int i = 0; i < playersArray.length; i++)\n// if (playersArray[i]<0)\n// count++;\n//\n// if (\n do {\n player = (player + 1) % numberPlayers;\n } while (playersArray[player] < 0);\n return player;\n }", "private void getPlayerNames(){\n players[0] = JOptionPane.showInputDialog(\"Please input the name for the first player\");\n players[1] = JOptionPane.showInputDialog(\"Please input the name for the second player\");\n }", "public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}", "public long getPlayerIds(int index) {\n return playerIds_.get(index);\n }", "public static Player findPlayerByIndex(boolean evenArraySize, int i) {\n\t\tboolean evenPosition = (i % 2 == 0);\n\t\tif (evenArraySize) {\n\t\t\treturn (evenPosition ? Player.ME : Player.OPPONENT);\n\t\t} else {\n\t\t\treturn (evenPosition ? Player.OPPONENT : Player.ME);\n\t\t}\n }", "Player getPlayer(int playerNumber){\n return players.get(playerNumber);\n }", "public int getPlayerIndexOfOwner() {\n\t\tif (this.settlement == null) {\n\t\t\tif (this.city == null) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn this.city.getPlayerIndex();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn this.settlement.getPlayerIndex();\n\t\t}\n\t}", "public long getPlayerIds(int index) {\n return playerIds_.get(index);\n }", "private Player nextPlayer() {\n Player next = players.get(nextPlayerIdx++);\n nextPlayerIdx %= players.size(); \n \n return next;\n }", "@Override\npublic int getNumPlayers() {\n\treturn numPlayer;\n}", "public int getArrayIndex(){\n return squareIndex * 9 + position;\n }", "public String[] getPlayers() {\r\n return playerIds;\r\n }", "public CompactPlayer[] getPlayers()\n {\n return players;\n }", "public GamePlayerManager(int players, int ai){\n playerAmount = players;\n aiAmount = ai;\n colorArray[0] = \"RED\";\n colorArray[1] = \"BLUE\";\n colorArray[2] = \"YELLOW\";\n colorArray[3] = \"GREEN\";\n colorArray[4] = \"WHITE\";\n colorArray[5] = \"BLACK\";\n colorArray[6] = \"CYAN\";\n colorArray[7] = \"ORANGE\";\n colorArray[8] = \"MAGENTA\";\n colorArray[9] = \"PINK\";\n }", "private void updateActivePlayer() {\n indexOfActivePlayer++;\n if (indexOfActivePlayer == players.size()) {\n String previousPlayer = players.get(indexOfActivePlayer - 1).getName();\n Collections.shuffle(players);\n while (players.get(0).getName() == previousPlayer) {\n Collections.shuffle(players);\n }\n indexOfActivePlayer = 0;\n }\n }", "public int getCurrentPlayer(){\n return this.currentPlayer;\n }", "public int nextPlayer() {\n\t\tplayer = (player + 1) % playerCount;\n\t\treturn player;\n\t}", "private void setupPlayers() {\n\t\tuserData=(UserData) Main.currentStage.getUserData();\n\t\tnumberPlayers=userData.getNumberPlayers();\n\t\tplayerNames=userData.getPlayerNames();\n\t\tcurrentPlayer=userData.getFirstPlayer();\n\t\tlb_currentplayername.setText(playerNames[currentPlayer]);\n\t\tplayers =new Player[4];\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif(i<numberPlayers) {\n\t\t\t\tplayers[i]=new Player(playerNames[i], false, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//waiting for player choose what way to go then handler that choice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\t\t\t\tplayers[i]=new Player(playerNames[i], true, i) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void rollDices() {\n\t\t\t\t\t\trotatedDice1();\n\t\t\t\t\t\trotatedDice2();\n\t\t\t\t\t\t//randomchoice and next player rolldice\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\tswitch (i) {\n\t\t\t\tcase 0:{\n\t\t\t\t\tplayers[i].setHorseColor(yh0, yh1, yh2, yh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 1:{\n\t\t\t\t\tplayers[i].setHorseColor(bh0, bh1, bh2, bh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 2:{\n\t\t\t\t\tplayers[i].setHorseColor(rh0, rh1, rh2, rh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 3:{\n\t\t\t\t\tplayers[i].setHorseColor(gh0, gh1, gh2, gh3);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void initialize()\n\t{\n\n\t\tint[] actualPlayers = new int[4]; // indices of the existing players\n\t\tint index = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (players[i].exist)\n\t\t\t\tactualPlayers[index++] = i;\n\t\t}\n\n\t\tif (playerNum == 4)\n\t\t{\n\t\t\tplayers[2].x = 16;\n\t\t\tplayers[2].y = 30;\n\t\t\tplayers[1].x = 16;\n\t\t\tplayers[1].y = 10;\n\t\t\tplayers[3].x = 37;\n\t\t\tplayers[3].y = 10;\n\t\t\tplayers[4].x = 37;\n\t\t\tplayers[4].y = 30;\n\t\t}\n\t\telse if (playerNum == 2)\n\t\t{\t\t\t\n\t\t\tplayers[actualPlayers[0]].x = 16;\n\t\t\tplayers[actualPlayers[0]].y = 20;\n\t\t\tplayers[actualPlayers[1]].x = 37;\n\t\t\tplayers[actualPlayers[1]].y = 20;\t\t\t \n\t\t}\n\t\telse if (playerNum == 3)\n\t\t{\n\t\t\tplayers[actualPlayers[0]].x = 16;\n\t\t\tplayers[actualPlayers[0]].y = 20;\n\t\t\tplayers[actualPlayers[1]].x = 37;\n\t\t\tplayers[actualPlayers[1]].y = 10;\n\t\t\tplayers[actualPlayers[2]].x = 37;\n\t\t\tplayers[actualPlayers[2]].y = 30;\t\n\t\t}\n\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tplayers[i].square = new boolean[HEIGHT + 2][WIDTH + 2];\n\t\t\tif (players[i].exist)\n\t\t\t{\n\t\t\t\tplayers[i].alive = true;\n\t\t\t\tplayers[i].square[players[i].y][players[i].x] = true;\n\t\t\t}\n\t\t\tplayers[i].dir = 'a'; // 'a' means no direction yet\n\t\t}\n\n\t\tstarting = false;\n\n\t}", "public int privousPlayer() {\n do {\n if (player != 0) {\n player --;\n } else {\n player = playersArray[playersArray.length - 1];\n }\n } while (playersArray[player] < 0);\n return player;\n }", "@Override\n public int getNextPlayer() {\n //TODO Implement this method\n if(isPlayerOne){\n return 0;\n }else {\n return 1;\n }\n }", "@Override\n public Object getElement(int index){\n return gameCollection.elementAt(index);\n }", "public int getActivePlayer() {\n return activePlayer;\n }", "public static void main(String[] args) {\n Player[] playerArray = new Player[5];\n //Creating and naming the players\n Player player1 = new Player();\n Player player2 = new Player();\n for (int i = 1; i <= 2; i++) {\n Scanner sc = new Scanner(System.in);\n System.out.print(\"Please input the name of Player\" + i + \":\");\n String name = sc.nextLine();\n if (i == 1) {\n player1.setName(name);\n }\n if (i == 2) {\n player2.setName(name);\n }\n }\n //Putting the players in the array\n playerArray[0] = player1;\n playerArray[1] = player2;\n \n for (int i = 0; i < playerArray.length; i++) {\n if (playerArray[i] != null) { // we have to check to see if there is a player object in the array\n System.out.println(\"Player\" + i + \" name is: \" + playerArray[i].getName());\n System.out.println(playerArray[i].getHealth() + \"Hp\");\n System.out.println(playerArray[i].getMana() + \"Mp\");\n }\n }\n \n Sword1 sword1 = new Sword1();\n sword1.setName(\"Longsword\");\n Sword2 sword2 = new Sword2();\n sword2.setName(\"Excalibur\");\n \n System.out.println(player1.getName() + \" is using; a \" + sword1.getName());\n System.out.print(\"The \" + sword1.getName() + \" deals \" + sword1.getDamage() + \"Dmg. The \" + sword1.getName() + \" has an attack speed of: \");\n System.out.printf(\"%.2f\", sword1.getAttackSpeed());\n System.out.println(\"/s\");\n \n System.out.println(player2.getName() + \" is using; a \" + sword2.getName());\n System.out.print(\"The \" + sword2.getName() + \" deals \" + sword2.getDamage() + \"Dmg. The \" + sword2.getName() + \" has an attack speed of: \");\n System.out.printf(\"%.2f\", sword2.getAttackSpeed());\n System.out.println(\"/s\");\n \n float damagePerSecond1 = sword1.getDamage()*sword1.getAttackSpeed();\n float damagePerSecond2 = sword2.getDamage()*sword2.getAttackSpeed();\n System.out.print(\"The \" + sword1.getName() + \" deals: \");\n System.out.printf(\"%.2f\", damagePerSecond1);\n System.out.println(\"/s\");\n System.out.print(\"The \" + sword2.getName() + \" deals: \");\n System.out.printf(\"%.2f\", damagePerSecond2);\n System.out.println(\"/s\");\n \n if (damagePerSecond1 > damagePerSecond2) {\n System.out.println(player1.getName() + \" slashes \" + player2.getName() + \" across the chest, killing them.\");\n System.out.println(player1.getName() + \" Wins!\");\n }\n if (damagePerSecond1 < damagePerSecond2) {\n System.out.println(player2.getName() + \" slashes \" + player1.getName() + \" across the chest, killing them.\");\n System.out.println(player2.getName() + \" Wins!\");\n }\n // System.out.println(player1.getName() + \"'s health is: \" + player1.getHealth());\n }", "int getIndex(){\r\n\t\treturn index;\r\n\t}", "public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }", "private int otherPlayer() {\n return (currentPlayer == 1 ? 2 : 1);\n }", "private void renderPlayers() {\n\t\tfor (Player player : this.game.players()) {\n\t\t\t/* So, logically convluted crap ahead.\n\t\t\t * Player position is tracked via a 1-based coordinate system.\n\t\t\t * Our output array is 0-based.\n\t\t\t * Our output array contains an additional row/column on each side for the wall.\n\t\t\t *\n\t\t\t * Hence, when mapping the player's position to an\n\t\t\t * index in the output array, we have to subtract one\n\t\t\t * to switch from 1-basedness to 0-basedness, then add\n\t\t\t * 1 to accomodate for the wall column/row. Which\n\t\t\t * leaves us with a difference of 0. */\n\t\t\tthis.output[player.position().y][player.position().x] = player.sign();\n\t\t}\n\t}", "public int getIndex(){\r\n \treturn index;\r\n }", "public Player(){\r\n cards = new ArrayList<String>();\r\n indexes = new ArrayList<Integer>();\r\n }", "public abstract void playerExploded(int playerIndex);", "public int getNumPlayers(){\n return m_numPlayers;\n }", "public static void initial()\n\t{\n\t\tscoreteam1 = 0; scoreteam2 = 0;\n\t\tdelayed = 0;\n\t\tplayers = new Player[5];\n\t\tfor (int i = 0; i < 5; i++) \n\t\t{\n\t\t\tplayers[i] = new Player();\n\t\t}\n\n\t\t// finding how many players there are (2, 3, or 4) and initializing status\n\t\tplayerNum = 0;\n\t\tfor (int i = 0; i < 5; i++)\n\t\t{\n\t\t\tif (Selection.exist[i])\n\t\t\t{\n\t\t\t\tplayerNum++;\n\t\t\t}\n\t\t\tplayers[i].exist = Selection.exist[i]; \n\t\t\tplayers[i].ai = Selection.ai[i];\n\t\t\tplayers[i].name = Selection.name[i];\t\t \n\t\t}\n\n\n\t\tplayers[3].keyDown = KeyEvent.VK_SEMICOLON;\n\t\tplayers[3].keyLeft = KeyEvent.VK_L;\n\t\tplayers[3].keyRight = KeyEvent.VK_QUOTE;\n\t\tplayers[3].keyUp = KeyEvent.VK_P;\n\t\tplayers[2].keyDown = KeyEvent.VK_H;\n\t\tplayers[2].keyLeft = KeyEvent.VK_G;\n\t\tplayers[2].keyRight = KeyEvent.VK_J;\n\t\tplayers[2].keyUp = KeyEvent.VK_Y;\n\t\tplayers[1].keyDown = KeyEvent.VK_S;\n\t\tplayers[1].keyLeft = KeyEvent.VK_A;\n\t\tplayers[1].keyRight = KeyEvent.VK_D;\n\t\tplayers[1].keyUp = KeyEvent.VK_W;\n\t\tplayers[4].keyDown = KeyEvent.VK_DOWN;\n\t\tplayers[4].keyLeft = KeyEvent.VK_LEFT;\n\t\tplayers[4].keyRight = KeyEvent.VK_RIGHT;\n\t\tplayers[4].keyUp = KeyEvent.VK_UP;\n\t\tplayers[1].color = Color.red;\n\t\tplayers[3].color = Color.green;\n\n\t\tif (Selection.team)\n\t\t{\n\t\t\tplayers[2].color = Color.red;\n\t\t\tplayers[4].color = Color.green;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tplayers[2].color = Color.blue;\n\t\t\tplayers[4].color = Color.yellow;\n\t\t}\n\n\t}", "private void enemy_choose_player(){\n\t\tint i;\n\t\tRandom r_gen = new Random();\n\t\tfor(i=0;i<enemy_num;i++){\n\t\t\tenemy[i][2] = r_gen.nextInt(player_num);\n\t\t}\n\t}", "public String userNameIndex(int index){\n index = index-1;\n String userName1 = \"\";\n userName1 = user[index].getUserName();\n return userName1;\n }", "public void setPlayers(Player[] players) {\n this.players = players;\n }", "public void selectAttackerPlayer(Player[] players){\n int x,xTemp;\n Player playerSelected;\n if( team == 0){\n xTemp = 0;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x > xTemp ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }else{\n xTemp = 14;\n for(Player p : players ){\n x = (int) p.getPosition().getX();\n if( x < xTemp ){\n xTemp = x;\n playerSelected = p;\n }\n }\n playerOne = playerSelected;\n }\n }", "public String getName(){\n\t\treturn players.get(0).getName();\n\t}", "public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }", "public int getPlayerId();", "public int getCurentPlayerNumber() {\n return players.size();\n }", "public void playSubRound(int index) {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"PRINTING ARRAY OF PLAYERS:\");\n\t\tSystem.out.println(gameLogic.getArrayOfPlayers().getArrayOfPlayers());\n\n\t\tdisplayPositionUI();\n\t\tdisplayBidsWonUI();\n\n\t\tif (currentPlayer == gameLogic.getArrayOfPlayers().getArrayOfPlayers().get( gameLogic.getArrayOfPlayers().getArrayOfPlayers().size()-1).getPlayerId()){\n\t\t\tsubRound += 1;\n\t\t}\n\n\t\tfor (Player p: gameLogic.getArrayOfPlayers().getArrayOfPlayers()) {\n\t\t\tif (currentPlayer == p.getPlayerId()) {\n\t\t\t\tif (currentPlayer == 3){\n\t\t\t\t\tcurrentPlayer = 0;\n\t\t\t\t} else {\n\t\t\t\t\tcurrentPlayer += 1;\n\t\t\t\t}\n\n\t\t\t\t/* Get the highest card in the hand */\n\t\t Card highestPlayedCard;\n\t\t Suit leadSuit2;\n\n\t\t if (gameLogic.getLeadSuitCard() == null) {\n\t\t leadSuit2 = null;\n\t\t } else {\n\t\t leadSuit2 = gameLogic.getLeadSuitCard().getSuit();\n\t\t }\n\n\t\t if (gameLogic.getTableHand().sortedTableHand( gameLogic.getTrumpCard().getSuit(), leadSuit2 ).size() == 0 ) {\n\t\t highestPlayedCard = null;\n\t\t } else {\n\t\t highestPlayedCard = gameLogic.getTableHand().sortedTableHand(gameLogic.getTrumpCard().getSuit(), gameLogic.getLeadSuitCard().getSuit()).get(0).getPlayerCard();\n\t\t }\n\n\t\t\t\t/* if first player is a computer, play the first card and set the lead suit */\n\t\t if (p instanceof Computer) {\n\t Computer pComputer = (Computer) p;\n\t System.out.println(\"Printing computer: \" + pComputer);\n\n\t Card cardForCompToPlay = pComputer.playCard(gameLogic.getTrumpCard().getSuit(), leadSuit2, highestPlayedCard);\n\t System.out.println(\"Computer's Hand\" + p.getHand() + \"\\n\");\n\n\t if (p.getPosition() == 0) {\n\t gameLogic.setLeadSuitCard(cardForCompToPlay);\n\t \tString leadSuitString = \"\" + gameLogic.getLeadSuitCard().getSuit();\n\t displayLead(leadSuitString);\n\t }\n\n\t gameLogic.getTableHand().addCard(p, p.removeFromHand(cardForCompToPlay));\n\n\t\t\t\t\t/* Display Table Hand */\n\t\t\t\t\tdisplayTableHandUI();\n\t System.out.println(gameLogic.getTableHand().toString());\n\t break;\n\n\t } else {\n\t\t\t\t\t/* if first player is the player, play the first card and set the lead suit */\n\n\t\t\t\t\t/* Display Hand to user */\n\t System.out.println(\"Player's Hand: \" + p.getHand());\n\n\t\t\t\t\t/* Get input from user */\n\t displayCardUI();\n\n\t try {\n\t\t if (p.getPosition() == 0) {\n\t\t gameLogic.setLeadSuitCard(p.getHand().getCard(index));\n\t\t \tString leadSuitString = \"\" + gameLogic.getLeadSuitCard().getSuit();\n\t\t displayLead(leadSuitString);\n\t\t }\n \t\tgameLogic.getTableHand().addCard(p,p.removeFromHand(p.getHand().getCard(index)));\n\t\t } catch (IndexOutOfBoundsException error){\n\t\t }\n\n\t displayTableHandUI();\n\t // Display Table Hand\n \t\tbreak;\n\t }\n\t }\n\t }\n\t}", "public int getIndex(){\n return index;\n }", "public int getIndex(){\n return index;\n }", "public int getPoints ( Player player );", "public int getCurrentPlayer() {\n return player;\n }", "public int getPlayerX() {\n return playerX;\n }", "public static void main(String[] args) {\n\t\tint[] game = { 0, 0, 2, 0, 0, 0, 0 };\n\n\t\tint player = 0;\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tif (game[i] == 2) {\n\t\t\t\tplayer = i; \n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public ArrayList<Player> getPlayers() {return steadyPlayers;}", "public Position getPlayerPiecePosition(int playerNum) {\n return playerPiecePositions[playerNum];\n }", "public int getPlayersPiece() {\n return playersPiece;\n }", "void turnStarted(int playerIndex);", "private void findFirstPlayer() { \n if(isFirstTurn) {\n for(PlayerId p: PlayerId.ALL) {\n if(handsOfCards.get(p).contains(Card.of(Color.DIAMOND, Rank.SEVEN))) {\n firstPlayer = p;\n }\n }\n }\n else {\n firstPlayer = PlayerId.ALL.get((firstPlayer.ordinal()+1)%PlayerId.COUNT);\n }\n }", "public Player(String name, int playerIndex) {\r\n\t\tthis.name = name;\r\n\t\tthis.playerIndex = playerIndex;\r\n }", "Player getSelectedPlayer();", "public int returnAndUsePlayerNumber() {\r\n\t\tfor (int no = 1; no < this.playerNumbers.length; no++) {\r\n\t\t\tif (!this.playerNumbers[no]) {\r\n\t\t\t\tthis.playerNumbers[no] = true;\r\n\t\t\t\treturn no;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}", "public int getPlayerNumber() {\n return this.playerNumber;\n }", "public static void main(String[] args) \n {\n \n Team j = new Team(\"SaPKo\"); \n Player p = new Player(\"Sasf\"); \n Player a = new Player (\"gds\");\n Player s = new Player (\"asjkdh\");\n j.addPlayer(p);\n j.addPlayer(a);\n j.addPlayer(s);\n \n// System.out.println(\"array size: \" + j.getArraySize());\n \n j.printPlayers();\n }", "public int activePlayer() {\n return this.activePlayer;\n }", "private int getNextPlayer() {\n int nextPlayerID = ((currentTurn + turnOrder) % numPlayers);\n nextPlayerID = (((nextPlayerID + numPlayers) % numPlayers)); // handles negative numbers\n return nextPlayerID;\n }", "public String[] getNearestPlayer(Player p, PlayerData pd)\r\n/* 60: */ {\r\n/* 61:58 */ Game g = pd.getGame();\r\n/* 62: */ \r\n/* 63:60 */ int x = p.getLocation().getBlockX();\r\n/* 64:61 */ int y = p.getLocation().getBlockY();\r\n/* 65:62 */ int z = p.getLocation().getBlockZ();\r\n/* 66: */ \r\n/* 67:64 */ int i = 200000;\r\n/* 68: */ \r\n/* 69:66 */ Player player = null;\r\n/* 70:68 */ for (String s : g.getPlayers())\r\n/* 71: */ {\r\n/* 72:70 */ Player p2 = Bukkit.getPlayer(s);\r\n/* 73:72 */ if ((p2 != null) && (!p2.equals(p)) && (!pd.isOnTeam(s)))\r\n/* 74: */ {\r\n/* 75:74 */ Location l = p2.getLocation();\r\n/* 76: */ \r\n/* 77:76 */ int c = cal((int)(x - l.getX())) + cal((int)(y - l.getY())) + cal((int)(z - l.getZ()));\r\n/* 78:78 */ if (i > c)\r\n/* 79: */ {\r\n/* 80:79 */ player = p2;\r\n/* 81:80 */ i = c;\r\n/* 82: */ }\r\n/* 83: */ }\r\n/* 84: */ }\r\n/* 85:84 */ if (player != null) {\r\n/* 86:84 */ p.setCompassTarget(player.getLocation());\r\n/* 87: */ }\r\n/* 88:86 */ return new String[] { player == null ? \"none\" : player.getName(), String.valueOf(i) };\r\n/* 89: */ }", "public int getPlayerVisiblePosition(Colour colour);", "public int getIndex() { return this.index; }", "public int getPlayerNumber() {\n return playerNumber;\n }", "private void createHumanPlayer() {\n humanPlayer = new Player(\"USER\");\n players[0] = humanPlayer;\n }", "private PlayerController playerControllerFor(int player)\n {\n switch (player) {\n case PLAYER_1_FLAG:\n return player1;\n case PLAYER_2_FLAG:\n return player2;\n default:\n return null;\n }\n }", "public int getIdPlayer() {\n\t\treturn idPlayer;\n\t}", "private int getIndex() {\n\t\treturn this.index;\r\n\t}", "@Override\n public int getWinner()\n {\n return currentPlayer;\n }", "public String[] getPlayersUsername(){\n String[] usernames = new String[players.size()];\n Iterator it = players.entrySet().iterator();\n int i = 0;\n while(it.hasNext()){\n Map.Entry pair = (Map.Entry)it.next();\n usernames[i] = (String)pair.getKey();\n i++;\n }\n return usernames;\n }", "public void nextPlayer() {\n\t\tif (currentPlayer.equals(vServerThread.get(0))){\n\t\t\tcurrentPlayer=vServerThread.get(1);\n\t\t} else if (currentPlayer.equals(vServerThread.get(1))){\n\t\t\tcurrentPlayer=vServerThread.get(0);\n\t\t}\n\t}" ]
[ "0.7358926", "0.7260977", "0.72494125", "0.710453", "0.707265", "0.69833326", "0.68491465", "0.6846428", "0.67773676", "0.65260655", "0.6414425", "0.63944757", "0.6390181", "0.6344722", "0.63347346", "0.6304283", "0.6304283", "0.62624407", "0.6215441", "0.61913896", "0.6184665", "0.6150808", "0.6149002", "0.6145909", "0.6143598", "0.6142545", "0.61263615", "0.61055243", "0.6096689", "0.60896146", "0.6084975", "0.6068373", "0.60501707", "0.6040906", "0.6022348", "0.6021357", "0.6001493", "0.5993922", "0.59882426", "0.59792113", "0.5976927", "0.59745353", "0.59733576", "0.59614515", "0.5930949", "0.5922729", "0.5922371", "0.5911254", "0.5906076", "0.59050655", "0.58753675", "0.58722377", "0.5835853", "0.58185464", "0.58076334", "0.5795173", "0.57793516", "0.57736295", "0.57691365", "0.5759999", "0.5753899", "0.5752621", "0.575245", "0.5736206", "0.57319635", "0.57084495", "0.57074", "0.5702822", "0.570253", "0.57001823", "0.5696978", "0.5695381", "0.56836826", "0.56836826", "0.5681437", "0.56795806", "0.56757957", "0.56672996", "0.5659397", "0.56555104", "0.5654155", "0.5653561", "0.56487674", "0.56431997", "0.56405306", "0.5637136", "0.563041", "0.5629398", "0.56227505", "0.5622135", "0.56164855", "0.5610772", "0.56037474", "0.5603064", "0.5599553", "0.55981624", "0.5597861", "0.5597235", "0.5593726", "0.55915874", "0.5590983" ]
0.0
-1
Don't need to call Display board, or reset reset it done when the game is constructed Display board is done only when the user inputs a valid JButton press. this methods handles all of the dialog boxes for the panel
private void startUpConditions(){ String strSize = JOptionPane.showInputDialog(null, "Pick a Board Size between 3-30."); try{ selectedSize = Integer.parseInt(strSize); if(selectedSize < 2||selectedSize > 30){ selectedSize = 10; JOptionPane.showMessageDialog(null, "The Game has" + " defaulted to a Board Size of 10."); } }catch(NumberFormatException exception){ JOptionPane.showMessageDialog(null, "The Game has" + " defaulted to a Board Size of 10."+ " Because you input characters other than numbers."); selectedSize = 10; } //selecting the number of players within the game //verifying a valid input for the Players //It's awfully boring to play by yourself after all. String strPlay = JOptionPane.showInputDialog(null, "Pick number of players between 2-10"); try{ if(strPlay==null){ JOptionPane.showMessageDialog(null, "The game" +" has defaulted to 2 players."); selectedPlayers = 2; } // if(input == JOptionPane.CANCEL_OPTION){ // System.exit(1); // } if(strPlay!=null){ selectedPlayers = Integer.parseInt(strPlay); if(selectedPlayers < 2||selectedPlayers > 10){ selectedPlayers = 2; JOptionPane.showMessageDialog(null, "The game" +" has defaulted to 2 players." +" Because you input a number that " +"was out of bounds."); } } }catch(NumberFormatException exception){ JOptionPane.showMessageDialog(null,"You input " + "something that was not a number." + " The game has defaulted to 2 players."); selectedPlayers = 2; } String goFirst = JOptionPane.showInputDialog(null, "Pick" + " who will go first."); try{ if(goFirst==null){ JOptionPane.showMessageDialog(null, "The game" +" has defaulted to Player 1s turn."); this.firstTurn = 0; } if(goFirst!=null){ this.firstTurn = Integer.parseInt(goFirst); } }catch(NumberFormatException exception){ JOptionPane.showMessageDialog(null, "You input " + "something other than a number." + " The Game has defaulted to player 1s turn."); this.firstTurn = 0; }finally{ JOptionPane.showMessageDialog(null, "The game" +" will now begin."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(ActionEvent e) \n {\n JFrame dialogBox;\n \n // Use a nested for loop to loop through the buttons and find which\n // one was clicked.\n for (int row = 0; row < 15; row++) \n {\n for (int col = 0; col < 15; col++) \n {\n // If the button is valid, continue, otherwise, show an error.\n if (_self[row][col] == e.getSource() && \n _self[row][col].getBackground() == Color.WHITE)\n {\n dialogBox = new JFrame();\n \n // Display a coordinate message.\n JOptionPane.showMessageDialog(dialogBox, \n \"Coordinates: \" + row + \", \" + col, \n \"Button Coordinates\", JOptionPane.INFORMATION_MESSAGE);\n \n // Needs to know which player to use, we also need to change the color of the selected cell based off of response\n boolean result = _currentPlayer.takeATurn(row, col); //0 for miss 1 for hit? \n \n // KIRSTEN/NOAH HERE, Using currentPlayer, call function in Player that sets the status of color grid in the Grid class if takeATurn returns as a hit\n // Then Based on that color setbackground to Red if its a hit\n \n //works if current player is initialized \n _currentPlayer.setColorGrid(row, col, result ? Color.ORANGE : Color.WHITE);\n \n _buttonGrid[row][col].setBackground(result ? Color.ORANGE : Color.WHITE);\n \n // changeGridColor(row, col, result);\n // switchPlayer();\n }\n \n else if (_self[row][col] == e.getSource() && \n _self[row][col].getBackground() == Color.WHITE)\n {\n dialogBox = new JFrame();\n \n // Display an error message.\n JOptionPane.showMessageDialog(dialogBox, \n \"Button already chosen\", \"Invalid Button\", \n JOptionPane.ERROR_MESSAGE);\n }\n }\n }\n }", "private JFrame playGame(){\r\n \r\n JPanel board = new JPanel();\r\n board.setLayout(new GridLayout(row,column));\r\n \r\n //cell button 2d array\r\n JButton[][] cellButtons = new JButton[row][column];\r\n for (int i = 0; i < row; ++i) {\r\n for (int j = 0; j < column ; ++j) {\r\n cellButtons[i][j] = new JButton();\r\n }\r\n }\r\n \r\n \r\n for (int i = 0; i < row; ++i) {\r\n for (int j = 0; j < column ; ++j) {\r\n int temp_i = i;\r\n int temp_j = j;\r\n \r\n cellButtons[temp_i][temp_j] = new JButton();\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\empty circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n cellButtons[temp_i][temp_j].setIcon(imageIcon);\r\n cellButtons[temp_i][temp_j].setBackground(Color.orange);\r\n \r\n \r\n \r\n cellButtons[temp_i][temp_j].addActionListener(new ActionListener() \r\n {\r\n public void actionPerformed(ActionEvent e) //event handler\r\n {\r\n int computerEntryKey = 0;\r\n if(usable(temp_j) != 0){\r\n if(move%2 == 0){ //sıra user1 de ise seçilen columna oyna\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\blue circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n cellButtons[usable(temp_j)-1][temp_j].setIcon(imageIcon);\r\n cellButtons[usable(temp_j)-1][temp_j].setBackground(Color.orange);\r\n\r\n gameCells[usable(temp_j)-1][temp_j].setCell('X');\r\n ++move;\r\n if (end(cellButtons)) { //oyun sonlandıysa kazandı mesajını bas ve yeniden başlat\r\n if (check(cellButtons) == 1) {\r\n JOptionPane.showMessageDialog(null, \"User 1 Winner\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"The game ended in a draw!\");\r\n }\r\n computerEntryKey = 1;\r\n window.dispose();\r\n String[] arg = new String[10];\r\n arg[0] = \"\";\r\n main(arg);\r\n }\r\n }\r\n else if(move%2 == 1 && gameType == 1){ //oyun modu pvp ise ve sıra user2 iki de ise seçilen columna oyna\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\red circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n cellButtons[usable(temp_j)-1][temp_j].setIcon(imageIcon);\r\n cellButtons[usable(temp_j)-1][temp_j].setBackground(Color.orange);\r\n\r\n gameCells[usable(temp_j)-1][temp_j].setCell('O');\r\n ++move;\r\n if (end(cellButtons)) { //oyun sonlandıysa kazandı mesajını bas ve yeniden başlat\r\n if (check(cellButtons) == 2) {\r\n JOptionPane.showMessageDialog(null, \"User 2 Winner\");\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"The game ended in a draw!\");\r\n }\r\n\r\n window.dispose();\r\n String[] arg = new String[10];\r\n arg[0] = \"\";\r\n main(arg);\r\n }\r\n }\r\n if(move%2 == 1 && gameType == 2 && computerEntryKey == 0){//pvc modunda computerın sırası ise oynar\r\n ImageIcon imageIcon = new ImageIcon(new ImageIcon(\"src\\\\red circle.png\").getImage().getScaledInstance(500 / row, 500 / column, 1));\r\n int tmpcol = attack3();\r\n if(tmpcol<0)\r\n tmpcol = defence3();\r\n if(tmpcol < 0)\r\n tmpcol = attack1();\r\n if(tmpcol < 0)\r\n tmpcol = findEmptyColumn();\r\n \r\n int tmprow = usable(tmpcol)- 1;\r\n \r\n cellButtons[tmprow][tmpcol].setIcon(imageIcon);\r\n cellButtons[tmprow][tmpcol].setBackground(Color.orange);\r\n\r\n gameCells[tmprow][tmpcol].setCell('O');\r\n ++move;\r\n if (end(cellButtons)) {//oyun sonlandıysa kazandı mesajını bas ve yeniden başlat\r\n if (check(cellButtons) == 2) {\r\n JOptionPane.showMessageDialog(null, \"Computer Winner\");\r\n } \r\n else {\r\n JOptionPane.showMessageDialog(null, \"The game ended in a draw!\");\r\n }\r\n\r\n window.dispose();\r\n String[] arg = new String[10];\r\n arg[0] = \"\";\r\n main(arg);\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n //cell button 2d arrayini gridlayout olan board paneline ekler\r\n for (int i = 0; i < row; ++i) {\r\n for (int j = 0; j < column ; ++j) {\r\n board.add(cellButtons[i][j]);\r\n }\r\n }\r\n \r\n window.add(board);\r\n return window;\r\n }", "private void Select_New_PuzzleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Select_New_PuzzleActionPerformed\n // TODO add your handling code here:\n this.setVisible(false);\n CardLayout.show(parent, \"card6\");\n \n }", "@Override\r\n\t\tpublic void actionPerformed (ActionEvent e) {\n\t\t\tJButton c = (JButton) e.getSource();\r\n\t\t\tmakemove(c);\r\n\t\t\tgamestatus gs = getgamestatus();\r\n\t\t\tif (gs == gamestatus.incomplete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdeclarewinner(gs);\r\n\t\t\tint choice = JOptionPane.showConfirmDialog(this, \"Restart?\");\r\n\t\t\tif (choice == JOptionPane.YES_OPTION) {\r\n\t\t\t\tfor (int row = 0; row < board; row++) {\r\n\t\t\t\t\tfor (int col = 0; col < board; col++) {\r\n\t\t\t\t\t\tbuttons[row][col].setText(\"\");// to to blank after restart\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.crosscheck = true;\r\n\t\t\t} else {\r\n\t\t\t\tsuper.dispose(); // to close the game on no \r\n\t\t\t}\r\n\t\t}", "private static void gameGUI(){\n JFrame gameFrame = new JFrame(\"Tic-Tac-Toe\");\n JPanel gamePanel = new JPanel();\n\n Random rng = new Random();\n\n\n //Creates the player and computer objects and determines which of the two goes first\n Computer computer = new Computer(rng.nextBoolean());\n Player player = new Player();\n\n //Will close and exit the program if the x on the window is pressed\n gameFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\n Button buttons[][] = new Button[3][3];\n\n //Creates a virtual grid to keep track of the players moved where and adds all the buttons to the grid\n char[][] grid = new char[3][3];\n for(int i = 0; i <= 2; i++){\n for(int p = 0; p <= 2; p++){\n grid[i][p] = 'e';\n buttons[i][p] = new Button();\n gamePanel.add(buttons[i][p]);\n buttons[i][p].addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(computer.isMove){\n }\n }\n });\n }\n }\n\n gamePanel.setLayout(new GridLayout(3, 3));\n\n gameFrame.add(gamePanel);\n gameFrame.setSize(600,600);\n gameFrame.setVisible(true);\n\n if(computer.getFirstMove()){\n player.setFirstMove(false);\n }\n else {\n player.setFirstMove(true);\n }\n\n //Booleans for the game loops one tracks if the user wishes to quit after a completed game or to keep going\n boolean quit = false;\n\n //If not winner or if the players tied this will be changed to true and the user will be asked if they want to start a new game\n boolean winner = false;\n\n //Game loops\n while (!quit){\n while (!winner){\n boolean moveFinished = false;\n\n while (!moveFinished) {\n if (computer.isMove()) {\n int [] computerMove = computer.move(grid, rng);\n\n //Makes sure the move is legal\n if (legalMove(grid, computerMove)){\n updateButtons(grid, buttons);\n moveFinished = true;\n }\n }\n //Its the humans player\n else {\n\n }\n }\n }\n }\n }", "public void actionPerformed(ActionEvent ae)\n {\n Object choice = ae.getSource(); // gets source of button clicked on\n \n \n //if Exit was clicked, exit the program\n if(choice.equals(jmiExit))\n {\n System.exit(0);\n }\n \n //If start game was clicked, load the pieces\n if(choice.equals(jmiStart))\n {\n load();\n jmiStart.setEnabled(false);\n jmiRestart.setEnabled(true);\n }\n \n //If restart game was clicked, restart the pieces\n if(choice.equals(jmiRestart))\n {\n restart();\n jmiStart.setEnabled(false);\n }\n \n \n //If about was clicked, display info about the game\n if(choice.equals(jmiAbout))\n {\n JOptionPane.showMessageDialog(null,\"121 MiniPrject: Chess\" +\n \"\\nFebruary 19, 2014\" + \"\\nDeveloped By Hassan Ndow & Kevin Whetstone\", \"Breakthrough\", JOptionPane.INFORMATION_MESSAGE);\n }\n \n //If Rules was clicked, display the rules of the game\n if(choice.equals(jmiRule))\n {\n JOptionPane.showMessageDialog(null,\"1. Random player gets first turn.\\n\" +\n \"2. A piece may move one space forward, directly or \\ndiagonally, into an empty space. Pieces may not \\nmove backward.\\n\"+\n \"3. A piece may capture an opposing piece, removing it \\nfrom the board, by moving diagonally forward into \\nthe space it occupies. You may not move a piece \\ndirectly forward into a space occupied by your \\nown piece.\\n\"+\n \"4. The game ends when a player moves a piece to the \\nrow on the opposite edge of the board. The player to \\naccomplish that first wins.\"\n \t\t,\"Rules\",JOptionPane.INFORMATION_MESSAGE);\n }\n \n \n \n try\n {\n if(gameSet == false)\n {\n //Pieces Moves -- loops through each [row][column]\n outerLoop:\n for (int rows = 0; rows < gridUnits.length; rows++)\n {\n \n for(int cols = 0; cols < gridUnits.length; cols++)\n {\n //player 1's move\n if(turn == false)\n {\n \n //saves location of black piece clicked on\n if(choice == gridUnits[rows][cols] && (gridUnits[rows][cols].getIcon().equals(black)))\n {\n x = rows;\n x3 = rows;\n y = cols;\n \n }\n \n //moves black piece horizontally\n if(choice == gridUnits[x][y+1] && (gridUnits[x][y].getIcon().equals(black)) && \n (gridUnits[x][y+1].getIcon().equals(blank)))\n {\n //sets its previous location to blank, its new location to black, checks if player has won\n //alternates turn by setting turn to true\n //if game is won displays message\n //breaks out of loop\n \n gridUnits[x][y].setIcon(blank);\n gridUnits[x][y+1].setIcon(black);\n player1Wins(y);\n turn = true;\n if(gameSet == false)\n {\n player.setText(\"<html>\"+\"<strong><font color='blue'>Player 2's turn!</font></strong> | \" \n + \"<font color='green'>\" + blackCount + \"</font>\" + \" black pieces taken.\" + \"</html>\");\n }\n break outerLoop; \n }\n \n //moves black piece diagonally(right + up) as long as it doesn't go past its bounds\n if(x3 > 0)\n {\n if(choice == gridUnits[x3-1][y+1] && (gridUnits[x][y].getIcon().equals(black)) && \n ((gridUnits[x3-1][y+1].getIcon().equals(blank)) || (gridUnits[x3-1][y+1].getIcon().equals(white))))\n {\n //sets its previous location to blank, its new location to black, checks if player has won\n //counts white pieces that it has taken\n //alternates turn by setting turn to true\n //if game is won displays message\n //breaks out of loop\n \n gridUnits[x][y].setIcon(blank);\n \n if(gridUnits[x3-1][y+1].getIcon().equals(white))\n {\n whiteCount++;\n }\n gridUnits[x3-1][y+1].setIcon(black);\n player1Wins(y);\n turn = true;\n if(gameSet == false)\n {\n player.setText(\"<html>\"+\"<strong><font color='blue'>Player 2's turn!</font></strong> | \" \n + \"<font color='green'>\" + blackCount + \"</font>\" + \" black pieces taken.\" + \"</html>\");\n }\n break outerLoop; \n }\n }\n \n \n //moves x piece diagonally(right + down) as long as it doesn't go past its bounds\n if(x<7)\n {\n if(choice == gridUnits[x+1][y+1] && (gridUnits[x][y].getIcon().equals(black)) && \n ((gridUnits[x+1][y+1].getIcon().equals(blank)) || (gridUnits[x+1][y+1].getIcon().equals(white))))\n {\n //sets its previous location to blank, its new location to black, checks if player has won\n //counts white pieces that it has taken\n //alternates turn by setting turn to true\n //if game is won displays message\n //breaks out of loop\n \n gridUnits[x][y].setIcon(blank);\n \n if(gridUnits[x+1][y+1].getIcon().equals(white))\n {\n whiteCount++;\n }\n \n gridUnits[x+1][y+1].setIcon(black);\n player1Wins(y);\n turn = true;\n if(gameSet == false)\n {\n player.setText(\"<html>\"+\"<strong><font color='blue'>Player 2's turn!</font></strong> | \" \n + \"<font color='green'>\" + blackCount + \"</font>\" + \" black pieces taken.\" + \"</html>\");\n }\n break outerLoop; \n }\n }\n \n } // end of if(turn == false)\n \n \n \n if(turn == true)\n {\n \n //save location of O piece clicked on\n if(choice == gridUnits[rows][cols] && (gridUnits[rows][cols].getIcon().equals(white)))\n {\n x2 = rows;\n x4 = rows;\n y2 = cols;\n \n }\n \n //moves o piece horizontally\n if(choice == gridUnits[x2][y2-1] && (gridUnits[x2][y2].getIcon().equals(white)) && \n (gridUnits[x2][y2-1].getIcon().equals(blank)))\n {\n \n //sets its previous location to blank, its new location to white, checks if player has won\n //alternates turn by setting turn to false\n //if game is won displays message\n //breaks out of loop\n \n gridUnits[x2][y2].setIcon(blank);\n gridUnits[x2][y2-1].setIcon(white);\n player2Wins(y2);\n turn = false;\n \n if(gameSet == false)\n {\n player.setText(\"<html>\"+\"<strong><font color='red'>Player 1's turn!</font></strong> | \" \n + \"<font color='green'>\" + whiteCount + \"</font>\" + \" white pieces taken.\" + \"</html>\");\n }\n break outerLoop;\n \n }\n \n //moves O piece diagonally(right + up) as long as it hasn't gone past its bounds\n if(x4 > 0)\n {\n if(choice == gridUnits[x4-1][y2-1] && (gridUnits[x2][y2].getIcon().equals(white)) && \n ((gridUnits[x4-1][y2-1].getIcon().equals(blank)) || (gridUnits[x4-1][y2-1].getIcon().equals(black))))\n {\n \n //sets its previous location to blank, its new location to white, checks if player has won\n //counts black pieces that it has taken\n //alternates turn by setting turn to false\n //if game is won displays message\n //breaks out of loop\n \n gridUnits[x2][y2].setIcon(blank);\n \n if(gridUnits[x4-1][y2-1].getIcon().equals(black))\n {\n blackCount++;\n }\n \n gridUnits[x4 - 1][y2-1].setIcon(white);\n player2Wins(y2);\n turn = false;\n if(gameSet == false)\n {\n player.setText(\"<html>\"+\"<strong><font color='red'>Player 1's turn!</font></strong> | \" \n + \"<font color='green'>\" + whiteCount + \"</font>\" + \" white pieces taken.\" + \"</html>\");\n }\n \n break outerLoop;\n \n }\n }\n \n //moves O piece diagonally(right + down) as long as it hasn't gone past its bounds\n if(x2 < 7)\n {\n if(choice == gridUnits[x2+1][y2-1] && (gridUnits[x2][y2].getIcon().equals(white)) && \n ((gridUnits[x2+1][y2-1].getIcon().equals(blank)) || (gridUnits[x2+1][y2-1].getIcon().equals(black))))\n {\n \n //sets its previous location to blank, its new location to white, checks if player has won\n //counts black pieces that it has taken\n //alternates turn by setting turn to false\n //if game is won displays message\n //breaks out of loop\n \n gridUnits[x2][y2].setIcon(blank);\n \n if(gridUnits[x2+1][y2-1].getIcon().equals(black))\n {\n blackCount++;\n }\n \n gridUnits[x2+1][y2-1].setIcon(white);\n player2Wins(y2);\n turn = false;\n if(gameSet == false)\n {\n player.setText(\"<html>\"+\"<strong><font color='red'>Player 1's turn!</font></strong> | \" \n + \"<font color='green'>\" + whiteCount + \"</font>\" + \" white pieces taken.\" + \"</html>\");\n }\n break outerLoop;\n \n }\n }\n \n } // end of if(turn == false)\n \n } // end of inner loop\n \n }//end of outer for loop \n \n } // end of gameSet if statement \n \n } // end of try block\n \n //catch any exceptions\n catch(NullPointerException npe)\n {\n npe.printStackTrace();\n }\n catch(ArrayIndexOutOfBoundsException aio)\n {\n aio.printStackTrace();\n }\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n switch (state) {\n case SOLVED:\n this.inputNumbers = new int[GRID_SIZE][GRID_SIZE];\n userInput();\n break;\n case INPUT:\n if (e.getSource() == this.submitButton) this.solvePuzzle();\n break;\n case ERROR:\n JOptionPane.showMessageDialog(this.frame, \"ERROR (button)\"); // TODO\n break;\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == btRetry) {\n\t\t\tarrClear();\n\t\t\tarrStones.clear();\n\t\t\tcvBoard.repaint();\n\t\t\ttaLog.append(\"=======Clear=======\\n\");\n\t\t\tisPlaying = true;\n\t\t}\n\t\telse if (e.getSource() == btUndo) {\n\t\t\t//Back\n\t\t\tint t = (n+isWhiteWin)%2; \n\t\t\tif (n>isWhiteWin) {\n\t\t\t\tn--;\n\t\t\t\ttaLog.append(\" Undo. \" + (( t==0 )? \"W\":\"B\") + \" : (\" +\n\t\t\t\t\t\tInteger.toString(arrStones.get(arrStones.size()-1).x -nWALL) + \", \" +\n\t\t\t\t\t\tInteger.toString(arrStones.get(arrStones.size()-1).y -nWALL) + \")\\n\");\n\t\t\t\t\n\t\t\t\tarr[arrStones.get(arrStones.size() -1).x][arrStones.get(arrStones.size() -1).y] = NONE;\n\t\t\t\tarrStones.remove(arrStones.size() - 1);\n\t\t\t\tcvBoard.repaint();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//err msg\n\t\t\t}\n\t\t}\n\t\telse if (e.getSource() == btSetColor) {\n\t\t\tdColor.setVisible(true);\n\t\t}\n\t\telse if (e.getSource() == btYes) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t\telse if (e.getSource() == btNo) {\n\t\t\tdExit.setVisible(false);\n\t\t}\n\t}", "void initComponents() {\r\n\t\tsetBounds(0, 0, 670, 500);\r\n\t\tsetResizable(true);\r\n\t\tsetTitle(\"TicTacToe\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\t\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\t// here EXIT_ON_CLOSE is used\r\n\t\r\n\t\tJPanel xoPanel = new JPanel();\r\n\t\txoPanel.setLayout(new GridLayout(3, 3));\r\n\t\t\r\n\t\tbuttonFont = new Font(\"Tahoma\", Font.PLAIN, 33);\r\n\t\ttextFont = new Font(\"Tahoma\", Font.PLAIN, 18);\r\n\t\t\r\n\t\tblock00 = new JButton(\"[]\");\r\n\t\tblock00.setFont(buttonFont);\r\n\t\tblock00.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock00.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"1\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock00.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block00);\r\n\t\t\r\n\t\tblock01 = new JButton(\"[]\");\r\n\t\tblock01.setFont(buttonFont);\r\n\t\tblock01.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock01.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"2\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock01.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block01);\r\n\t\t\r\n\t\tblock02 = new JButton(\"[]\");\r\n\t\tblock02.setFont(buttonFont);\r\n\t\tblock02.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock02.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"3\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock02.setEnabled(false);\r\n\t\t\t\t\ttextArea.append(myMark+\"\\n\");\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block02);\r\n\t\t\r\n\t\tblock10 = new JButton(\"[]\");\r\n\t\tblock10.setFont(buttonFont);\r\n\t\tblock10.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock10.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"4\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock10.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block10);\r\n\t\t\r\n\t\tblock11 = new JButton(\"[]\");\r\n\t\tblock11.setFont(buttonFont);\r\n\t\tblock11.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock11.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"5\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock11.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block11);\r\n\t\t\r\n\t\tblock12 = new JButton(\"[]\");\r\n\t\tblock12.setFont(buttonFont);\r\n\t\tblock12.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock12.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"6\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock12.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block12);\r\n\t\t\r\n\t\tblock20 = new JButton(\"[]\");\r\n\t\tblock20.setFont(buttonFont);\r\n\t\tblock20.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock20.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"7\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock20.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block20);\r\n\t\t\r\n\t\tblock21 = new JButton(\"[]\");\r\n\t\tblock21.setFont(buttonFont);\r\n\t\tblock21.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock21.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"8\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock21.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block21);\r\n\t\t\r\n\t\tblock22 = new JButton(\"[]\");\r\n\t\tblock22.setFont(buttonFont);\r\n\t\tblock22.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t{\r\n\t\t\t\tif(signal)\r\n\t\t\t\t{\r\n\t\t\t\t\tblock22.setText(myMark); // set X or O button text\r\n\t\t\t\t\tsend(myMark + \"9\");\r\n\t\t\t\t\tsend(\"true\");\r\n\t\t\t\t\tsignal = false;\r\n\t\t\t\t\tblock22.setEnabled(false);\r\n\t\t\t\t\t++noOfMoves;\r\n\t\t\t\t\tisWinner();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\txoPanel.add(block22);\r\n\t\t\t\t\r\n\t\t//switchButtonState(false); \t// set all buttons on false till we wait for client to join\r\n\t\tadd(xoPanel, BorderLayout.CENTER);\r\n\t\t\r\n\t\t// --- EAST PANEL ---\r\n\t\tJPanel pEast = new JPanel();\r\n\t\tpEast.setLayout(new BorderLayout());\r\n\t\tpEast.setPreferredSize(new Dimension(300, 300));\r\n\t\t\r\n\t\ttextArea = new JTextArea();\r\n\t\ttextArea.setLineWrap(true);\r\n\t\ttextArea.setEditable(false);\r\n\t\ttextArea.setFont(textFont);\r\n\t\ttextArea.append(\"\"); \r\n\t\tsp = new JScrollPane(textArea); \r\n\t\tsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\r\n\t\t\r\n\t\tpEast.add(sp, BorderLayout.CENTER);\r\n\t\tadd(pEast, BorderLayout.EAST);\r\n\t\t\r\n\t\tcreateButton = new JButton();\r\n\t\tcreateButton.setText(\"Create\");\r\n\t\tcreateButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n createButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n createButtonActionPerformed(evt);\r\n }\r\n });\r\n \r\n joinButton = new JButton();\r\n joinButton.setText(\"Join\");\r\n joinButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n joinButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n \ttry\t{ \t\r\n \t\t\tsocket = new Socket(\"localhost\", PORT); \r\n \t\t\t\r\n \t\t\toOutStream = new ObjectOutputStream(socket.getOutputStream());\r\n \t\t\toOutStream.flush();\r\n \t\t\toInStream = new ObjectInputStream(socket.getInputStream());\r\n \t\t\t\r\n \t\t\ttwoWayData = (String) oInStream.readObject();\r\n \t\t\ttextArea.append(twoWayData + \"\\n\");\r\n \t\t\tscrollToBottom(); \t\t\t\r\n \t\t\t\r\n \t\t\tsignal = false;\r\n \t\t\t\t\r\n \t\t\ttwoWayData = (String) oInStream.readObject(); // get nick from host\r\n \t\t\tmyMark = twoWayData;\r\n \t\t\t\r\n \t\t\ttextArea.append(\"My mark: \"+myMark+\"\\n\");\r\n \t\t\ttextArea.append(\"Waiting for other player to play\\n\");\r\n \t\r\n \t\t\tscrollToBottom();\r\n \t\t\t\r\n \t\t\tjoinButton.setEnabled(false);\r\n \t\t\tcreateButton.setEnabled(false);\r\n \t\t\t \t\t\t\r\n \t\t\tnew Recieve(\"twoWayDataOfServer\"); // thread for receive data from host\t\t\r\n \t\t}\r\n \t\tcatch(Exception e)\t{\r\n \t\t\tturnOffStream();\r\n \t\t\t//restart();\r\n \t\t\ttry { JOptionPane.showMessageDialog(null, \"JoinButton: Error: Server is offline: \\n\" + e); } catch (ExceptionInInitializerError exc) { }\r\n \t\t}\t\r\n }\r\n });\r\n \r\n\t\tbtnNewGame = new JButton();\r\n\t\tbtnNewGame.setText(\"New Game\");\r\n\t\tbtnNewGame.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tbtnNewGame.addActionListener(new ActionListener(){\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tsend(\"RESET\");\r\n\t\t\t\tswitchButtonState(true);\r\n\t\t\t\tclear();\r\n\t\t\t}\r\n\t\t});\t\r\n\t\t\t\t\r\n\t\tJPanel pNorth = new JPanel();\r\n\t\tpNorth.add(btnNewGame);\r\n\t\tpNorth.add(createButton);\r\n\t\tpNorth.add(joinButton);\r\n\t\tadd(pNorth, BorderLayout.NORTH);\r\n\t\t\r\n\t\t// --- WINDOW LISTENER ---\r\n\t\taddWindowListener(new WindowAdapter() {\r\n\t\t\tpublic void windowClosing(WindowEvent event) {\r\n\t\t\t\tif(socket != null) {\r\n\t\t\t\t\tsend(\"Going offline!\");\r\n\t\t\t\t}\r\n\t\t\t\tturnOffStream();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n lblMove.setText(\"Jumlah Gerakan: \" + puzzlePanel.getMoveCount());\n if (puzzlePanel.getPuzzleModel().isSolved()) {\n puzzlePanel.showCompletePuzzle();\n isWin = true;\n int choice = JOptionPane.showConfirmDialog(null, \"Kamu menang! main lagi?\", \"Selamat!\",\n JOptionPane.YES_NO_OPTION);\n if (choice == JOptionPane.YES_OPTION) {\n initPanel();\n }\n }\n\n }", "@Override\n public void gameWindow() {\n gameBoard = guiGame.getPanel();\n boardArea = guiGame.getBoardArea();\n inputArea = guiGame.getInputArea();\n JButton sendMessageButton = guiGame.getSendButton();\n JButton skipTurnButton = guiGame.getSkipTurnButton();\n JButton swapPiece = guiGame.getSwapPieceButton();\n messagesArea = guiGame.getMessagesArea();\n JButton forfeitButton = guiGame.getForfeitButton();\n JLabel usernameLabel = guiGame.getUsernameLabel();\n usernameLabel.setText(username);\n JButton movePieceButton = guiGame.getMovePieceButton();\n JButton leaveButton = guiGame.getLeaveButton();\n JButton hintButton = guiGame.getHintButton();\n\n boardArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n boardArea.setEditable(false);\n\n messagesArea.setEditable(false);\n inventoryArea.setEditable(false);\n\n forfeitButton.addActionListener(e -> {\n connectedServer.writeMessage(client.leave());\n frame.setContentPane(gameList);\n });\n\n JPanel piecePanel = new JPanel();\n piecePanel.add(new JLabel(\"Piece number:\"));\n JTextField pieceNumber = new JTextField(1);\n piecePanel.add(pieceNumber);\n piecePanel.add(Box.createHorizontalStrut(15));\n piecePanel.add(new JLabel(\"Index on board:\"));\n JTextField indexOnBoard = new JTextField(2);\n piecePanel.add(indexOnBoard);\n piecePanel.add(Box.createHorizontalStrut(15));\n piecePanel.add(new JLabel(\"Rotation 1 or 2 (0 for default)\"));\n JTextField rotationField = new JTextField(1);\n rotationField.setText(\"0\");\n piecePanel.add(rotationField);\n\n\n\n movePieceButton.addActionListener(e -> {\n int result = JOptionPane.showConfirmDialog(frame, piecePanel, \"Move piece\", JOptionPane.OK_CANCEL_OPTION);\n if(result == JOptionPane.OK_OPTION) {\n int pieceNum = Integer.parseInt(pieceNumber.getText());\n int i = Integer.parseInt(indexOnBoard.getText());\n int rotation = Integer.parseInt(rotationField.getText());\n if(!Board.isLegal(i)) {\n JOptionPane.showMessageDialog(frame, \"Invalid board index\", \"Ilegal board index\", JOptionPane.ERROR_MESSAGE);\n } else if(pieceNum > client.getGame().getPlayer(username).getInventory().size()) {\n JOptionPane.showMessageDialog(frame, \"Invalid piece number\", \"Ilegal piece\", JOptionPane.ERROR_MESSAGE);\n } else {\n Tile t = client.getGame().getPlayer(username).getInventory().get(pieceNum - 1);\n t.rotate(rotation);\n connectedServer.writeMessage(client.move(t, i));\n }\n }\n });\n\n skipTurnButton.addActionListener(e -> {\n connectedServer.writeMessage(client.skip());\n });\n\n hintButton.addActionListener(e -> {\n giveHint(client.getHint());\n });\n\n swapPiece.addActionListener(e -> {\n String[] options = {\"1\", \"2\", \"3\", \"4\", \"5\", \"6\"};\n String result = (String) JOptionPane.showInputDialog(frame, \"Piece number:\", \"Swap piece\", JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\n int resultInt = Integer.parseInt(result);\n if(resultInt > client.getGame().getPlayer(username).getInventory().size()) {\n JOptionPane.showMessageDialog(frame, \"Invalid piece number\", \"Ilegal piece\", JOptionPane.ERROR_MESSAGE);\n } else {\n connectedServer.writeMessage(client.swap(client.getGame().getPlayer(username).getInventory().get(resultInt)));\n }\n });\n\n sendMessageButton.addActionListener(e -> {\n executeCommand();\n });\n\n leaveButton.addActionListener(e -> {\n forfeit();\n });\n\n //an action for when someone presses enter in the inputArea\n Action pressedEnter = new AbstractAction() {\n public void actionPerformed(ActionEvent e) {\n executeCommand();\n }\n };\n\n inputArea.getInputMap().put(KeyStroke.getKeyStroke(\"ENTER\"),\n pressedEnter);\n\n frame.setContentPane(gameBoard);\n frame.revalidate();\n\n forfeitButton.addActionListener(e -> {\n forfeit();\n });\n\n client.setGame(connectedGamePlayerCount);\n client.getGame().addPlayer(client.getPlayer());\n\n tui = new TUI();\n messagesArea.append(tui.HELP);\n\n boardArea.append(tui.getBoard());\n }", "public void actionPerformed(ActionEvent event) { //action performed method (goes here when a button is pressed); most of the logic goes inside here because the buttons dictate the flow of execution\r\n String command = event.getActionCommand(); //storing the text of the button into a string variable\r\n \r\n if(command.equals(\"OK\")){\r\n name1 = input.getText(); //getting the name and storing it when the first button, OK, is pressed\r\n welcome.remove(okButton);\r\n welcome.remove(welcomelabel); //removing unecessary labels\r\n \r\n instructions.setText((\"<html> Hi \" + \"</br>\"+name1 + \", which mode would you like to play? </html>\")); //changing the text of the label\r\n \r\n welcome.add(pvp);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75))); //adding the 2 buttons and formatting them \r\n pvp.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n \r\n welcome.add(pvai); \r\n pvai.setAlignmentX(Component.CENTER_ALIGNMENT); \r\n }\r\n \r\n if(command.equals(\"Player vs Player\")){ //if pvp button was clicked\r\n instructions.setText(\"<html> You chose Player vs Player! \" +\"</br>\"+ name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode =1;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); //removing the buttons from the screen and updating the user interface\r\n welcome.updateUI(); \r\n addColor();\r\n }\r\n \r\n else if(command.equals(\"Player vs AI\")){ //if pvai button was clicked\r\n instructions.setText(\"<html> You chose Player vs AI! \" + \"</br>\"+name1 + \", which colour would you like your checker to be? </html>\"); \r\n mode = 2;\r\n welcome.remove(pvp);\r\n welcome.remove(pvai); \r\n welcome.updateUI();\r\n addColor(); //calling the method which puts the color options on to the screen\r\n }\r\n \r\n \r\n //========================================================PVP BUTTONS==========================================================================\r\n //===================================================================================================================================\r\n if(command.equals(\" 1\")){ //the extra spaces are because of the formatting of the columnnumbers\r\n columnnumber=1;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 2\")){\r\n columnnumber=2;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 3\")){\r\n columnnumber=3;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 4\")){ //depending on which button they press, change the columnnumber. Then send it to the if statement that runs when command = entered\r\n columnnumber=4;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 5\")){\r\n columnnumber=5;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 6\")){\r\n columnnumber=6;\r\n command = \"Enter\";\r\n }\r\n if(command.equals(\" 7\")){\r\n columnnumber=7;\r\n command = \"Enter\";\r\n }\r\n \r\n \r\n //======================================when player 1 makes their choice of the pvp mode ==================================================================\r\n if(command.equals(\"Black\")&&choice == 1 &&mode ==1){ // determining which button was pressed and which player pressed it\r\n instructions.setText(\"Great choice! Now, what is Player 2's name?\"); \r\n color1 = Color.black; //for player 1\r\n removeColor();\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //centering the component \r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 1 &&mode ==1){ //if the colour was pressed by the first player\r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.red;\r\n removeColor(); //removing the other colors from screen //red\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\"); //clearing the text field\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\");\r\n color1 = Color.yellow;\r\n removeColor(); //yellow\r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 1 &&mode ==1){ \r\n instructions.setText(\"Great choice! Player 2, what is your name?\"); //greem\r\n color1 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n welcome.add(okayButton);\r\n input.setText(\"\");\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n }\r\n \r\n //======================================================================================================================================================\r\n //2nd users info in pvp mode\r\n \r\n if(command.equals(\"Okay\")){ //if they press okay --> asks for the 2nd users info\r\n name2 = input.getText();\r\n instructions.setText(\"<html>Hello \" + \"</br>\" +name2 + \", choose a colour for your checker. </html>\"); //move on to the 2nd player options\r\n welcome.remove(input); //^^using html to print out new lines if someone's name is too long\r\n welcome.updateUI();\r\n \r\n welcome.add(black);\r\n black.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n black.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(red);\r\n red.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n red.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n //readding all the color buttons again\r\n welcome.add(yellow);\r\n yellow.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n yellow.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n welcome.add(green);\r\n green.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n green.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\r\n \r\n choice = 2; //showing that it is the 2nd user's turn now\r\n \r\n if(color1==Color.black){\r\n welcome.remove(okayButton);\r\n welcome.remove(black);\r\n }\r\n if(color1==Color.red){\r\n welcome.remove(okayButton);\r\n welcome.remove(red); //depending on which colour was chosen by the first player, take it out of the options for the 2nd player\r\n }\r\n if(color1==Color.yellow){\r\n welcome.remove(okayButton);\r\n welcome.remove(yellow);\r\n }\r\n if(color1==Color.green){\r\n welcome.remove(okayButton);\r\n welcome.remove(green);\r\n }\r\n } \r\n \r\n if(command.equals(\"Black\")&&choice == 2&&mode==1){ //once player 2 picks their colour\r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.black;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Red\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.red;\r\n removeColor(); //removing the unneccessary colour buttons\r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(\"Yellow\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.yellow;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n goesFirst(); //method that determines who goes first\r\n }\r\n \r\n if(command.equals(\"Green\")&&choice == 2&&mode==1){ \r\n instructions.setText(\"Interesting choice! Let's begin the game!\");\r\n color2 = Color.green;\r\n removeColor(); \r\n welcome.updateUI();\r\n okayButton.setAlignmentX(Component.CENTER_ALIGNMENT); //aligning the buttons\r\n goesFirst(); \r\n }\r\n \r\n if(command.equals(name1)&&mode==1){ //if p1 goes first\r\n PVP(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==1){ //if p2 goes first\r\n PVP(name2); //sending to PVP method which allows user to start game\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==1){\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVP(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVP(name2);\r\n }\r\n }\r\n \r\n \r\n //logic of the connect 4 game goes here --> when they press enter==============================================================---------============================\r\n //when they click a button\r\n if(command.equals(\"Enter\")&&whoseTurn==1&&canGo==true){ //WHEN PLAYER 1 GOES\r\n \r\n if(validInput(columnnumber)){\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //sending the columnnumber picked to the changeBoard method, which changes the colour of things on the screen\r\n input.setText(\"\");\r\n whoseTurn=2;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n \r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color1)){ //if they win the game; this is checked by sending the current state of the board to the hasCheckingCondition\r\n userWins++; //incrementing UserWin counter\r\n whoseTurn = 0; //make it no one's turn now because the game is over\r\n GameWon = true; //making it so that no one can go anymore because the game is over\r\n canGo = false;\r\n playSound(); //plays a winning tune if the user ever wins\r\n repeatGui(name1); //this method gives the user the option to restart the game\r\n }\r\n \r\n else{ //if player 1 has not won the game\r\n \r\n if(fullBoard()){ //if the board is full\r\n repeatGui(name1); //if they draw the game, ask if they want to repeat the GUI\r\n \r\n }\r\n else{\r\n if(!name2.equals(\"AI.BOT\")){ //else, then it is player 2's turn. If it isnt the ai, then outprint the below\r\n instructions.setText(\"<html>\"+name2 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n if(mode==2){\r\n whoseTurn=AINumber; //if the mode is 2 that means they chose, PvAI, so we make whoseTurn to AINumber, which is 3 or 4 depending on hard or easy mode\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column number.\"); //if that column is full, they must reclick another valid column\r\n }\r\n }\r\n \r\n else if(command.equals(\"Enter\")&&whoseTurn ==2&&canGo==true){ //WHEN PLAYER 2 GOES\r\n \r\n if(validInput(columnnumber)){ //same if statements as above, just that player 2 is now playing\r\n erase = 0;\r\n changeBoard(columnnumber, whoseTurn, color1, color2); //calling the changeBoard method which changes the coour of the index based on the user and his pick\r\n input.setText(\"\");\r\n whoseTurn=1; //this will make this section and the above 'if' section alternate\r\n numTurns++; //accumulating the total amount of turns\r\n \r\n if(hasCheckingCondition(4, color2)){\r\n GameWon = true;\r\n canGo = false;\r\n whoseTurn = 0;\r\n playSound();\r\n repeatGui(name2); //repeating the GUI\r\n }\r\n else{\r\n \r\n if(fullBoard()){ //look at comments above for reference\r\n repeatGui(name2);\r\n }\r\n \r\n else{\r\n instructions.setText(\"<html>\"+name1 + \"<html>'s turn. <br><br> Please click the column number you wish to place your checker in. </html>\");\r\n }\r\n }\r\n }\r\n else{\r\n instructions.setText(\"Please click a valid column.\");\r\n }\r\n }\r\n \r\n //for the easy ai======================================================================================\r\n if(whoseTurn == 3 && command.equals(\"Enter\") &&GameWon == false){ //WHEN THE EASY AI GOES\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n for(int i = 1; i<=7; i++){\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //giving user option to play again if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true; //a tracker of if the AI has played or not\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\"); //send this to the method saying that the AI won the game. The method will then ask the user if they would like to play again\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2); //this method can either add or erase checkers; in this case, erase\r\n erase = 0;\r\n \r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result of the game is a tie, break and send it to the repeatGUI method\r\n break;\r\n }\r\n \r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //if the opponent(user) can win\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){\r\n erase = 0; //resetting this variable (*IMPORTANT*)\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //change back the checker \r\n erase = 0;\r\n changeBoard(i, 3, color1, color2); //put a checker of the AI's colour to block it\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n erase = 0; //must keep resetting this or else the changeBoard method will think it has to erase the checker instead of placing it\r\n \r\n if(AIPlayed == false){\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n while(validInput(randomnum)==false){ //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n randomnum = (int)(r.nextInt(7)+1);\r\n }\r\n \r\n changeBoard(randomnum, AINumber, color1, color2); //using a randomnum as long as it is a valid column\r\n numTurns++;\r\n whoseTurn = 1;\r\n \r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n \r\n }\r\n }//end of easy ai========================================================\r\n \r\n \r\n //=========================//FOR THE HARD AI============================//\r\n \r\n if(whoseTurn == 4 &&command.equals(\"Enter\")&&GameWon==false){ //start of Hard AI\r\n //need to check the same things as the EasyAI at first - if the AI can win or if the USER can win\r\n \r\n instructions.setText(\"<html>Please click the column number\"+\"</br>\"+\" you wish to place your checker in. </html>\"); //using html once again\r\n \r\n AIPlayed = false; //boolean that keeps track of if the AI has made a move or not\r\n canPlace = true; //boolean that keeps track if the AI should place a checker there\r\n \r\n for(int a = 0; a<7; a++){\r\n shouldNotPlace[a]=-1; //resetting the array each time so that it can accumulate the moves properly\r\n }\r\n \r\n //CHECKING TO SEE IF THE AI CAN WIN====================================\r\n for(int i = 1; i<=7; i++){\r\n if(fullBoard()){\r\n repeatGui(\"\"); //if the result is a draw\r\n break;\r\n }\r\n \r\n if(validInput(i)){\r\n changeBoard(i, AINumber, color1, color2); //put a checker in every possible column\r\n if(hasCheckingCondition(4, color2)){ //then check if any of those checker can win the game\r\n GameWon = true;\r\n AIPlayed = true;\r\n whoseTurn = 0;\r\n canGo = false;\r\n repeatGui(\"AI\");\r\n playSound();\r\n break;\r\n }\r\n else if(hasCheckingCondition(4, color2)==false){ //if it cant win the game\r\n erase = i; //changing all the checkers placed back to white\r\n changeBoard(erase, AINumber, color1, color2);\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n \r\n //CHECKING IF THE USER CAN WIN THE GAME, IF SO THEN BLOCK\r\n if(AIPlayed ==false){ //if the AI still hasnt made a move\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //this must be a valid column to hypothetically place a checker in\r\n erase = 0;\r\n changeBoard(i, 1, color1, color2); //place a checker of the opponents colour in every slot\r\n if(hasCheckingCondition(4, color1)){ //if the opponent can win, then place a checker of the AI's colour to block it\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the checker just placed that was used to see if black could win\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2);//changing the colour of it to magenta to block the opponent\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n break;\r\n }\r\n \r\n else if(hasCheckingCondition(4, color1)==false){ //changing the colors back to what it was before\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //removing the checker placed at the beginning to its original game state\r\n erase = 0;\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n \r\n \r\n //CHECKING IF THE USER CAN GET A DOUBLE TRAP ON THE BOTTOM ROW (hard coding it just for the bottom row)=============\r\n \r\n if(AIPlayed == false&&trapBlocked == false){ //only needs to run once\r\n if(arrayCircles[5][3].getColor()==color1){ //if they have a checker in the middle column\r\n if(arrayCircles[5][4].getColor()==color1){ //checker to the right\r\n if(arrayCircles[5][2].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(3, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n if(arrayCircles[5][2].getColor()==color1){ //checker to the left\r\n if(arrayCircles[5][4].getColor()==Color.white){\r\n erase = 0;\r\n changeBoard(5, AINumber, color1, color2); //changing the colour of it to magenta to block the opponent from a double on the bottom\r\n AIPlayed = true;\r\n numTurns++;\r\n whoseTurn = 1; //giving the turn back to the user and breaking out of the loop once it has blocked the user\r\n trapBlocked = true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n //CHECKING WHICH MOVES THE AI SHOULD NOT PLACE THAT WOULD LEAD TO AN IMMEDIATE WIN FOR THE USER============================\r\n \r\n if(AIPlayed==false){\r\n counter = 0;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)){ //making sure that column is valid\r\n erase = 0;\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)){\r\n erase = 0;\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){ \r\n shouldNotPlace[counter]=i; //if so, store it in the array so the AI knows to not place it there ever in the future\r\n counter++;\r\n }\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing previous moves\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing previous moves\r\n }\r\n }\r\n }\r\n \r\n //SETTING UP THE DOUBLE TRAP\r\n if(AIPlayed==false){ //this checks if the AI can make a move to double trap the user\r\n //looks ahead to the future state of the game and determines which column is best to win\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, AINumber, color1, color2); //simulating every possible move of the AI\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another AI move\r\n changeBoard(j, AINumber, color1, color2); //then seeing if the AI can win after any one of those moves\r\n if(hasCheckingCondition(4, color2)==true){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the magenta one for the black one\r\n erase=0;\r\n changeBoard(j, 1, color1, color2); //placing a black checker here for the future game board possibilities after this move\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, AINumber, color1, color2); //adding a move\r\n if(hasCheckingCondition(4, color2)==true){//that means they can get a double win because the user blocked one win, but the AI can still make another\r\n mustPlace = i; //the move that can win the game by setting up a double win for the AI\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, AINumber, color1, color2); //subtracting the checkers\r\n }\r\n }\r\n erase = j; //erasing if the USER placed something\r\n changeBoard(erase, 1, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, AINumber, color1, color2); //erasing the moves just placed by the AI\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2); //placing the move\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n //BLOCKING A DOUBLE TRAP\r\n //it works by considering all opssible moves the opponent can make; then, it will again simulate moves that the user can make (2 moves in a row for the user)\r\n //then, if the user can win within two moves, block its second move by replacing the 2nd move with a magenta colour; now, simulate all possible moves of black\r\n //again, and see if the user can win. If so, then that means the user has a double trap potential depending on the AI's move THIS turn\r\n //at the end of this part of code, the AI should block the user from initially making the connect 4, blocking the double\r\n \r\n if(AIPlayed==false){ //this blocks the opponent from forcing the AI into making a move; essentially stops the double win before it happens\r\n //looks ahead to the future state of the game and determines which column is best to block the opponent\r\n canPlace = true;\r\n mustPlace = -1;\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)&&canPlace==true){ \r\n erase = 0; //adding a move\r\n changeBoard(i, 1, color1, color2); //simulating every possible move of the user\r\n for(int j = 1; j<=7; j++){\r\n if(validInput(j)&&canPlace == true){\r\n erase = 0; //adding another user move\r\n changeBoard(j, 1, color1, color2); //then seeing if the user can win after any one of those moves\r\n if(hasCheckingCondition(4, color1)==true){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the black one for a magenta one\r\n erase=0;\r\n changeBoard(j, AINumber, color1, color2); //placing a magenta checker here for the future game board possibilities\r\n \r\n for(int z = 1; z<=7; z++){\r\n if(validInput(z)&&canPlace==true){\r\n erase = 0;\r\n changeBoard(z, 1, color1, color2); //adding\r\n if(hasCheckingCondition(4, color1)==true){//that means they can get a double win soon\r\n mustPlace = i; //the move that must be placed to block a double move is i\r\n for(int x =0; x<7; x++){\r\n if(i==shouldNotPlace[i]){ //if mustPlace equals a immediate losing move, continue the loop to find the next one which results in a valid move\r\n canPlace = true;\r\n continue;\r\n }\r\n }\r\n canPlace = false; //putting it here so that the loop doesnt run again after its found, but the current iteration finishes\r\n }\r\n erase = z;\r\n changeBoard(erase, 1, color1, color2); //subtracting the checker\r\n }\r\n }\r\n erase = j; //erasing if the AI placed something\r\n changeBoard(erase, AINumber, color1, color2);\r\n }\r\n else if(hasCheckingCondition(4, color1)==false){\r\n erase = j;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n }\r\n erase = i;\r\n changeBoard(erase, 1, color1, color2); //erasing the moves just placed\r\n }\r\n }\r\n \r\n if(mustPlace>-1){\r\n canPlace = true;\r\n for(int i = 0; i<7; i++){\r\n if(mustPlace == shouldNotPlace[i]){ //making sure that this projected move is not gonna lead immediately to a loss\r\n canPlace = false;\r\n }\r\n }\r\n \r\n if(canPlace==true){\r\n erase=0;\r\n changeBoard(mustPlace, AINumber, color1, color2);\r\n AIPlayed = true;\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0;\r\n repeatGui(\"\"); \r\n }\r\n canGo = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n whoseTurn = 1;\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //if the AI still hasnt made a move because none of the above is possible, then place in the center or middle columns if possible\r\n if(validInput(4)==true){\r\n canPlace=true;\r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==4){\r\n canPlace=false; //if column 4 ever results in a losing move, dont place it there\r\n break;\r\n }\r\n }\r\n if(canPlace==true){\r\n if(arrayCircles[1][3].getColor()==Color.white){ //the AI shouldnt place it in the top-top row in the 4th column all the time\r\n erase = 0;\r\n changeBoard(4, AINumber, color1, color2); //for the center or middle column\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed==false){ //this statement is so that the AI places a checker in the 3rd or 5th column provided that it isnt an immediate losing move\r\n outer: for(int i = 2; i<5; i++){ //if the AI still hasnt played, put it in a position at the bottom of the column\r\n for(int a = 0; a<7; a++){\r\n if(i+1==shouldNotPlace[a]){ //checking if the columnnumber equals to any part of the shouldNotPlace array\r\n canPlace = false;\r\n break outer; //breaking the outer loop for efficiency\r\n }\r\n }\r\n }\r\n if(canPlace==true&&AIPlayed == false){ // \r\n randomnum = (int)(r.nextInt(2));\r\n if(randomnum==0){\r\n if(validInput(3)){ //making all the possible moves are at least valid first\r\n erase=0;\r\n changeBoard(3, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n else if (randomnum==1){\r\n if(validInput(5)){\r\n erase=0;\r\n changeBoard(5, AINumber, color1, color2); //put it at the bottom of the more centered rows\r\n numTurns++; \r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn=1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(AIPlayed == false){ //if all of the above is not possible, then make a random choice that will not lose the game the next turn\r\n do{\r\n randomnum = (int)(r.nextInt(7)+1);\r\n \r\n timesChecked++;\r\n \r\n if(timesChecked>1000){ //if it runs 1000 times, meaning that there is only one spot to play which will result in a loss\r\n for(int i = 1; i<=7; i++){\r\n if(validInput(i)== true){\r\n randomnum = i; //setting the random number to be the only column left available\r\n }\r\n }\r\n break; //breaking out of the loop if there is no other choice for a checker\r\n }\r\n \r\n for(int i = 0; i<7; i++){\r\n if(shouldNotPlace[i]==randomnum){\r\n randomnum=100; //causing the loop to run again\r\n break;\r\n }\r\n }\r\n \r\n }while(validInput(randomnum)==false); //if the AI cant win or block the opponent, it chooses a random slot and places it there\r\n \r\n erase = 0;\r\n changeBoard(randomnum, AINumber, color1, color2); //changing the board here and the variables below then make it the users turn\r\n numTurns++;\r\n if(fullBoard()){\r\n whoseTurn = 0; //checking if the result of the game is a draw\r\n repeatGui(\"\"); \r\n }\r\n whoseTurn = 1;\r\n AIPlayed = true; //making sure that it is the users turn now, and the AI cannot play anymore until the next turn\r\n canGo=true;\r\n }\r\n \r\n }//END OF HARD AI METHOD=====================\r\n \r\n ///========================================================//////PVAI BUTTONS///////=======================================================================\r\n if(command.equals(\"Black\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.black; \r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Red\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" + \" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.red;\r\n removeColor(); \r\n addAiButtons(); //depending on which colour they press\r\n }\r\n \r\n if(command.equals(\"Yellow\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.yellow;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Green\")&&mode==2){ \r\n instructions.setText(\"<html>Interesting choice!\"+\"</br>\" +\" Would you like to play vs the Easy AI or the Hard AI?\");\r\n color1 = Color.green;\r\n removeColor(); \r\n addAiButtons(); \r\n }\r\n \r\n if(command.equals(\"Easy AI\")){\r\n choseEasyAI = true;\r\n welcome.remove(easyAI); //sending it to the appropriate methods after they pressed the respective buttons\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n else if(command.equals(\"Hard AI\")){ //if they choose the hardAI\r\n choseEasyAI = false; \r\n welcome.remove(easyAI);\r\n welcome.remove(hardAI);\r\n goesFirst();\r\n }\r\n \r\n if(mode==2&&command.equals(name1)){\r\n PVAI(name1); //if they want name1 to go first, send it to the method with the correct parameter\r\n }\r\n \r\n else if(command.equals(name2)&&mode==2){ //if name 2 wants to go first\r\n PVAI(name2);\r\n }\r\n \r\n else if(command.equals(\"Flip a coin\")&&mode==2){ //if they desire to flip a coin to determine who goes first\r\n \r\n randomnum = (int)(r.nextInt(2));\r\n \r\n if(randomnum == 0){ //using randomnum to simulate the flipping of a coin\r\n PVAI(name1);\r\n }\r\n else{ //randomly decides who goes first\r\n PVAI(name2);\r\n }\r\n }\r\n \r\n //if they would like to play again; the buttons appear at the end\r\n if(command.equals(\"Yes\")){\r\n playAgain = true; //if they want to play again\r\n repeatGui(\"\"); //repeating the GUI method\r\n }\r\n else if(command.equals(\"No\")){\r\n this.dispose(); //getting rid of the frame; essentially closing it\r\n }\r\n }", "public void actionPerformed(ActionEvent e) {\r\n if (e.getActionCommand().equals(\"Play Another Game\")){\r\n \trestart.setVisible(false);\r\n \trandint = rand.nextInt(2);\r\n board.removeAll();\r\n board.setBounds(50, 20, 199, 199); \r\n board.setLayout(new GridLayout(3,3,2,2));\r\n board.setBackground(Color.black);\r\n for (int x=0; x<3; x++) {\r\n \t\t\tfor (int y=0; y<3; y++) {\r\n \t\t\t\t//JButton btn = new JButton();\r\n \t\t\t\tbuttons[x][y] = new BoardButton(x,y);\r\n \t\t\t\tbuttons[x][y].setBounds(0+(68*y), 0+(68*y),66 , 66);\r\n \t\t\t\tboard.add(buttons[x][y]);\r\n \t\t\t buttons[x][y].setBackground(Color.WHITE);\r\n \t buttons[x][y].setFont(new Font(\"Brush Script MT\", Font.ITALIC, 40));\r\n \t buttons[x][y].addActionListener(new BoardListener());\r\n \t buttons[x][y].setValue(0);\r\n \r\n }\r\n }\r\n board.revalidate();\r\n board.repaint();\r\n // frame.remove(restart);\r\n clicks = 0;\r\n\t //checkWin();\r\n message.setText(\"\");\r\n if(randint == 1 ) {clicks++;AiChoice();message.setText(Integer.toString(clicks) + Integer.toString(pattern));}\r\n }\r\n \r\n else if (e.getActionCommand().equals(\"Want Better?\")) {\r\n \t\r\n \ttry {\r\n \t\t URI uri= new URI(\"https://www.google.com/search?safe=strict&rlz=1C1CHBF_enIE772IE772&sxsrf=ALeKk02SwFT95oiUpQTwq4tov5PfCWJeYw%3A1586973543968&ei=Z0uXXqTWOoGl1fAP7rq56Ag&q=tictactoe&oq=tictactoe&gs_lcp=CgZwc3ktYWIQAzIECCMQJzIECCMQJzIECAAQQzIECAAQCjIECAAQCjIECAAQCjIECAAQCjIECAAQCjIECAAQCjIECAAQCjoECAAQR0oNCBcSCTktNzlnMGcxMkoLCBgSBzktMWcwZzJQ_hNY_hNg5RVoAHACeACAAUOIAUOSAQExmAEAoAEBqgEHZ3dzLXdpeg&sclient=psy-ab&ved=0ahUKEwjkpeySgevoAhWBUhUIHW5dDo0Q4dUDCAw&uact=5\");\r\n \t\t java.awt.Desktop.getDesktop().browse(uri);\r\n \t\t }\r\n \t\t catch (Exception j) {\r\n \t\t\t \r\n \t\t\t j.printStackTrace();\r\n \t\t\t }\r\n \t\r\n }\r\n \r\n \r\n \r\n \r\n \r\n\t }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tString actionCmd = e.getActionCommand();\n\t\t\tif(actionCmd.equals(\"Yes\")) { //재게임 하겠다\n\t\t\t\t\n\t\t\t\tif(GameType.equalsIgnoreCase(\"Theory\")) { //이론 게임 선택 \n\t\t\t\t\tTheoryJavaGame theoryjava = new TheoryJavaGame(user.getId());\n\t\t\t\t\ttheoryjava.setVisible(true);\n\t\t\t\t}else if(GameType.equalsIgnoreCase(\"Lab\")) { //실습 게임 선택 \n\t\t\t\t\tLabJavaGame labjava = new LabJavaGame(user.getId());\n\t\t\t\t\tlabjava.setVisible(true);\n\t\t\t\t}else {\n\t\t\t\t\tJOptionPane.showMessageDialog(new TheoryJavaGame(user.getId()), \n\t\t\t\t\t\t\t\"Please enter it correctly.\", \n\t\t\t\t\t\t\t\"Submission Error\", \n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\tdispose();\n\n\t\t\t}else if(actionCmd.equals(\"No\")) { //재게임 하지 않겠다\n\t\t\t\tLogin log = new Login(); //로그인 페이지로 돌아가기\n\t\t\t\tlog.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}else\n\t\t\t\tSystem.out.println(\"Unexpected Error\"\n\t\t\t\t\t\t+ \" in Confirm Window\");\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif(!isFinished){\n\t\t\t//get the button\n\t\t\tJButton clicked = (JButton) e.getSource();\n\t\t\t\n\t\t\tfor(int row=0;row<SIZE;row++){\n\t\t\t\tfor(int col=0;col<SIZE;col++){\n\t\t\t\t\tif(clicked == buttonGrid[row][col]){\n\t\t\t\t\t\t\n\t\t\t\t\t\t//fill the virtual array with text (O or X)\n\t\t\t\t\t\tengine.fill(row, col);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//fill the real graphical button with text (O or X)\n\t\t\t\t\t\tif(engine.counter%2==0){\n\t\t\t\t\t\t\tbuttonGrid[row][col].setText(\"X\");\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbuttonGrid[row][col].setText(\"O\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//disable the button\n\t\t\t\t\t\tbuttonGrid[row][col].setEnabled(false);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//check if one wins the game\n\t\t\tisFinished = engine.isFinished();\n\t\t\t\n\t\t\t//if finished,\n\t\t\tif(isFinished) {\n\t\t\t\t\n\t\t\t\t//send message\n\t\t\t\tif(engine.counter%2==0){\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"'X' wins the game\");\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(frame, \"'O' wins the game\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t//check if the game is a tie\n\t\t\t}else if(engine.counter==SIZE*SIZE){\n\t\t\t\tisFinished = true;\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"The game is a tie\");\n\t\t\t}\n\t\t\t \n\t\t\t//part where program asks user whether he or she wants extra games\n\t\t\tif(isFinished) {\n\t\t\t\tint option = JOptionPane.showConfirmDialog(frame, \"Do you want to player another game?\", \"Message Board\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n\t\t\t\t\n\t\t\t\tif(option == JOptionPane.YES_OPTION){\n\t\t\t\t\treset();\n\t\t\t\t} else{\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n int row = 0, col = 0;\n gridLocationFinder:\n for (row = 0; row < 3; row++) {\n for (col = 0; col < 3; col++) {\n if (e.getSource() == gridButtons[row][col])\n break gridLocationFinder; // break out of outer loop using labelled break\n }\n }\n if (gameModel.setCell(row, col, gameModel.currentPlayer())) // legal\n {\n JButton buttonPressed = (JButton) e.getSource();\n buttonPressed.setText(gameModel.currentPlayer().toString());\n buttonPressed.setEnabled(false); // disable pressing again\n\n // check for gameOver...display game over in statusBar or whose turn it now is\n statusBar.setText(gameModel.currentPlayer().toString());\n }\n\n }", "public void actionPerformed (ActionEvent e){\n\t \t\t JButton currentButton= (JButton)e.getSource(); //save which button pressed in variable\n\t \t\t //sets how many players and the calls next GUI screen depending on button pressed\n\t \t\t if(currentButton==gameMode[0]) {\n\t \t\t\t System.out.println(\"1 Player vs 1 Player game mode selected\");\n\t \t\t\t numPlayers= 2; \n\t \t\t\t playersLeft = 2;\n\t \t\t\t gameModeSelected=0;\n\t \t\t\t createGui2(frame1, frame2, frame3, numPlayers);\n\t \t\t\t }\n\t \t\t else if(currentButton==gameMode[1]) {\n\t \t\t\t System.out.println(\"1 Player vs 1 Computer Player game mode selected\");\n\t \t\t\t numPlayers= 2;\n\t \t\t\t playersLeft = 2;\n\t \t\t\t gameModeSelected=1;\n\t \t\t\t createGui2(frame1, frame2, frame3, numPlayers);\n\t \t\t }\n\t \t\t else if(currentButton==gameMode[2]) {\n\t \t\t\tSystem.out.println(\"Two-Versus-Two Team Battle game mode selected\");\n\t \t\t\tnumPlayers=4;\n\t \t\t\tplayersLeft = 4;\n\t \t\t\tgameModeSelected=2;\n\t \t\t\t createGui2(frame1, frame2, frame3, numPlayers);\n\t \t\t }\n\t \t\t else {\n\t \t\t\t System.out.println(\"4 Player Free-for-All Game game mode selected\");\n\t \t\t\t numPlayers=4;\n\t \t\t\t playersLeft = 4;\n\t \t\t\t gameModeSelected=3;\n\t \t\t\t createGui2(frame1, frame2, frame3, numPlayers);\n\t \t\t }\t\n\t \t }", "public void actionPerformed(ActionEvent e){\r\n\t\tif(e.getActionCommand().equals(\"Start\")){\r\n\t\t\ttitleImage();\r\n\t\t}\r\n\t\tif(e.getActionCommand().equals(\"Hint\")){\r\n\t\t\t//guessed = false, the user did not guess all values\r\n\t\t\tguessed = false;\r\n\t\t\t//executed = true, the hint was used\r\n\t\t\texecuted = true;\r\n\t\t\trandom();\r\n\t\t\thint(a,b,c,d,f,g);\r\n\t\t}\r\n\t\tif (e.getSource() == numberField){\r\n\t\t\t//guessed = true, the user guessed all values\r\n\t\t\tguessed = true;\r\n\t\t\tcanvas.add(matrix);\r\n\t\t\tscanTicket();\r\n\t\t\tprintArray(a,b,c,d,f,g);\r\n\t\t\tcompareArray(chArray, randArray);\r\n\t\t\tpointsImage(points);\r\n\t\t\tnumberImage();\r\n\t\t\tstringImage(ch1,ch2,ch3,ch4,ch5,ch6);\r\n\t\t\t//executed = false, the hint was not used\r\n\t\t\texecuted = false;\r\n\t\t\tmatch1 = false;\r\n\t\t\tmatch2 = false;\r\n\t\t\tmatch3 = false;\r\n\t\t\tmatch4 = false;\r\n\t\t\tmatch5 = false;\r\n\t\t\tmatch6 = false;\r\n\t\t}\r\n\t}", "public static void buttonHandler(ActionEvent e){\t\n\t\t\n\t\tif(firstButtonPressed == false){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\t\n\t\t\tfirstButton = (JButton)e.getSource();\n\t\t\tlocation = Integer.parseInt(firstButton.getName());\n\t\t\tfirstRow = location/boardBoundsRow;\n\t\t\tfirstColumn = location%boardBoundsColumn;\n\t\t\tfirstSelected = (JPanel)userInterface.boardButtons.getComponent(location);\n\t\t\toldColor = firstSelected.getBackground();\n\t\t\tif(board[firstRow][firstColumn].color.equals(turn) == false){\t\t\t\t\t\t\t\t\t//picked opponent piece\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfirstButtonPressed = true;\n\t\t\tfirstSelected.setBackground(new Color(255,255,51));\n\t\t}\n\t\telse{\n\t\t\tsecondButton = (JButton)e.getSource();\n\t\t\tlocation = Integer.parseInt(secondButton.getName());\n\t\t\tsecondRow = location/boardBoundsRow;\n\t\t\tsecondColumn = location%boardBoundsColumn;\n\t\t\tfirstButtonPressed = false;\n\t\t\tfirstSelected.setBackground(oldColor);\n\t\t\tif(board[secondRow][secondColumn].color.equals(turn)){\t\t\t\t\t\t\t\t\t//own piece can't move there pick new move\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tpieces oldPiece = new pieces(firstRow,firstColumn,board[firstRow][firstColumn].name,board[firstRow][firstColumn].color);\n\t\t\tpieces newPiece = new pieces(secondRow,secondColumn,board[secondRow][secondColumn].name,board[secondRow][secondColumn].color);\n\t\t\tif(game.checkAndMovePiece(board, board[firstRow][firstColumn], board[secondRow][secondColumn])){\n\t\t\t\tpushUndoVectors(firstButton.getIcon(), secondButton.getIcon(),oldPiece, newPiece);\n\t\t\t\tsecondButton.setIcon(firstButton.getIcon());\n\t\t\t\tfirstButton.setIcon(null);\n\t\t\t\tif(turn.equals(\"white\")){\n\t\t\t\t\tking.whiteKingCheck = false;\n\t\t\t\t}\n\t\t\t\tif(turn.equals(\"black\")){\n\t\t\t\t\tking.blackKingCheck = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitchPlayers();\n\t\t\t\tString playerTurn = \"Player turn: \";\n\t\t\t\tuserInterface.turn.setText(playerTurn.concat(turn));\n\t\t\t\tif(king.whiteKingCheck==true || king.blackKingCheck == true){\n\t\t\t\t\tString checkMate = checkEndGame();\n\t\t\t\t\tuserInterface.check.setText(\"You are in check!\");\n\t\t\t\t\tcheckMateScenario(checkMate);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tuserInterface.check.setText(\"You are not in check\");\n\t\t\t\t}\n\t\t\t\tif(endGame.staleMate(board, turn)){\n\t\t\t\t\tJOptionPane.showMessageDialog(userInterface.frame, \"StaleMate!\");\n\t\t\t\t\tnewGame();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tJOptionPane.showMessageDialog(userInterface.frame, \"Invalid Move! Please try again\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void begin() {\r\n\t\t//Declaring GUI objects\r\n\t\tthis.openDialog();\r\n\t\tjf=new JFrame (\"JavaPuzzle\");\r\n\t\tgridPanel = new JPanel();\r\n\t\tjf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tJPanel buttonBar= new JPanel();\r\n\t\tJPanel textArea = new JPanel();\r\n\t\tJPanel wrapper = new JPanel();\r\n\r\n\t\t//Button area handling\r\n\t\tJButton load = new JButton(\"Load Another Image\");\r\n\t\tload.addActionListener(new LoadListener());\r\n\t\tJButton showImage = new JButton(\"Show Orginal Image\");\r\n\t\tshowImage.addActionListener(new showImage());\r\n\t\tJButton exit=new JButton(\"Exit\");\r\n\t\texit.addActionListener(new exitClass());\r\n\t\tbuttonBar.add(load);\r\n\t\tbuttonBar.add(showImage);\r\n\t\tbuttonBar.add(exit);\r\n\r\n\t\t//text area handling\r\n\t\ttext = new JTextArea();\r\n\r\n\t\ttext.setLineWrap(true);\r\n\t\tJScrollPane scroller = new JScrollPane(text);\r\n\t\tscroller.setPreferredSize(new Dimension(750, 50));\r\n\t\tscroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tscroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n\t\ttext.setText(\"Game started!\");\r\n\t\ttextArea.add(scroller);\r\n\r\n\t\twrapper.add(textArea);\r\n\t\twrapper.add(buttonBar);\r\n\t\twrapper.setLayout(new BoxLayout(wrapper, BoxLayout.Y_AXIS));\r\n\r\n\t\t//Image/Play Area handling\r\n\r\n\r\n\t\tImage temp1= display_img.getImage();\r\n\t\tImageIcon img=new ImageIcon(temp1.getScaledInstance(800, 800, Image.SCALE_SMOOTH));\r\n\t\timg1 = img.getImage();\r\n\r\n\t\tgridPanel.setLayout(new GridLayout (10,10));\r\n\t\tgrid = new JButton[10][10];\r\n\t\tfor(int y=0;y<10;y++) {\r\n\t\t\tfor(int x=0; x<10; x++) {\r\n\t\t\t\tImage image = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource(img1.getSource(), new CropImageFilter(x * 800 / 10, y * 800 / 10, 100, 100)));\r\n\t\t\t\tImageIcon icon = new ImageIcon(image);\r\n\t\t\t\tJButton temp = new JButton(icon);\r\n\t\t\t\ttemp.putClientProperty(\"position\", new Point(y,x));\r\n\t\t\t\tsolutions.add(new Point(y,x));\r\n\t\t\t\ttemp.putClientProperty(\"isLocked\", false);\r\n\t\t\t\ttemp.addMouseListener(new DragMouseAdapter());\r\n\t\t\t\tgrid[x][y]=temp;\r\n\t\t\t\t//gridPanel.add(grid[x][y]);\r\n\t\t\t\tbuttons.add(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t\tCollections.shuffle(buttons);\r\n\t\tfor(JButton j: buttons) {\r\n\t\t\tgridPanel.add(j);\r\n\t\t}\r\n\r\n\t\tjf.getContentPane().add(BorderLayout.SOUTH, wrapper);\r\n\r\n\r\n\t\tjf.add(gridPanel);\r\n\t\tjf.pack();\r\n\t\tjf.setSize(800, 1200);\r\n\t\tjf.setVisible(true);\r\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinitBoard();\r\n\t\t\t\trepaint();\r\n\t\t\t}", "void startPopupDialog(String windowTitle, int colSize)\n { /* startPopupDialog */\n Panel buttonPanel= null;\t /* place buttons here */\n Button\n ok,\t\t /* update data */\n cancel;\t\t \t/* use default data */\n GridLayout gl; /* for layout of text fields, label, etc */\n \n \n /* [1] initialize */\n gl= new GridLayout(4,1);\n this.setLayout(gl);\t /* set gridlayout to frame */\n \n /* [1] Create User instruction label */\n label= new Label(spaces);\n \n /* [2] Create the buttons and arrange to handle button clicks */\n if(addButtonsCnt>0)\n { /* add button panel */\n buttonPanel= new Panel();\n \n if(addButtonsCnt==1)\n ok= new Button(\"Continue\");\n else ok= new Button(\"Ok\");\n ok.addActionListener(this);\n buttonPanel.add(\"Center\",ok);\n \n if(addButtonsCnt==2)\n {\n cancel= new Button(\" Cancel\");\n cancel.addActionListener(this);\n buttonPanel.add(\"Center\", cancel);\n }\n } /* add button panel */\n \n /* [3] add data text fields to panel */\n this.add(label); /* add to grid. data description label */\n if(addButtonsCnt>=2)\n {\n optionPanel= new Panel();\n this.add(optionPanel);\n \n textField= new TextField(colSize);\n this.add(textField); /* editable text */\n }\n \n /* [4] add buttons panel */\n if(buttonPanel!=null)\n this.add(buttonPanel); /* buttons (ok & cancel) */\n this.addWindowListener(this); /* listener for window events */\n \n /* [5] add components and create frame */\n this.setTitle(windowTitle); /* frame title */\n this.pack();\n \n /* Center frame on the screen, PC only */\n Dimension screen= Toolkit.getDefaultToolkit().getScreenSize();\n Point pos= new Point((screen.width-frame.getSize().width)/2,\n (screen.height-frame.getSize().height)/2);\n this.setLocation(pos);\n \n this.setVisible(false);\t /* hide frame which can be shown later */\n }", "@Override\n public void handle(ActionEvent e)\n {\n Button button = (Button) e.getSource();\n \n \tRadioButton selectedButton = (RadioButton) rbGroup.getSelectedToggle();\n int matchedCards = 0;\n \n // only allow guessHandler to activate when player has selected 4 final cards\n if(numCardsSelected == 4 && selectedButton != null)\n {\n \t// reset highlighting on grade selection buttons\n buttonK2.setStyle(null);\n button35.setStyle(null);\n button68.setStyle(null);\n \n \t//disable all radio buttons\n pattern0.setDisable(true);\n pattern1.setDisable(true);\n pattern2.setDisable(true);\n pattern3.setDisable(true);\n pattern4.setDisable(true);\n pattern5.setDisable(true);\n pattern6.setDisable(true);\n pattern7.setDisable(true);\n pattern8.setDisable(true);\n pattern9.setDisable(true);\n pattern10.setDisable(true);\n pattern11.setDisable(true);\n pattern12.setDisable(true);\n pattern13.setDisable(true);\n pattern14.setDisable(true);\n pattern15.setDisable(true);\n pattern16.setDisable(true);\n pattern17.setDisable(true);\n pattern18.setDisable(true);\n pattern19.setDisable(true);\n pattern20.setDisable(true);\n pattern21.setDisable(true);\n pattern22.setDisable(true);\n pattern23.setDisable(true);\n \n // disable all cards\n for(Node child: gridpane.getChildren())\n {\n \tchild.setDisable(true);\n }\n \n // disable sell cards button\n sellCards.setDisable(true);\n \n // disable declare pattern button\n declarePattern.setDisable(true);\n \n // disable guess pattern button\n guessPattern.setDisable(true);\n \n \tbutton.setStyle(null);\n \t\n \tcheckForMatches();\n \t\n \t// system.out.println(\"Pattern Selected:\" + Integer.parseInt(selectedButton.getId()));\n solutionChoice = Integer.parseInt(selectedButton.getId());\n guessPattern();\n\n // determine if the four selected cards are in the matched deck\n for(int i = 0; i < playerDeck.size(); i++)\n {\n \tfor(int j = 0; j < matchedDeck.size(); j++)\n \t{\n \t\tif(playerDeck.get(i).getCardId() == matchedDeck.get(j).getCardId())\n \t\t{\n \t\t\tmatchedCards++;\n \t\t\tbreak;\n \t\t}\n \t}\n }\n \n if(Integer.parseInt(selectedButton.getId()) == pattern.ordinal() && matchedCards == 4)\n {\n // display winning message to player\n historyText.setText(historyText.getText() + \"\\n***** YOU FIGURED OUT THE PATTERN *****\\n\");\n historyText.setText(historyText.getText() + \"It took you \" + turnCount + \" turns to solve.\\n\");\n historyText.setText(historyText.getText() + \"Congrats on the win! To start a new game, select your grade level. \\n\");\n\n // play winning audio\n playAudio(1);\n }\n else if(Integer.parseInt(selectedButton.getId()) == pattern.ordinal())\n {\n \t// display losing message to player\n historyText.setText(historyText.getText() + \"\\n --- Sorry, you picked the correct pattern, \"\n \t\t+ \"but not all of the selected cards were purchased. --- \\n\");\n historyText.setText(historyText.getText() + \"You used \" + turnCount + \" turns.\\n\");\n historyText.setText(historyText.getText() + \"To start a new game, select your grade level. \\n\");\n\n // play losing audio\n playAudio(0);\n }\n else\n {\n // display losing message to player\n historyText.setText(historyText.getText() + \"\\n --- Sorry, the correct pattern was \" + convertEnum() + \". --- \\n\");\n historyText.setText(historyText.getText() + \"You used \" + turnCount + \" turns.\\n\");\n historyText.setText(historyText.getText() + \"To start a new game, select your grade level. \\n\");\n\n // play losing audio\n playAudio(0);\n }\n scrollpane.setVvalue(1.0);\n // de-select radio button\n selectedButton.setSelected(false);\n }\n else\n {\n \t// set sell button red\n \tbutton.setStyle(\"-fx-background-color:#f54040\");\n \thistoryText.setText(historyText.getText() + \"You must select 4 cards and have a pattern selected to guess the pattern! \\n\");\n } \n }", "public void WildIsPlayedAskUserForColor() {\n\t\tJFrame window = new JFrame(\"Wild Card Was Played\");\n\t\twindow.setSize(600, 125);\n\t\twindow.setLayout(new FlowLayout());\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.setLocationRelativeTo(null);\n\t\t\n\t\t// Creating Color name field\n\t\tJLabel colorMessageLabel = new JLabel(\"Choose New Game Color:\");\n\t\t\n\t\t// Creating color buttons\n\t\tJButton redButton = new JButton(\"Red\");\n\t\tJButton greenButton = new JButton(\"Green\");\n\t\tJButton blueButton = new JButton(\"Blue\");\n\t\tJButton yellowButton = new JButton(\"Yellow\");\n\t\t\n\t\t//Creating panels to add all objects to\n\t\tJPanel panel1 = new JPanel(new GridLayout(1,1)); // Creating a Flow Layout for first row\n\t\tpanel1.add(colorMessageLabel);\n\n\t\tJPanel panel2 = new JPanel(new GridLayout(2,2));\n\t\tpanel2.add(redButton);\n\t\tpanel2.add(greenButton);\n\t\tpanel2.add(blueButton);\n\t\tpanel2.add(yellowButton);\n\t\t\n\t\t//Adding panel of objects to the JFrame window\n\t\twindow.add(panel1);\n\t\twindow.add(panel2);\n\t\twindow.setVisible(true); \n\t\t\n\t\t//Event handler for Red button\n\t\tredButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Red\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t\t}\n\t\t});\n\t\t\n\t\t//Event Handler for Green button\n\t\tgreenButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Green\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\n\t\t//Event Handler for Green button\n\t\tblueButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Blue\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t//Event Handler for Green button\n\t\tyellowButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcurrentTurnColor = \"Yellow\";\n\t\t\t\twindow.setVisible(false);\n\t\t\t}\n\t\t});\n\t\t\t\t\n\t}", "private void initialize() {\n\t\tfrmCardGame = new JFrame();\n\t\tfrmCardGame.setTitle(\"Card Game ( Call Bridge )\");\n\t\tfrmCardGame.getContentPane().setBackground(new Color(0, 153, 51));\n\t\tfrmCardGame.setBackground(new Color(0, 204, 0));\n\t\tfrmCardGame.setBounds(100, 100, 1165, 700);\n\t\tfrmCardGame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmCardGame.getContentPane().setLayout(null);\n\t\t\n\t\tJButton p1Img1 = new JButton(\"\");\n\t\tp1Img1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti1++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i1==1){\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[0];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[0].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard1=new ImageIcon(this.getClass().getResource(\"/\"+deck[0]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard1));\n\t\t\t\t\t\t\t\tSetPlayerCard(index,0);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img1.setIcon(new ImageIcon(img));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[0]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[0].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti1=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard1=new ImageIcon(this.getClass().getResource(\"/\"+deck[0]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard1));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 0);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img1.setIcon(new ImageIcon(img));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[0];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[0]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti1=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tImage img=new ImageIcon(this.getClass().getResource(\"/\"+deck[0]+\".gif\")).getImage();\n\t\tp1Img1.setIcon(new ImageIcon(img));\n\t\tp1Img1.setBounds(10, 346, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img1);\n\t\t\n\t\tJButton p1Img2 = new JButton(\"\");\n\t\tp1Img2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti2++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i2==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[1];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[1].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard2=new ImageIcon(this.getClass().getResource(\"/\"+deck[1]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard2));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img2=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img2.setIcon(new ImageIcon(img2));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[1]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{ // To check whether the desired card is exist within player1 or not. \n\t\t\t\t\t\t\t\tif(deck[1].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti2=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard2=new ImageIcon(this.getClass().getResource(\"/\"+deck[1]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard2));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img2=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img2.setIcon(new ImageIcon(img2));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[1];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[2]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti2=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img2=new ImageIcon(this.getClass().getResource(\"/\"+deck[1]+\".gif\")).getImage();\n\t\tp1Img2.setIcon(new ImageIcon(img2));\n\t\tp1Img2.setBounds(92, 346, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img2);\n\t\t\n\t\tJButton p1Img3 = new JButton(\"\");\n\t\tp1Img3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti3++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i3==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[2];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[2].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard3=new ImageIcon(this.getClass().getResource(\"/\"+deck[2]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard3));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 2);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img3=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img3.setIcon(new ImageIcon(img3));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[2]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[2].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti3=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard3=new ImageIcon(this.getClass().getResource(\"/\"+deck[2]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard3));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 2);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img3=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img3.setIcon(new ImageIcon(img3));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[2];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[2]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\ti3=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Now its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img3=new ImageIcon(this.getClass().getResource(\"/\"+deck[2]+\".gif\")).getImage();\n\t\tp1Img3.setIcon(new ImageIcon(img3));\n\t\tp1Img3.setBounds(174, 346, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img3);\n\t\t\n\t\tJButton p1Img4 = new JButton(\"\");\n\t\tp1Img4.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti4++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i4==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[3];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[3].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard4=new ImageIcon(this.getClass().getResource(\"/\"+deck[3]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard4));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 3);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img4=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img4.setIcon(new ImageIcon(img4));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[3]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[3].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti4=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard4=new ImageIcon(this.getClass().getResource(\"/\"+deck[3]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard4));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 3);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img4=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img4.setIcon(new ImageIcon(img4));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[3];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[3]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti4=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img4=new ImageIcon(this.getClass().getResource(\"/\"+deck[3]+\".gif\")).getImage();\n\t\tp1Img4.setIcon(new ImageIcon(img4));\n\t\tp1Img4.setBounds(256, 346, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img4);\n\t\t\n\t\tJButton p1Img5 = new JButton(\"\");\n\t\tp1Img5.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti5++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i5==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[4];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[4].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard5=new ImageIcon(this.getClass().getResource(\"/\"+deck[4]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard5));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 4);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img5=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img5.setIcon(new ImageIcon(img5));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[4]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[4].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti5=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard5=new ImageIcon(this.getClass().getResource(\"/\"+deck[4]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard5));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 4);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img5=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img5.setIcon(new ImageIcon(img5));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[4];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[4]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti5=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img5=new ImageIcon(this.getClass().getResource(\"/\"+deck[4]+\".gif\")).getImage();\n\t\tp1Img5.setIcon(new ImageIcon(img5));\n\t\tp1Img5.setBounds(10, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img5);\n\t\t\n\t\tJButton p1Img6 = new JButton(\"\");\n\t\tp1Img6.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti6++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i6==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[5];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[5].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard6=new ImageIcon(this.getClass().getResource(\"/\"+deck[5]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard6));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 5);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img6=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img6.setIcon(new ImageIcon(img6));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[5]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[5].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti6=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard6=new ImageIcon(this.getClass().getResource(\"/\"+deck[5]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard6));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 5);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img6=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img6.setIcon(new ImageIcon(img6));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[5];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[5]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti6=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img6=new ImageIcon(this.getClass().getResource(\"/\"+deck[5]+\".gif\")).getImage();\n\t\tp1Img6.setIcon(new ImageIcon(img6));\n\t\tp1Img6.setBounds(92, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img6);\n\t\t\n\t\tJButton p1Img7 = new JButton(\"\");\n\t\tp1Img7.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti7++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i7==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[6];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[6].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard7=new ImageIcon(this.getClass().getResource(\"/\"+deck[6]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard7));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 6);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img7=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img7.setIcon(new ImageIcon(img7));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[6]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[0].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti7=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard1=new ImageIcon(this.getClass().getResource(\"/\"+deck[6]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard1));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 6);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img1.setIcon(new ImageIcon(img));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[0];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[0]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti7=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img7=new ImageIcon(this.getClass().getResource(\"/\"+deck[6]+\".gif\")).getImage();\n\t\tp1Img7.setIcon(new ImageIcon(img7));\n\t\tp1Img7.setBounds(174, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img7);\n\t\t\n\t\tJButton p1Img8 = new JButton(\"\");\n\t\tp1Img8.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti8++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i8==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[7];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[7].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 7);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img8=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img8.setIcon(new ImageIcon(img8));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[7]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[7].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti8=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 7);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img8=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img8.setIcon(new ImageIcon(img8));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[7];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[7]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti8=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\tp1Img8.setIcon(new ImageIcon(img8));\n\t\tp1Img8.setBounds(256, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img8);\n\t\t\n\t\tJButton p1Img9 = new JButton(\"\");\n\t\tp1Img9.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti9++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i9==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[8];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[8].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 8);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img9=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img9.setIcon(new ImageIcon(img9));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[8]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[8].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti9=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 8);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img9=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img9.setIcon(new ImageIcon(img9));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[9];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[8]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti9=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img9=new ImageIcon(this.getClass().getResource(\"/\"+deck[8]+\".gif\")).getImage();\n\t\tp1Img9.setIcon(new ImageIcon(img9));\n\t\tp1Img9.setBounds(10, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img9);\n\t\t\n\t\tJButton p1Img10 = new JButton(\"\");\n\t\tp1Img10.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti10++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i10==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[9];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[9].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 9);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img10=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img10.setIcon(new ImageIcon(img10));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[9]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[9].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti10=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 9);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img10=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img10.setIcon(new ImageIcon(img10));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[9];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[9]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti10=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img10=new ImageIcon(this.getClass().getResource(\"/\"+deck[9]+\".gif\")).getImage();\n\t\tp1Img10.setIcon(new ImageIcon(img10));\n\t\tp1Img10.setBounds(92, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img10);\n\t\t\n\t\tJButton p1Img11 = new JButton(\"\");\n\t\tp1Img11.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti11++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i11==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[10];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[10].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 10);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img11=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img11.setIcon(new ImageIcon(img11));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[10]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[10].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti11=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 10);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img11=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img11.setIcon(new ImageIcon(img11));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[10];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[10]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti11=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img11=new ImageIcon(this.getClass().getResource(\"/\"+deck[10]+\".gif\")).getImage();\n\t\tp1Img11.setIcon(new ImageIcon(img11));\n\t\tp1Img11.setBounds(174, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img11);\n\t\t\n\t\tJButton p1Img12 = new JButton(\"\");\n\t\tp1Img12.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti12++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i12==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[11];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[11].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 11);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img8=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img8.setIcon(new ImageIcon(img8));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[11]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[11].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti12=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 11);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img12=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img12.setIcon(new ImageIcon(img12));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[11];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[11]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti12=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img12=new ImageIcon(this.getClass().getResource(\"/\"+deck[11]+\".gif\")).getImage();\n\t\tp1Img12.setIcon(new ImageIcon(img12));\n\t\tp1Img12.setBounds(256, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img12);\n\t\t\n\t\tJButton p1Img13 = new JButton(\"\");\n\t\tp1Img13.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==1) {\n\t\t\t\t\ti13++;\n\t\t\t\t\tplayer1++;\n\t\t\t\t\tif(player1==1){\n\t\t\t\t\t\tif(i13==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[12];\n\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\tch=deck[12].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 12);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img13=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp1Img13.setIcon(new ImageIcon(img13));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[12]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[12].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=0;i<13;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\ti13=0;\n\t\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard8=new ImageIcon(this.getClass().getResource(\"/\"+deck[7]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p1Card.setIcon(new ImageIcon(playCard8));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 12);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img13=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp1Img13.setIcon(new ImageIcon(img13));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[12];\n\t\t\t\t\t\t\t\t\tplayerList[index]=1;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[12]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\ti13=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img13=new ImageIcon(this.getClass().getResource(\"/\"+deck[12]+\".gif\")).getImage();\n\t\tp1Img13.setIcon(new ImageIcon(img13));\n\t\tp1Img13.setBounds(337, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Img13);\n\t\t\n\t\tJButton p2Img14 = new JButton(\"\"); // ................................Player 2 .................................................\n\t\tp2Img14.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj1++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j1==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[13];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[13].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard14=new ImageIcon(this.getClass().getResource(\"/\"+deck[13]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard14));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 13);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img14=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img14.setIcon(new ImageIcon(img14));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[13]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[13].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj1=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard14=new ImageIcon(this.getClass().getResource(\"/\"+deck[13]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard14));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 13);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img14=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img14.setIcon(new ImageIcon(img14));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[13];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[13]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\tj1=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tImage img14=new ImageIcon(this.getClass().getResource(\"/\"+deck[13]+\".gif\")).getImage();\n\t\tp2Img14.setIcon(new ImageIcon(img14));\n\t\tp2Img14.setBounds(821, 346, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img14);\n\t\t\n\t\tJButton p2Img15 = new JButton(\"\");\n\t\tp2Img15.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj2++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j2==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[14];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[14].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard15=new ImageIcon(this.getClass().getResource(\"/\"+deck[14]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard15));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 14);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img15=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img15.setIcon(new ImageIcon(img15));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[14]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[14].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj2=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard15=new ImageIcon(this.getClass().getResource(\"/\"+deck[14]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard15));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 14);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img15=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img15.setIcon(new ImageIcon(img15));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[14];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[14]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\tj2=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img15=new ImageIcon(this.getClass().getResource(\"/\"+deck[14]+\".gif\")).getImage();\n\t\tp2Img15.setIcon(new ImageIcon(img15));\n\t\tp2Img15.setBounds(903, 346, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img15);\n\t\t\n\t\tJButton p2Img16 = new JButton(\"\");\n\t\tp2Img16.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj3++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j3==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[15];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[15].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard16=new ImageIcon(this.getClass().getResource(\"/\"+deck[15]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard16));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 15);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img16=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img16.setIcon(new ImageIcon(img16));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[15]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[15].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj3=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard16=new ImageIcon(this.getClass().getResource(\"/\"+deck[15]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard16));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 15);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img16=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img16.setIcon(new ImageIcon(img16));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[15];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[15]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\tj3=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img16=new ImageIcon(this.getClass().getResource(\"/\"+deck[15]+\".gif\")).getImage();\n\t\tp2Img16.setIcon(new ImageIcon(img16));\n\t\tp2Img16.setBounds(985, 346, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img16);\n\t\t\n\t\tJButton p2Img17 = new JButton(\"\");\n\t\tp2Img17.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj4++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j4==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[16];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[16].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard17=new ImageIcon(this.getClass().getResource(\"/\"+deck[16]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard17));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 16);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img17=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img17.setIcon(new ImageIcon(img17));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[16]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[16].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj4=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard17=new ImageIcon(this.getClass().getResource(\"/\"+deck[16]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard17));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 16);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img17=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img17.setIcon(new ImageIcon(img17));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[16];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[16]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your trick is on running! Please wait for next trick.\");\n\t\t\t\t\t\tj4=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t\t/*if(j4==1){\n\t\t\t\t\tImage playCard17=new ImageIcon(this.getClass().getResource(\"/\"+deck[16]+\".gif\")).getImage();\n\t\t\t\t\tp2Card.setIcon(new ImageIcon(playCard17));\n\t\t\t\t\t\n\t\t\t\t\tImage img17=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\tp2Img17.setIcon(new ImageIcon(img17));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t}*/\n\t\t\t}\n\t\t});\n\t\tImage img17=new ImageIcon(this.getClass().getResource(\"/\"+deck[16]+\".gif\")).getImage();\n\t\tp2Img17.setIcon(new ImageIcon(img17));\n\t\tp2Img17.setBounds(1067, 344, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img17);\n\t\t\n\t\tJButton p2Img18 = new JButton(\"\");\n\t\tp2Img18.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj5++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j5==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[17];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[17].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard18=new ImageIcon(this.getClass().getResource(\"/\"+deck[17]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard18));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 17);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img18=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img18.setIcon(new ImageIcon(img18));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[17]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[17].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj5=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard18=new ImageIcon(this.getClass().getResource(\"/\"+deck[17]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard18));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 17);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img18=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img18.setIcon(new ImageIcon(img18));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[17];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[17]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj5=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img18=new ImageIcon(this.getClass().getResource(\"/\"+deck[17]+\".gif\")).getImage();\n\t\tp2Img18.setIcon(new ImageIcon(img18));\n\t\tp2Img18.setBounds(821, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img18);\n\t\t\n\t\tJButton p2Img19 = new JButton(\"\");\n\t\tp2Img19.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj6++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j6==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[18];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[18].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard19=new ImageIcon(this.getClass().getResource(\"/\"+deck[18]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard19));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 18);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img19=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img19.setIcon(new ImageIcon(img19));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[18]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[18].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj6=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard19=new ImageIcon(this.getClass().getResource(\"/\"+deck[18]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard19));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 18);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img19=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img19.setIcon(new ImageIcon(img19));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[18];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[18]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj6=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img19=new ImageIcon(this.getClass().getResource(\"/\"+deck[18]+\".gif\")).getImage();\n\t\tp2Img19.setIcon(new ImageIcon(img19));\n\t\tp2Img19.setBounds(903, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img19);\n\t\t\n\t\tJButton p2Img20 = new JButton(\"\");\n\t\tp2Img20.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj7++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j7==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[19];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[19].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard20=new ImageIcon(this.getClass().getResource(\"/\"+deck[19]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard20));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 19);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img20=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img20.setIcon(new ImageIcon(img20));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[19]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[19].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj7=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard20=new ImageIcon(this.getClass().getResource(\"/\"+deck[19]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard20));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 19);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img20=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img20.setIcon(new ImageIcon(img20));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[19];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[19]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj7=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img20=new ImageIcon(this.getClass().getResource(\"/\"+deck[19]+\".gif\")).getImage();\n\t\tp2Img20.setIcon(new ImageIcon(img20));\n\t\tp2Img20.setBounds(985, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img20);\n\t\t\n\t\tJButton p2Img21 = new JButton(\"\");\n\t\tp2Img21.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj8++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j8==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[20];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[20].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 20);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img21=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img21.setIcon(new ImageIcon(img21));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[20]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[20].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj8=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 20);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img21=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img21.setIcon(new ImageIcon(img21));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[20];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[20]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj8=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\tp2Img21.setIcon(new ImageIcon(img21));\n\t\tp2Img21.setBounds(1067, 451, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img21);\n\t\t\n\t\tJButton p2Img22 = new JButton(\"\");\n\t\tp2Img22.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj9++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j9==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[21];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[21].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 21);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img22=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img22.setIcon(new ImageIcon(img22));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[21]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[21].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj9=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 21);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img22=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img22.setIcon(new ImageIcon(img22));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[21];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[21]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj9=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img22=new ImageIcon(this.getClass().getResource(\"/\"+deck[21]+\".gif\")).getImage();\n\t\tp2Img22.setIcon(new ImageIcon(img22));\n\t\tp2Img22.setBounds(739, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img22);\n\t\t\n\t\tJButton p2Img23 = new JButton(\"\");\n\t\tp2Img23.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj10++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j10==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[22];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[22].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 22);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img23=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img23.setIcon(new ImageIcon(img23));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[22]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[22].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj10=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 22);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img23=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img23.setIcon(new ImageIcon(img23));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[22];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[22]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj10=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img23=new ImageIcon(this.getClass().getResource(\"/\"+deck[22]+\".gif\")).getImage();\n\t\tp2Img23.setIcon(new ImageIcon(img23));\n\t\tp2Img23.setBounds(821, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img23);\n\t\t\n\t\tJButton p2Img24 = new JButton(\"\");\n\t\tp2Img24.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj11++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j11==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[23];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[23].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 23);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img24=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img24.setIcon(new ImageIcon(img24));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[23]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[23].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj11=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 23);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img24=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img24.setIcon(new ImageIcon(img24));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[23];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[23]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj11=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img24=new ImageIcon(this.getClass().getResource(\"/\"+deck[23]+\".gif\")).getImage();\n\t\tp2Img24.setIcon(new ImageIcon(img24));\n\t\tp2Img24.setBounds(903, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img24);\n\t\t\n\t\tJButton p2Img25 = new JButton(\"\");\n\t\tp2Img25.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj12++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j12==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[24];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[24].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 24);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img25=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img25.setIcon(new ImageIcon(img25));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[24]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[24].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj12=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 24);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img25=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img25.setIcon(new ImageIcon(img25));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[24];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[24]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj12=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img25=new ImageIcon(this.getClass().getResource(\"/\"+deck[24]+\".gif\")).getImage();\n\t\tp2Img25.setIcon(new ImageIcon(img25));\n\t\tp2Img25.setBounds(985, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img25);\n\t\t\n\t\tJButton p2Img26 = new JButton(\"\");\n\t\tp2Img26.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==2) {\n\t\t\t\t\tj13++;\n\t\t\t\t\tplayer2++;\n\t\t\t\t\tif(player2==1){\n\t\t\t\t\t\tif(j13==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[25];\n\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\tch=deck[25].charAt(1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 25);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img26=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp2Img26.setIcon(new ImageIcon(img26));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[20]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[25].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=13;i<26;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tj13=0;\n\t\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard21=new ImageIcon(this.getClass().getResource(\"/\"+deck[20]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p2Card.setIcon(new ImageIcon(playCard21));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 25);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img26=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp2Img26.setIcon(new ImageIcon(img26));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[25];\n\t\t\t\t\t\t\t\t\tplayerList[index]=2;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[25]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tj13=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img26=new ImageIcon(this.getClass().getResource(\"/\"+deck[25]+\".gif\")).getImage();\n\t\tp2Img26.setIcon(new ImageIcon(img26));\n\t\tp2Img26.setBounds(1067, 556, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Img26);\n\t\t\n\t\tJButton p3Img27 = new JButton(\"\"); //...........................Player 3.................................................\n\t\tp3Img27.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk1++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k1==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[26];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[26].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard27=new ImageIcon(this.getClass().getResource(\"/\"+deck[26]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard27));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 26);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img27=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img27.setIcon(new ImageIcon(img27));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[26]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[26].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk1=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard27=new ImageIcon(this.getClass().getResource(\"/\"+deck[26]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard27));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 26);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img27=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img27.setIcon(new ImageIcon(img27));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[26];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tdeck[26]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk1=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img27=new ImageIcon(this.getClass().getResource(\"/\"+deck[26]+\".gif\")).getImage();\n\t\tp3Img27.setIcon(new ImageIcon(img27));\n\t\tp3Img27.setBounds(10, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img27);\n\t\t\n\t\tJButton p3Img28 = new JButton(\"\");\n\t\tp3Img28.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk2++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k2==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[27];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[27].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard28=new ImageIcon(this.getClass().getResource(\"/\"+deck[27]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard28));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 27);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img28=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img28.setIcon(new ImageIcon(img28));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[27]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[27].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk2=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard28=new ImageIcon(this.getClass().getResource(\"/\"+deck[27]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard28));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 27);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img28=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img28.setIcon(new ImageIcon(img28));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[27];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tdeck[27]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk2=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t}); \n\t\tImage img28=new ImageIcon(this.getClass().getResource(\"/\"+deck[27]+\".gif\")).getImage();\n\t\tp3Img28.setIcon(new ImageIcon(img28));\n\t\tp3Img28.setBounds(92, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img28);\n\t\t\n\t\tJButton p3Img29 = new JButton(\"\");\n\t\tp3Img29.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk3++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){ \n\t\t\t\t\t\tif(k3==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[28];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[28].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard29=new ImageIcon(this.getClass().getResource(\"/\"+deck[28]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard29));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 28);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img29=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img29.setIcon(new ImageIcon(img29));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[28]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[28].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk3=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard29=new ImageIcon(this.getClass().getResource(\"/\"+deck[28]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard29));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 28);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img29=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img29.setIcon(new ImageIcon(img29));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[28];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tdeck[28]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk3=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img29=new ImageIcon(this.getClass().getResource(\"/\"+deck[28]+\".gif\")).getImage();\n\t\tp3Img29.setIcon(new ImageIcon(img29));\n\t\tp3Img29.setBounds(174, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img29);\n\t\t\n\t\tJButton p3Img30 = new JButton(\"\");\n\t\tp3Img30.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk4++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k4==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[29];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[29].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard30=new ImageIcon(this.getClass().getResource(\"/\"+deck[29]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard30));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 29);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img30=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img30.setIcon(new ImageIcon(img30));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[29]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[29].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk4=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard30=new ImageIcon(this.getClass().getResource(\"/\"+deck[29]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard30));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 29);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img30=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img30.setIcon(new ImageIcon(img30));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[29];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tdeck[29]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk4=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img30=new ImageIcon(this.getClass().getResource(\"/\"+deck[29]+\".gif\")).getImage();\n\t\tp3Img30.setIcon(new ImageIcon(img30));\n\t\tp3Img30.setBounds(256, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img30);\n\t\t\n\t\tJButton p3Img31 = new JButton(\"\");\n\t\tp3Img31.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk5++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k5==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[30];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[30].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard31=new ImageIcon(this.getClass().getResource(\"/\"+deck[30]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard31));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 30);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img31=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img31.setIcon(new ImageIcon(img31));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[30]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[30].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk5=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard31=new ImageIcon(this.getClass().getResource(\"/\"+deck[30]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard31));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 30);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img31=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img31.setIcon(new ImageIcon(img31));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[30];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[30]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk5=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img31=new ImageIcon(this.getClass().getResource(\"/\"+deck[30]+\".gif\")).getImage();\n\t\tp3Img31.setIcon(new ImageIcon(img31));\n\t\tp3Img31.setBounds(337, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img31);\n\t\t\n\t\tJButton p3Img32 = new JButton(\"\");\n\t\tp3Img32.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk6++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k6==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[31];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[31].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard32=new ImageIcon(this.getClass().getResource(\"/\"+deck[31]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard32));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 31);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img32=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img32.setIcon(new ImageIcon(img32));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[31]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[31].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk6=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard32=new ImageIcon(this.getClass().getResource(\"/\"+deck[31]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard32));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 31);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img32=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img32.setIcon(new ImageIcon(img32));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[31];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[31]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk6=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img32=new ImageIcon(this.getClass().getResource(\"/\"+deck[31]+\".gif\")).getImage();\n\t\tp3Img32.setIcon(new ImageIcon(img32));\n\t\tp3Img32.setBounds(10, 116, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img32);\n\t\t\n\t\tJButton p3Img33 = new JButton(\"\");\n\t\tp3Img33.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk7++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k7==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[32];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[32].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard33=new ImageIcon(this.getClass().getResource(\"/\"+deck[32]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard33));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 32);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img33=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img33.setIcon(new ImageIcon(img33));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[32]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[32].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk7=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard33=new ImageIcon(this.getClass().getResource(\"/\"+deck[32]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard33));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 32);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img33=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img33.setIcon(new ImageIcon(img33));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[32];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[32]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk7=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img33=new ImageIcon(this.getClass().getResource(\"/\"+deck[32]+\".gif\")).getImage();\n\t\tp3Img33.setIcon(new ImageIcon(img33));\n\t\tp3Img33.setBounds(92, 116, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img33);\n\t\t\n\t\tJButton p3Img34 = new JButton(\"\");\n\t\tp3Img34.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk8++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k8==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[33];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[33].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 33);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img34=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img34.setIcon(new ImageIcon(img34));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[33]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[33].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk8=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 33);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img34=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img34.setIcon(new ImageIcon(img34));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[33];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[33]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk8=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\tp3Img34.setIcon(new ImageIcon(img34));\n\t\tp3Img34.setBounds(174, 116, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img34);\n\t\t\n\t\tJButton p3Img35 = new JButton(\"\");\n\t\tp3Img35.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk9++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k9==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[34];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[34].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 34);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img35=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img35.setIcon(new ImageIcon(img35));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[34]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[34].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk9=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 34);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img35=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img35.setIcon(new ImageIcon(img35));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[34];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[34]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk9=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img35=new ImageIcon(this.getClass().getResource(\"/\"+deck[34]+\".gif\")).getImage();\n\t\tp3Img35.setIcon(new ImageIcon(img35));\n\t\tp3Img35.setBounds(256, 116, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img35);\n\t\t\n\t\tJButton p3Img36 = new JButton(\"\");\n\t\tp3Img36.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk10++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k10==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[35];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[35].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 35);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img36=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img36.setIcon(new ImageIcon(img36));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[35]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[35].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk10=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 35);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img36=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img36.setIcon(new ImageIcon(img36));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[35];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[35]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk10=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img36=new ImageIcon(this.getClass().getResource(\"/\"+deck[35]+\".gif\")).getImage();\n\t\tp3Img36.setIcon(new ImageIcon(img36));\n\t\tp3Img36.setBounds(10, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img36);\n\t\t\n\t\tJButton p3Img37 = new JButton(\"\");\n\t\tp3Img37.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk11++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k11==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[36];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[36].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 36);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img37=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img37.setIcon(new ImageIcon(img37));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[36]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[36].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk11=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 36);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img37=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img37.setIcon(new ImageIcon(img37));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[36];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[36]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk11=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img37=new ImageIcon(this.getClass().getResource(\"/\"+deck[36]+\".gif\")).getImage();\n\t\tp3Img37.setIcon(new ImageIcon(img37));\n\t\tp3Img37.setBounds(92, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img37);\n\t\t\n\t\tJButton p3Img38 = new JButton(\"\");\n\t\tp3Img38.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk12++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k12==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[37];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[37].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 37);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img38=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img38.setIcon(new ImageIcon(img38));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[37]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[37].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk12=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 37);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img38=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img38.setIcon(new ImageIcon(img38));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[37];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[37]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk12=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img38=new ImageIcon(this.getClass().getResource(\"/\"+deck[37]+\".gif\")).getImage();\n\t\tp3Img38.setIcon(new ImageIcon(img38));\n\t\tp3Img38.setBounds(174, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img38);\n\t\t\n\t\tJButton p3Img39 = new JButton(\"\");\n\t\tp3Img39.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==4) {\n\t\t\t\t\tk13++;\n\t\t\t\t\tplayer3++;\n\t\t\t\t\tif(player3==1){\n\t\t\t\t\t\tif(k13==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[38];\n\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\tch=deck[38].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 38);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img39=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp3Img39.setIcon(new ImageIcon(img39));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\tdeck[38]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[38].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=26;i<39;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tk13=0;\n\t\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard34=new ImageIcon(this.getClass().getResource(\"/\"+deck[33]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p3Card.setIcon(new ImageIcon(playCard34));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 38);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img39=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp3Img39.setIcon(new ImageIcon(img39));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[38];\n\t\t\t\t\t\t\t\t\tplayerList[index]=4;\n\t\t\t\t\t\t\t\t\tselectPlayer=1;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[38]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tk13=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img39=new ImageIcon(this.getClass().getResource(\"/\"+deck[38]+\".gif\")).getImage();\n\t\tp3Img39.setIcon(new ImageIcon(img39));\n\t\tp3Img39.setBounds(256, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Img39);\n\t\t\n\t\tJButton p4Img40 = new JButton(\"\"); //............................Player 4..............................\n\t\tp4Img40.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl1++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l1==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[39];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[39].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard40=new ImageIcon(this.getClass().getResource(\"/\"+deck[39]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard40));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 39);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img40=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img40.setIcon(new ImageIcon(img40));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[39]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[39].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl1=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard40=new ImageIcon(this.getClass().getResource(\"/\"+deck[39]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard40));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 39);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img40=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img40.setIcon(new ImageIcon(img40));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[39];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[39]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl1=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t\t/*if(l1==1){\n\t\t\t\t\tImage playCard40=new ImageIcon(this.getClass().getResource(\"/\"+deck[39]+\".gif\")).getImage();\n\t\t\t\t\tp4Card.setIcon(new ImageIcon(playCard40));\n\t\t\t\t\t\n\t\t\t\t\tImage img40=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\tp4Img40.setIcon(new ImageIcon(img40));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played\");\n\t\t\t\t}*/\n\t\t\t}\n\t\t});\n\t\tImage img40=new ImageIcon(this.getClass().getResource(\"/\"+deck[39]+\".gif\")).getImage();\n\t\tp4Img40.setIcon(new ImageIcon(img40));\n\t\tp4Img40.setBounds(739, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img40);\n\t\t\n\t\tJButton p4Img41 = new JButton(\"\");\n\t\tp4Img41.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl2++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l2==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[40];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[40].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard41=new ImageIcon(this.getClass().getResource(\"/\"+deck[40]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard41));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 40);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img41=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img41.setIcon(new ImageIcon(img41));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[40]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[40].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl2=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard41=new ImageIcon(this.getClass().getResource(\"/\"+deck[40]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard41));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 40);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img41=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img41.setIcon(new ImageIcon(img41));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[40];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[40]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl2=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img41=new ImageIcon(this.getClass().getResource(\"/\"+deck[40]+\".gif\")).getImage();\n\t\tp4Img41.setIcon(new ImageIcon(img41));\n\t\tp4Img41.setBounds(821, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img41);\n\t\t\n\t\tJButton p4Img42 = new JButton(\"\");\n\t\tp4Img42.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl3++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l3==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[41];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[41].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard42=new ImageIcon(this.getClass().getResource(\"/\"+deck[41]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard42));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 41);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img42=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img42.setIcon(new ImageIcon(img42));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[41]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[41].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl3=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard42=new ImageIcon(this.getClass().getResource(\"/\"+deck[41]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard42));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 41);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img42=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img42.setIcon(new ImageIcon(img42));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[41];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[41]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl3=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img42=new ImageIcon(this.getClass().getResource(\"/\"+deck[41]+\".gif\")).getImage();\n\t\tp4Img42.setIcon(new ImageIcon(img42));\n\t\tp4Img42.setBounds(903, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img42);\n\t\t\n\t\tJButton p4Img43 = new JButton(\"\");\n\t\tp4Img43.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl4++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l4==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[42];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[42].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard43=new ImageIcon(this.getClass().getResource(\"/\"+deck[42]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard43));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 42);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img43=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img43.setIcon(new ImageIcon(img43));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[42]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[42].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl4=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard43=new ImageIcon(this.getClass().getResource(\"/\"+deck[42]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard43));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 42);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img43=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img43.setIcon(new ImageIcon(img43));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[42];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tdeck[42]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl4=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for Player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img43=new ImageIcon(this.getClass().getResource(\"/\"+deck[42]+\".gif\")).getImage();\n\t\tp4Img43.setIcon(new ImageIcon(img43));\n\t\tp4Img43.setBounds(985, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img43);\n\t\t\n\t\tJButton p4Img44 = new JButton(\"\");\n\t\tp4Img44.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl5++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l5==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[43];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[43].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard44=new ImageIcon(this.getClass().getResource(\"/\"+deck[43]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard44));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 43);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img44=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img44.setIcon(new ImageIcon(img44));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[43]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[43].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl5=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard44=new ImageIcon(this.getClass().getResource(\"/\"+deck[43]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard44));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 43);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img44=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img44.setIcon(new ImageIcon(img44));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[43];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[43]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl5=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img44=new ImageIcon(this.getClass().getResource(\"/\"+deck[43]+\".gif\")).getImage();\n\t\tp4Img44.setIcon(new ImageIcon(img44));\n\t\tp4Img44.setBounds(1067, 11, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img44);\n\t\t\n\t\tJButton p4Img45 = new JButton(\"\");\n\t\tp4Img45.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl6++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l6==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[44];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[44].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard45=new ImageIcon(this.getClass().getResource(\"/\"+deck[44]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard45));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 44);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img45=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img45.setIcon(new ImageIcon(img45));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[44]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[44].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl6=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard45=new ImageIcon(this.getClass().getResource(\"/\"+deck[44]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard45));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 44);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img45=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img45.setIcon(new ImageIcon(img45));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[44];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[44]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl6=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img45=new ImageIcon(this.getClass().getResource(\"/\"+deck[44]+\".gif\")).getImage();\n\t\tp4Img45.setIcon(new ImageIcon(img45));\n\t\tp4Img45.setBounds(821, 116, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img45);\n\t\t\n\t\tJButton p4Img46 = new JButton(\"\");\n\t\tp4Img46.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl7++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l7==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[45];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[45].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard46=new ImageIcon(this.getClass().getResource(\"/\"+deck[45]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard46));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 45);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img46=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img46.setIcon(new ImageIcon(img46));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[45]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[45].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl7=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard46=new ImageIcon(this.getClass().getResource(\"/\"+deck[45]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard46));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 45);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img46=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img46.setIcon(new ImageIcon(img46));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[45];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[45]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl7=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img46=new ImageIcon(this.getClass().getResource(\"/\"+deck[45]+\".gif\")).getImage();\n\t\tp4Img46.setIcon(new ImageIcon(img46));\n\t\tp4Img46.setBounds(903, 116, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img46);\n\t\t\n\t\tJButton p4Img47 = new JButton(\"\");\n\t\tp4Img47.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl8++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l8==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[46];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[46].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 46);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img47=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img47.setIcon(new ImageIcon(img47));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[46]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[46].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl8=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 46);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img47=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img47.setIcon(new ImageIcon(img47));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[46];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[46]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl8=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\tp4Img47.setIcon(new ImageIcon(img47));\n\t\tp4Img47.setBounds(985, 116, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img47);\n\t\t\n\t\tJButton p4Img48 = new JButton(\"\");\n\t\tp4Img48.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl9++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l9==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[47];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[47].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 47);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img48=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img48.setIcon(new ImageIcon(img48));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[47]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[47].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl9=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 47);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img48=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img48.setIcon(new ImageIcon(img48));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[47];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[47]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl9=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img48=new ImageIcon(this.getClass().getResource(\"/\"+deck[47]+\".gif\")).getImage();\n\t\tp4Img48.setIcon(new ImageIcon(img48));\n\t\tp4Img48.setBounds(1067, 111, 72, 99);\n\t\tfrmCardGame.getContentPane().add(p4Img48);\n\t\t\n\t\tJButton p4Img49 = new JButton(\"\");\n\t\tp4Img49.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl10++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l10==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[48];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[48].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 48);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img49=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img49.setIcon(new ImageIcon(img49));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[48]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[48].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl10=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 48);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img49=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img49.setIcon(new ImageIcon(img49));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[48];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[48]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl10=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img49=new ImageIcon(this.getClass().getResource(\"/\"+deck[48]+\".gif\")).getImage();\n\t\tp4Img49.setIcon(new ImageIcon(img49));\n\t\tp4Img49.setBounds(821, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img49);\n\t\t\n\t\tJButton p4Img50 = new JButton(\"\");\n\t\tp4Img50.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl11++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l11==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[49];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[49].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 49);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img50=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img50.setIcon(new ImageIcon(img50));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[49]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[49].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl11=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 49);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img50=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img50.setIcon(new ImageIcon(img50));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[49];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[49]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl11=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img50=new ImageIcon(this.getClass().getResource(\"/\"+deck[49]+\".gif\")).getImage();\n\t\tp4Img50.setIcon(new ImageIcon(img50));\n\t\tp4Img50.setBounds(903, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img50);\n\t\t\n\t\tJButton p4Img51 = new JButton(\"\");\n\t\tp4Img51.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl12++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l12==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[50];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[50].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 50);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img51=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img51.setIcon(new ImageIcon(img51));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[50]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[50].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl12=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 50);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img51=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img51.setIcon(new ImageIcon(img51));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[50];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[50]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl12=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img51=new ImageIcon(this.getClass().getResource(\"/\"+deck[50]+\".gif\")).getImage();\n\t\tp4Img51.setIcon(new ImageIcon(img51));\n\t\tp4Img51.setBounds(985, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img51);\n\t\t\n\t\tJButton p4Img52 = new JButton(\"\");\n\t\tp4Img52.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\tif (selectPlayer==3) {\n\t\t\t\t\tl13++;\n\t\t\t\t\tplayer4++;\n\t\t\t\t\tif(player4==1){\n\t\t\t\t\t\tif(l13==1){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Check from here\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(index==0){\n\t\t\t\t\t\t\t\tgetCard[index]=deck[51];\n\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\tch=deck[51].charAt(1);\n\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\tSetPlayerCard(index, 51);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tImage img52=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\tp4Img52.setIcon(new ImageIcon(img52));\n\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\tdeck[51]=\"ok\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tif(deck[51].charAt(1) != ch){\n\t\t\t\t\t\t\t\t\tfor(int i=39;i<52;i++){\n\t\t\t\t\t\t\t\t\t\tif(deck[i].charAt(1)==ch){\n\t\t\t\t\t\t\t\t\t\t\tconfirm=1;\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(confirm ==1){\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please don't cheat !\");\n\t\t\t\t\t\t\t\t\tconfirm=0;\n\t\t\t\t\t\t\t\t\tl13=0;\n\t\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//Image playCard47=new ImageIcon(this.getClass().getResource(\"/\"+deck[46]+\".gif\")).getImage();\n\t\t\t\t\t\t\t\t\t//p4Card.setIcon(new ImageIcon(playCard47));\n\t\t\t\t\t\t\t\t\tSetPlayerCard(index, 51);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tImage img52=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\t\t\t\tp4Img52.setIcon(new ImageIcon(img52));\n\t\t\t\t\t\t\t\t\tgetCard[index]=deck[51];\n\t\t\t\t\t\t\t\t\tplayerList[index]=3;\n\t\t\t\t\t\t\t\t\tselectPlayer++;\n\t\t\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\t\t\tdeck[51]=\"ok\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(index==4){\n\t\t\t\t\t\t\t\twinPlayerIndex=gameCodeObj.SelectPlayer(getCard, playerList);\n\t\t\t\t\t\t\t\twinPlayer=playerList[winPlayerIndex];\n\t\t\t\t\t\t\t\tSetScore(winPlayer);\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Player \"+winPlayer+\" has won this trick.\");\n\t\t\t\t\t\t\t\tselectPlayer=winPlayer;\n\t\t\t\t\t\t\t\tindex=0;\n\t\t\t\t\t\t\t\tplayer1=0;\n\t\t\t\t\t\t\t\tplayer2=0;\n\t\t\t\t\t\t\t\tplayer3=0;\n\t\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"This card has already been played.\");\n\t\t\t\t\t\t\tplayer4=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your turn is on running! Please wait for next turn.\");\n\t\t\t\t\t\tl13=0;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Its time for player \"+selectPlayer);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tImage img52=new ImageIcon(this.getClass().getResource(\"/\"+deck[51]+\".gif\")).getImage();\n\t\tp4Img52.setIcon(new ImageIcon(img52));\n\t\tp4Img52.setBounds(1067, 221, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Img52);\n\t\t\n\t\tJSeparator separator = new JSeparator();\n\t\tseparator.setBounds(10, 333, 318, -7);\n\t\tfrmCardGame.getContentPane().add(separator);\n\t\t\n\t\tJSeparator separator_1 = new JSeparator();\n\t\tseparator_1.setForeground(Color.ORANGE);\n\t\tseparator_1.setBackground(Color.ORANGE);\n\t\tseparator_1.setBounds(10, 327, 318, 8);\n\t\tfrmCardGame.getContentPane().add(separator_1);\n\t\t\n\t\tJSeparator separator_2 = new JSeparator();\n\t\tseparator_2.setForeground(Color.ORANGE);\n\t\tseparator_2.setBackground(Color.ORANGE);\n\t\tseparator_2.setBounds(821, 326, 318, 8);\n\t\tfrmCardGame.getContentPane().add(separator_2);\n\t\t\n\t\tp1Card = new JLabel(\"\");\n\t\tp1Card.setBounds(400, 285, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p1Card);\n\t\t\n\t\tp2Card = new JLabel(\"\");\n\t\tp2Card.setBounds(482, 285, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p2Card);\n\t\t\n\t\tp3Card = new JLabel(\"\");\n\t\tp3Card.setBounds(564, 285, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p3Card);\n\t\t\n\t\tp4Card = new JLabel(\"\");\n\t\tp4Card.setBounds(646, 282, 72, 94);\n\t\tfrmCardGame.getContentPane().add(p4Card);\n\t\t\n\t\tJLabel lblPlayerScore = new JLabel(\"Player 4 Score :\");\n\t\tlblPlayerScore.setBounds(363, 133, 109, 22);\n\t\tfrmCardGame.getContentPane().add(lblPlayerScore);\n\t\t\n\t\tlblp4Score = new JLabel(\"\");\n\t\tlblp4Score.setBounds(373, 154, 53, 22);\n\t\tfrmCardGame.getContentPane().add(lblp4Score);\n\t\t\n\t\tJLabel lblPlayerScore_1 = new JLabel(\"Player 3 Score :\");\n\t\tlblPlayerScore_1.setBounds(690, 137, 121, 22);\n\t\tfrmCardGame.getContentPane().add(lblPlayerScore_1);\n\t\t\n\t\tlblp3Score = new JLabel(\"\");\n\t\tlblp3Score.setBounds(719, 170, 53, 22);\n\t\tfrmCardGame.getContentPane().add(lblp3Score);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"Player 1 Score :\");\n\t\tlblNewLabel.setBounds(373, 426, 121, 22);\n\t\tfrmCardGame.getContentPane().add(lblNewLabel);\n\t\t\n\t\tlblp1Score = new JLabel(\"\");\n\t\tlblp1Score.setBounds(383, 451, 53, 22);\n\t\tfrmCardGame.getContentPane().add(lblp1Score);\n\t\t\n\t\tJLabel lblPlayerScore_2 = new JLabel(\"Player 2 Score :\");\n\t\tlblPlayerScore_2.setBounds(690, 430, 109, 27);\n\t\tfrmCardGame.getContentPane().add(lblPlayerScore_2);\n\t\t\n\t\tlblp2Score = new JLabel(\"\");\n\t\tlblp2Score.setBounds(711, 451, 53, 22);\n\t\tfrmCardGame.getContentPane().add(lblp2Score);\n\t\t//System.out.println(i);\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n\n JButton jb = (JButton) e.getSource();\n if(jb == next_button){\n\n layout.extractInformation(number_of_rows,number_of_cols,dataEntries);\n JOptionPane.showMessageDialog(this, \"Your input has been successfully acquired. Press OK to continue.\\n\");\n this.setVisible(false);\n AdminGUI startGui = new AdminGUI(dataEntries , layout);\n //TODO: Uncomment layout start\n layout.start();\n }\n\n\n }", "private void makeButtons() {\n inputPanel = new JPanel();\n\n final JLabel hintLabel = new JLabel(\"Please enter a number then press Add Players to Start the Game\");\n final JTextField maxPlayerNumber = new JTextField(10);\n\n //Add Player Button\n JButton addButton = new JButton(\"Add Players\");\n addButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n clearTextArea();\n control.setCheck(false);\n int input = Integer.parseInt(maxPlayerNumber.getText());\n control.newPlayers(input);\n treasury.setText(control.showRoom(\"Treasury\"));\n } catch (NumberFormatException n) {\n hintLabel.setText(\"You need to enter an number before pressing Add Players\");\n hintLabel.setForeground(Color.RED);\n }\n\n }\n });\n\n //Next move\n JButton startButton = new JButton(\"Next Move\");\n startButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n clearTextArea();\n maxPlayerNumber.setText(\" \");\n if(control.wasGameWon() == true) {\n infoText.setText(\"GameOver\");\n }\n else {\n hintLabel.setText(\"Please enter a number then press Add Players to Start the Game\");\n hintLabel.setForeground(Color.BLACK);\n infoText.setText(control.movePlayer());\n prison.setText(control.showRoom(\"Prison\"));\n market.setText(control.showRoom(\"Market\"));\n altar.setText(control.showRoom(\"Altar\"));\n embassy.setText(control.showRoom(\"Embassy\"));\n treasury.setText(control.showRoom(\"Treasury\"));\n academy.setText(control.showRoom(\"Academy\"));\n }\n }\n });\n\n //Restart button\n JButton restartButton = new JButton(\"New Game\");\n restartButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n control = new Game_Controller();\n clearTextArea();\n hintLabel.setText(\"Please enter a number then press Add Players to Start the Game\");\n hintLabel.setForeground(Color.BLACK);\n }\n });\n\n //Quit Game button\n JButton endButton = new JButton(\"Quit Game\");\n endButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n System.exit(1);\n }\n });\n\n inputPanel.add(hintLabel);\n inputPanel.add(maxPlayerNumber);\n inputPanel.add(addButton);\n inputPanel.add(startButton);\n inputPanel.add(restartButton);\n inputPanel.add(endButton);\n }", "public void actionPerformed(ActionEvent e)\n {\n //sets correct or wrong notes to invisible\n response.setVisible(false); \n response2.setVisible(false); \n if(correct) //if answer inputed was correct - set in enter button\n {\n if(x <= 1) //keeps track of which problem user is on\n {\n x++;\n tf.setText(questions[x]); //next question\n }\n else\n {\n //if all problems are solved class segways to next part of game\n game.setVisible(true); \n end.setVisible(true); \n }\n }\n \n correct = false; \n }", "public void updateDisplay()\r\n {\r\n boardpanel.removeAll();\r\n for(int i = 0; i < 3; i++)\r\n {\r\n for(int j = 0; j < 3; j++)\r\n {\r\n if(buttons[i][j].getText().charAt(0) == ' ') {\r\n buttons[i][j].setEnabled(true);\r\n }\r\n else\r\n {\r\n buttons[i][j].setEnabled(false);\r\n }\r\n boardpanel.add(buttons[i][j]);\r\n }\r\n }\r\n }", "private JFrame menu(){ \r\n //game type buttons\r\n JButton single = new JButton(\"Player VS Player\");\r\n JButton multiple = new JButton(\"Player VS Computer\");\r\n \r\n JPanel buttonPanel = new JPanel();\r\n buttonPanel.setBackground(Color.YELLOW);\r\n \r\n buttonPanel.add(single);\r\n single.addActionListener(new ActionListener()\r\n {\r\n public void actionPerformed(ActionEvent e) //event handler\r\n {\r\n gameType = 1;\r\n single.setBackground(Color.green);\r\n multiple.setBackground(Color.red);\r\n \r\n }\r\n });\r\n \r\n buttonPanel.add(multiple);\r\n multiple.addActionListener(new ActionListener()\r\n {\r\n public void actionPerformed(ActionEvent e) //event handler\r\n {\r\n gameType = 2;\r\n single.setBackground(Color.red);\r\n multiple.setBackground(Color.green);\r\n \r\n }\r\n });\r\n \r\n JPanel sizePanel = new JPanel();\r\n sizePanel.setBackground(Color.BLUE);\r\n //text field size girilmesi için\r\n JTextField size = new JTextField(\"Enter a Size ->\",8);\r\n size.setEditable(false);\r\n size.setBackground(Color.ORANGE);\r\n JTextField input = new JTextField(3);\r\n input.setBackground(Color.ORANGE);\r\n JButton enter = new JButton(\"Enter\");\r\n sizePanel.add(size);\r\n sizePanel.add(input);\r\n sizePanel.add(enter);\r\n \r\n JPanel user1Panel = new JPanel();\r\n user1Panel.setBackground(Color.BLUE);\r\n JLabel user1 = new JLabel();\r\n user1.setIcon(new ImageIcon(\"src\\\\user 1.png\")); //user1 symbol image\r\n user1Panel.add(user1);\r\n \r\n JPanel user2Panel = new JPanel();\r\n user2Panel.setBackground(Color.BLUE);\r\n JLabel user2 = new JLabel();\r\n user2.setIcon(new ImageIcon(\"src\\\\user 2.png\")); //user2 symbol image\r\n user2Panel.add(user2);\r\n \r\n enter.addActionListener(new ActionListener()\r\n {\r\n public void actionPerformed(ActionEvent e) //event handler\r\n {\r\n String temp = input.getText();\r\n //girilen size ı okur ve integera çevirir\r\n int finalSize=0;\r\n for(int j=temp.length()-1,k=0; j>=0 ;--j,++k)\r\n finalSize+= Character.getNumericValue(temp.charAt(j))*Math.pow(10, k);\r\n if(finalSize >= 4){ //min sizedan büyükse...\r\n row=column=finalSize;\r\n initCell();\r\n if(gameType == 1 || gameType == 2){\r\n buttonPanel.setVisible(false);\r\n sizePanel.setVisible(false);\r\n playGame();\r\n }\r\n else\r\n JOptionPane.showMessageDialog(null,\"Please choose a Game Type!\");\r\n }\r\n else\r\n JOptionPane.showMessageDialog(null,\"Invalid Size. Try againg!\");\r\n }\r\n });\r\n //panels placement\r\n window.add(buttonPanel,BorderLayout.NORTH);\r\n window.add(sizePanel,BorderLayout.CENTER);\r\n window.add(user1Panel,BorderLayout.WEST);\r\n window.add(user2Panel,BorderLayout.EAST);\r\n \r\n window.validate();\r\n \r\n return window;\r\n }", "@Override\n public void handle(ActionEvent event)\n {\n Object source = event.getSource();\n Button clickedBtn = (Button) source;\n\n //don't allow player to click a computer move\n if(clickedBtn.getText() == \"Y\")\n {\n //show prompt telling user illegal move\n moveBetter = new BetterMove();\n moveBetter.initModality(Modality.APPLICATION_MODAL);\n moveBetter.showAndWait();\n }\n //Allow player to only play non played buttons\n else if(clickedBtn.getText() == \"\" && clickedBtn.getText() != \"Y\")\n {\n //add image to button if user has selected an image\n if(AddDialog.getxImage() == true)\n {\n clickedBtn.setText(null);\n clickedBtn.setPadding(Insets.EMPTY);\n clickedBtn.setGraphic(new ImageView(AddDialog.getXImage()));\n clickedBtn.setId(\"xHasImage\");\n }\n\n //add default x if no image has been selected\n else\n {\n clickedBtn.setText(\"X\");\n }\n playComputer(usedRows, usedCols);\n }\n //get the location in grid where the button clicked is located\n currentX = myPane.getRowIndex(clickedBtn);\n currentY = myPane.getColumnIndex(clickedBtn);\n checkWin(usedRows, usedCols);\n }", "public Connect4Final() { //building the GUI\r\n \r\n setTitle(\"Connect 4\"); //title\r\n setSize(1366, 700); //size of frame\r\n setResizable(false); //setting this to false because if resizeable, the board may become unproportional\r\n \r\n GridLayout layout2 = new GridLayout(7, 9); //layouts\r\n BoxLayout layout3 = new BoxLayout(welcome, BoxLayout.Y_AXIS);\r\n \r\n setLayout(new GridBagLayout()); //setting the Layout of the entire frame to a gridBagLayout\r\n board.setLayout(layout2); //setting layouts of the 2 panels\r\n welcome.setLayout(layout3);\r\n \r\n welcome.setBorder(BorderFactory.createEmptyBorder(20,20,20,20)); //setting border around the panel\r\n \r\n winCounter.setFont(small);\r\n welcome.add(winCounter);\r\n winCounter.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n winCounter.add(Box.createRigidArea(new Dimension(0,75)));\r\n \r\n welcomelabel.setFont(f); //setting fonts\r\n welcome.add(welcomelabel);\r\n welcomelabel.setAlignmentX(Component.CENTER_ALIGNMENT); //adding the labels one by one and modifying them -- alignment, extra spacing, size etc.\r\n welcome.add(Box.createRigidArea(new Dimension(0,75)));\r\n \r\n instructions.setFont(f); //setting fonts\r\n welcome.add(instructions);\r\n instructions.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75))); //creates extra space after each label\r\n \r\n welcome.add(input); \r\n welcome.add(Box.createRigidArea(new Dimension(0,75)));\r\n input.setMaximumSize(new Dimension(200, 25)); //sets the maximum size of textfield\r\n \r\n welcome.add(okButton);\r\n welcome.add(Box.createRigidArea(new Dimension(0,75)));\r\n okButton.setAlignmentX(Component.CENTER_ALIGNMENT); //aligns all the components by their center on the x axis of the panel\r\n \r\n for(int i = 0; i<7; i++){\r\n columnarray[i] = new JButton(\" \"+Integer.toString(i+1)); //adding the column numbers as buttons to the board panel and formatting them preoperly\r\n columnarray[i].setHorizontalAlignment(SwingConstants.LEFT);\r\n columnarray[i].addActionListener(this);\r\n columnarray[i].setBackground(rgb); \r\n columnarray[i].setBorderPainted(false);\r\n board.add(columnarray[i]);\r\n }\r\n \r\n for(int i = 0; i<ROW; i++){\r\n for(int j = 0; j<COL; j++){\r\n arrayCircles[i][j] = new DrawCircle(); //adding the circles to the board panel\r\n board.add(arrayCircles[i][j]);\r\n }\r\n }\r\n \r\n okButton.addActionListener(this); //adding all the actionlisteners\r\n pvp.addActionListener(this);\r\n pvai.addActionListener(this);\r\n black.addActionListener(this);\r\n red.addActionListener(this);\r\n yellow.addActionListener(this);\r\n green.addActionListener(this);\r\n okayButton.addActionListener(this);\r\n easyAI.addActionListener(this);\r\n hardAI.addActionListener(this);\r\n again.addActionListener(this);\r\n notAgain.addActionListener(this);\r\n \r\n add(welcome, makeConstraints(0,0,3,20)); //adding the panels to the frame with specified parameters on where they go\r\n add(board, makeConstraints(3,0,10,20));\r\n \r\n welcome.setPreferredSize(new Dimension(3, 30)); //setting the preferred size of the welcome panel\r\n \r\n board.setBackground(rgb); //setting the background of the board to be a specific customizable colour\r\n \r\n setVisible(true); //setting the frame to be visible\r\n }", "private void setupCustomGame() {\n\n JFrame custom = new JFrame(\"Custom\");\n JPanel panel = new JPanel();\n JLabel rowslabel = new JLabel(\"Number of rows:\");\n JLabel columnslabel = new JLabel(\"Number of columns:\");\n JLabel mineslabel = new JLabel(\"Number of mines:\");\n JLabel wronginput = new JLabel(\"Please enter integers.\");\n wronginput.setVisible(false);\n JTextField rowinput = new JTextField();\n JTextField columninput = new JTextField();\n JTextField mineinput = new JTextField();\n JButton confirm = new JButton(\"Confirm\");\n JButton cancel = new JButton(\"Cancel\");\n\n confirm.addActionListener((ActionEvent e) -> {\n int customRows = 9, customCols = 9, customMines = 10;\n boolean customIsMade = false;\n try {\n customRows = Integer.parseInt(rowinput.getText());\n customCols = Integer.parseInt(columninput.getText());\n customMines = Integer.parseInt(mineinput.getText());\n if (customRows < 6) {\n customRows = 6;\n }\n if (customCols < 6) {\n customCols = 6;\n }\n if (customMines < 2) {\n customMines = 2;\n }\n customIsMade = true;\n } catch (NumberFormatException ex) {\n wronginput.setVisible(true);\n }\n if (customIsMade) {\n frame.dispose();\n createNewGame(customRows, customCols, customMines);\n custom.dispose();\n }\n });\n\n cancel.addActionListener((ActionEvent e) -> {\n custom.dispose();\n });\n\n /**\n * Pressing enter key to start game as it is more convenient than\n * pressing confirm button\n */\n KeyListener k = new KeyAdapter() {\n public void keyPressed(KeyEvent e) {\n if (e.getKeyCode() == KeyEvent.VK_ENTER) {\n confirm.doClick();\n }\n }\n };\n\n rowinput.addKeyListener(k);\n columninput.addKeyListener(k);\n mineinput.addKeyListener(k);\n rowinput.setPreferredSize(new Dimension(30, 30));\n columninput.setPreferredSize(new Dimension(30, 30));\n mineinput.setPreferredSize(new Dimension(30, 30));\n\n panel.add(wronginput);\n panel.add(rowslabel);\n panel.add(rowinput);\n panel.add(columnslabel);\n panel.add(columninput);\n panel.add(mineslabel);\n panel.add(mineinput);\n panel.add(confirm);\n panel.add(cancel);\n\n custom.setResizable(false);\n custom.add(panel);\n custom.setLocationRelativeTo(null);\n custom.setSize(220, 200);\n custom.setVisible(true);\n }", "public void actionPerformed(ActionEvent event) {\n if (event.getActionCommand().equals(EDIT)) {\n if (!canvas.isAncestorOf(colorChooserPanel)) {\n colorChooser.setColor(currentColor);\n \n // Add the colorChooserPanel.\n canvas.addAsFrame(colorChooserPanel);\n colorChooserPanel.requestFocus();\n parent.setEnabled(false);\n // No repainting needed apparently.\n }\n }\n else if (event.getActionCommand().equals(OK)) {\n currentColor = colorChooser.getColor();\n \n if ((lastRow >= 0) && (lastRow < players.size())) {\n Player player = getPlayer(lastRow);\n player.setColor(currentColor);\n }\n \n // Remove the colorChooserPanel.\n canvas.remove(colorChooserPanel);\n parent.setEnabled(true);\n // No repainting needed apparently.\n \n fireEditingStopped();\n }\n else if (event.getActionCommand().equals(CANCEL)) {\n // Remove the colorChooserPanel.\n canvas.remove(colorChooserPanel);\n parent.setEnabled(true);\n // No repainting needed apparently.\n \n fireEditingCanceled();\n }\n else {\n logger.warning(\"Invalid action command\");\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n DiscardAmmoOrPowerUpToPayTargeting discardAmmoOrPowerUpToPayTargeting = new DiscardAmmoOrPowerUpToPayTargeting(\"\", event.getNicknameInvolved());\n switch (e.getActionCommand()){\n case \"BlueAmmo\":\n discardAmmoOrPowerUpToPayTargeting.setBlueAmmo(true);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n\n case \"RedAmmo\":\n discardAmmoOrPowerUpToPayTargeting.setRedAmmo(true);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n\n case \"YellowAmmo\":\n discardAmmoOrPowerUpToPayTargeting.setYellowAmmo(true);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n\n default:\n\n String[] nameAndColor = e.getActionCommand().split(\",\");\n for(ServerEvent.AliasCard card : mainFrame.getRemoteView().getMyPlayerBoardView().getPowerUpCardsDeck()){\n if(card.getName().equals(nameAndColor[0])&& card.getColor().toString().equalsIgnoreCase(nameAndColor[1])) {\n discardAmmoOrPowerUpToPayTargeting.setPowerUpCard(card);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n }\n }\n }\n\n }", "public void display(){\r\n dlgValidationChks =new CoeusDlgWindow(mdiForm,\"Validation Rules\",true);\r\n dlgValidationChks.addWindowListener(new WindowAdapter(){\r\n public void windowOpened(WindowEvent we){\r\n btnOk.requestFocusInWindow();\r\n btnOk.setFocusable(true);\r\n btnOk.requestFocus();\r\n }\r\n });\r\n dlgValidationChks.addEscapeKeyListener( new AbstractAction(\"escPressed\") {\r\n public void actionPerformed(ActionEvent ar) {\r\n try{\r\n dlgValidationChks.dispose();\r\n }catch(Exception exc){\r\n exc.printStackTrace();\r\n }\r\n }\r\n });\r\n try{\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n dlgValidationChks.setSize(WIDTH, HEIGHT);\r\n Dimension dlgSize = dlgValidationChks.getSize();\r\n dlgValidationChks.setLocation(screenSize.width/2 - (dlgSize.width/2),\r\n screenSize.height/2 - (dlgSize.height/2));\r\n dlgValidationChks.getContentPane().add( this );\r\n dlgValidationChks.setResizable(false);\r\n dlgValidationChks.setVisible(true);\r\n }catch(Exception exc){\r\n exc.printStackTrace();\r\n }\r\n }", "public void actionPerformed(ActionEvent e)\n {\n //sets correct or wrong notes to invisible\n response.setVisible(false);\n response2.setVisible(false); \n if(points[x] == value) //checks if input matches answer\n {\n correct = true; \n response2.setVisible(true); //tells user they were correct\n }\n else\n {\n response.setVisible(true); //tells user they were wrong\n }\n \n //empties beaker \n lab3.setVisible(false); \n lab4.setVisible(false);\n lab5.setVisible(false);\n lab6.setVisible(false);\n lab7.setVisible(false);\n\n value = 0; //value to initial position and\n y = 610; //resets y coordinate \n }", "private void initGUI() {\r\n\t\tfinal int screenSize = 1000;\r\n\t\tfinal int buttonSize = screenSize / GameLogic.BOARD_SIZE;\r\n\r\n\t\tJPanel panel = new JPanel(new GridLayout(GameLogic.BOARD_SIZE, GameLogic.BOARD_SIZE));\r\n\t\tsetContentPane(panel);\r\n\t\tsetSize(screenSize, screenSize);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetTitle(\"Minesweeper Game\");\r\n\r\n\t\t// Initialize grid\r\n\t\tfor (int i = 0; i < GameLogic.BOARD_SIZE; ++i) {\r\n\t\t\tfor (int j = 0; j < GameLogic.BOARD_SIZE; ++j) {\r\n\t\t\t\tJButton button = new JButton();\r\n\t\t\t\tbutton.setFont(BUTTON_FONT);\r\n\t\t\t\tbutton.setFocusable(false);\r\n\t\t\t\tbutton.setPreferredSize(new Dimension(buttonSize, buttonSize));\r\n\t\t\t\tbutton.addActionListener(listener(i, j));\r\n\r\n\t\t\t\tboardButtons[i][j] = button;\r\n\t\t\t\tpanel.add(button, constr(i, j));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpanel.setFocusable(true);\r\n\t\tpanel.addKeyListener(new KeyListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyPressed(KeyEvent ke) {\r\n\t\t\t\tisCtrlPressed = ke.isControlDown();\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void keyReleased(KeyEvent ke) {\r\n\t\t\t\tisCtrlPressed = ke.isControlDown();\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent ke) {\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}", "public void initialize() {\r\n\r\n\t\t// Assign1, Add control button\r\n\t\tFlowLayout fl = new FlowLayout();\r\n\t\tfl.setAlignment(FlowLayout.LEFT);\r\n\t\tthis.setLayout(fl);\r\n\t\tswitcher = new JButton(\"Switch Player:black\");\r\n\t\tswitcher.setEnabled(false);\r\n\t\tswitcher.addActionListener(this);\r\n\t\tconfirm = new JButton(\"Confirm\");\r\n\t\tconfirm.setEnabled(false);\r\n\t\tconfirm.addActionListener(this);\r\n\t\tthis.add(switcher);\r\n\t\tthis.add(confirm);\r\n\t\tswitcher.setBounds(520, 200, 50, 20);\r\n\t\tconfirm.setBounds(520, 400, 50, 20);\r\n\r\n\t\t// Assign1, Add message upper from the board\r\n\t\tt = new JLabel();\r\n\t\tt.setVerticalAlignment(JLabel.TOP);\r\n\t\tthis.add(t);\r\n\t\tt.setVisible(true);\r\n\r\n\t\t// Assign1, Get layer object, which in order to enable layering of JFrame\r\n\t\tlp = this.getLayeredPane();\r\n\r\n\t\t// Define board by JPanel with a 8*8 GridLayout\r\n\t\t// Put red and white board\r\n\t\tboardBg = new JPanel();\r\n\t\tboardBg.setLayout(new GridLayout(8, 8));\r\n\t\tfor (int i = 0; i < 8 * 8; i++) {\r\n\t\t\t// Assign1, Put red board\r\n\t\t\tif ((i % 2 == 0 && (i / 8) % 2 == 1)\r\n\t\t\t\t\t|| (i % 2 == 1 && (i / 8) % 2 == 0)) {\r\n\t\t\t\tChessBoardBlock block = new ChessBoardBlock(\"red\", order[i]);\r\n\t\t\t\tblock.addActionListener(this);\r\n\t\t\t\tblock.addMouseListener(this);\r\n\t\t\t\tboard.put(order[i], block);\r\n\t\t\t\tblock.setEnabled(false);\r\n\t\t\t\tblock.setBorderPainted(false);\r\n\t\t\t\tboardBg.add(block);\r\n\t\t\t}\r\n\t\t\t// Assign1, Put white board\r\n\t\t\telse {\r\n\t\t\t\tChessBoardBlock block = new ChessBoardBlock(\"white\", order[i]);\r\n\t\t\t\tblock.addActionListener(this);\r\n\t\t\t\tblock.addMouseListener(this);\r\n\t\t\t\tboard.put(order[i], block);\r\n\t\t\t\tblock.setEnabled(false);\r\n\t\t\t\tblock.setBorderPainted(false);\r\n\t\t\t\tboardBg.add(block);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Assign1, Put pieces on the board, on another same JPanel with 8*8 GridLayout\r\n\t\tbody = new JPanel();\r\n\t\tbody.setLayout(new GridLayout(8, 8));\r\n\r\n\t\t// Assign1, Put board panel and piece panel in different layer by the Integer parameter\r\n\t\tlp.add(boardBg, new Integer(1));\r\n\t\tlp.add(body, new Integer(2));\r\n\t\tboardBg.setBounds(0, 70, 500, 500);\r\n\t\tboardBg.setVisible(true);\r\n\t\tbody.setBounds(0, 70, 500, 500);\r\n\t\tbody.setOpaque(false);// Assign1, Make the upper layer panel transparent so that lower layer can be seen\r\n\t\tbody.setVisible(true);\r\n\t\t\r\n\t\tstatus.setStatusInit();\r\n\r\n\t}", "public void postInitComponents(){\r\n btnOk.addActionListener(this);\r\n btnPrint.addActionListener(this);\r\n btnPrint.setVisible(false);\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n java.awt.Component[] components = {btnOk,btnPrint};\r\n ScreenFocusTraversalPolicy traversePolicy = new ScreenFocusTraversalPolicy( components );\r\n setFocusTraversalPolicy(traversePolicy);\r\n setFocusCycleRoot(true);\r\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 820, 430);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tframe.getContentPane().add(panel, BorderLayout.CENTER);\r\n\t\tpanel.setLayout(new GridLayout(3, 5, 2, 2));\r\n\t\t\r\n\t\tJPanel panel_3 = new JPanel();\r\n\t\tpanel_3.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_3);\r\n\t\tpanel_3.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button1's code action listner\r\n\t\t\r\n\t\tbtnButton = new JButton(\"\");\r\n\t\tbtnButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_3.add(btnButton, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_4 = new JPanel();\r\n\t\tpanel_4.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_4);\r\n\t\tpanel_4.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button2's code action listner\r\n\t\t\r\n\t\t\r\n\t\tbtnButton_1 = new JButton(\"\");\r\n\t\tbtnButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_1.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_1.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_1.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_4.add(btnButton_1, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_5 = new JPanel();\r\n\t\tpanel_5.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_5);\r\n\t\tpanel_5.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t\r\n\t\t//button3's code goes here\r\n\t\t\r\n\t\tbtnButton_2 = new JButton(\"\");\r\n\t\tbtnButton_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_2.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_2.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_2.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_5.add(btnButton_2, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_2);\r\n\t\tpanel_2.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\ttxtTayyabaSuleman = new JTextField();\r\n\t\ttxtTayyabaSuleman.setForeground(Color.GREEN);\r\n\t\ttxtTayyabaSuleman.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\ttxtTayyabaSuleman.setText(\"TAYYABA SULEMAN\");\r\n\t\tpanel_2.add(txtTayyabaSuleman, BorderLayout.CENTER);\r\n\t\ttxtTayyabaSuleman.setColumns(10);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_1);\r\n\t\tpanel_1.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJButton btnReset = new JButton(\"Reset\");\r\n\t\tbtnReset.setForeground(Color.BLUE);\r\n\t\tpanel_1.add(btnReset, BorderLayout.SOUTH);\r\n\t\tbtnReset.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t btnButton.setText(null);//button1\r\n\t\t\t btnButton_1.setText(null);//button2\r\n\t\t\t btnButton_2.setText(null);//button3\r\n\t\t\t btnButton_3.setText(null);//button4\r\n\t\t\t btnButton_4.setText(null);//button5\r\n\t\t\t btnButton_5.setText(null);//button6\r\n\t\t\t btnButton_6.setText(null);//button7\r\n\t\t\t btnButton_7.setText(null);//button8\r\n\t\t\t btnNewButton.setText(null);//button9\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnReset.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\t\r\n\t\tJButton btnExit = new JButton(\"Exit\");\r\n\t\tbtnExit.setForeground(Color.RED);\r\n\t\tpanel_1.add(btnExit, BorderLayout.NORTH);\r\n\t\tbtnExit.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\tbtnExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t frame=new JFrame(\"Exit\");\r\n\t\t if(JOptionPane.showConfirmDialog(frame,\"confirm if you want to exit game\",\r\n\t\t \t\t \"tic tac toe\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_NO_OPTION);\r\n\t\t System.exit(0);\r\n\t\t \r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJPanel panel_6 = new JPanel();\r\n\t\tpanel_6.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_6);\r\n\t\tpanel_6.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button4's code goes here\r\n\t\t\r\n\t\tbtnButton_3 = new JButton(\"\");\r\n\t\tbtnButton_3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_3.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_3.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_3.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tbtnButton_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_6.add(btnButton_3, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_15 = new JPanel();\r\n\t\tpanel_15.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_15);\r\n\t\tpanel_15.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button5's code goes here\r\n\t\t\r\n\t\tbtnButton_4 = new JButton(\"\");\r\n\t\tbtnButton_4.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_4.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_4.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_4.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_4.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_15.add(btnButton_4, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_8 = new JPanel();\r\n\t\tpanel_8.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_8);\r\n\t\tpanel_8.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button6's code goes here\r\n\t\t\r\n\t\tbtnButton_5 = new JButton(\"\");\r\n\t\tbtnButton_5.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_5.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_5.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_5.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_5.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_8.add(btnButton_5, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_13 = new JPanel();\r\n\t\tpanel_13.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_13);\r\n\t\tpanel_13.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJLabel lblPlayerx = new JLabel(\"playerX\");\r\n\t\tlblPlayerx.setForeground(Color.RED);\r\n\t\tpanel_13.add(lblPlayerx, BorderLayout.CENTER);\r\n\t\tlblPlayerx.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\t\r\n\t\tJPanel panel_14 = new JPanel();\r\n\t\tpanel_14.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_14);\r\n\t\tpanel_14.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\ttxtcount_X = new JTextField();\r\n\t\ttxtcount_X.setForeground(Color.RED);\r\n\t\tpanel_14.add(txtcount_X, BorderLayout.CENTER);\r\n\t\ttxtcount_X.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\ttxtcount_X.setText(\"0\");\r\n\t\ttxtcount_X.setColumns(10);\r\n\t\t\r\n\t\tJPanel panel_11 = new JPanel();\r\n\t\tpanel_11.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_11);\r\n\t\tpanel_11.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button7's code goes here\r\n\t\t\r\n\t\tbtnButton_6 = new JButton(\"\");\r\n\t\tbtnButton_6.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tbtnButton_6.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_6.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_6.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_6.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_11.add(btnButton_6, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_16 = new JPanel();\r\n\t\tpanel_16.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_16);\r\n\t\tpanel_16.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button8's code goes here\r\n\t\t\r\n\t\tbtnButton_7 = new JButton(\"\");\r\n\t\tbtnButton_7.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\tbtnButton_7.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_7.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnButton_7.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnButton_7.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tpanel_16.add(btnButton_7, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_12 = new JPanel();\r\n\t\tpanel_12.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_12);\r\n\t\tpanel_12.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\t//button9's code goes here\r\n\t\t\r\n\t\tbtnNewButton = new JButton(\"\");\r\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 48));\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\tbtnNewButton.setText(startgame);\r\n\t\t\t\tif(startgame.equalsIgnoreCase(\"X\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnNewButton.setForeground(Color.RED);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tbtnNewButton.setForeground(Color.blue);\r\n\t\t\t\t}\r\n\t\t\t\tchooseplayer();\r\n\t\t\t\twinninggame();\r\n\t\t\t}\r\n\t\t});\r\n\t\tpanel_12.add(btnNewButton, BorderLayout.CENTER);\r\n\t\t\r\n\t\tJPanel panel_9 = new JPanel();\r\n\t\tpanel_9.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_9);\r\n\t\tpanel_9.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tJLabel lblPlayero = new JLabel(\"PlayerO\");\r\n\t\tlblPlayero.setForeground(Color.BLUE);\r\n\t\tpanel_9.add(lblPlayero, BorderLayout.CENTER);\r\n\t\tlblPlayero.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\t\r\n\t\tJPanel panel_7 = new JPanel();\r\n\t\tpanel_7.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tpanel.add(panel_7);\r\n\t\tpanel_7.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\ttxtcount_o = new JTextField();\r\n\t\ttxtcount_o.setForeground(Color.BLUE);\r\n\t\tpanel_7.add(txtcount_o, BorderLayout.CENTER);\r\n\t\ttxtcount_o.setFont(new Font(\"Tahoma\", Font.PLAIN, 25));\r\n\t\ttxtcount_o.setText(\"0\");\r\n\t\ttxtcount_o.setColumns(10);\r\n\t}", "public void winnerFound() {\r\n\t\tfor (int n = 0; n < 6; n++) {\r\n\t\t\tfor (int m = 0; m < 7; m++) {\r\n\t\t\t\tsquares[n][m].setEnabled(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int a = 0; a < 7; a++) {\r\n\t\t\tbuttons[a].setEnabled(false);\r\n\t\t}\r\n\t\tif (winnerChip != 67) {\r\n\t\t\tint result = JOptionPane.showConfirmDialog(null,\r\n\t\t\t\t\t\" Player \" + (winnerChip - 48) + \" won! Do you want to start a new game?\", null,\r\n\t\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\r\n\t\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\t\tgameReset();\r\n\t\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\t\tbackToMenu.pack();\r\n\t\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\t\tbackToMenu.setVisible(true);\r\n\t\t\t}\r\n\t\t}if (winnerChip == 67) {\r\n\t\t\tint result = JOptionPane.showConfirmDialog(null, \" You lost! Do you want to start a new game?\", null, JOptionPane.YES_NO_OPTION);\r\n\t\t\tif (result == JOptionPane.YES_OPTION) {\r\n\t\t\t\tgameReset();\r\n\t\t\t} else if (result == JOptionPane.NO_OPTION) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \" Click Ok to return to Main Menu\");\r\n\r\n\t\t\t\tJFrame backToMenu = new JFrame(\"Main Menu\");\r\n\r\n\t\t\t\tbackToMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\t\tbackToMenu.getContentPane().add(new MainMenu());\r\n\t\t\t\tbackToMenu.pack();\r\n\t\t\t\tbackToMenu.setSize(750, 650);\r\n\t\t\t\tbackToMenu.setVisible(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String yes) throws Exception {\n int WINDOW_WIDTH = 700;\n int WINDOW_HEIGHT = 700;\n //Array with each units \n String[] Chapter = {\"Cells\",\"Genetics\",\"Circulation & Digestion & Respiration\",\"Plants\",\"Diversity of living things\", \"Evolution\" };\n String show;\n //if user presses unit button, then unit board game appears \n //look at mode option java \n if (yes == \"yes\"){\n show =\"Unit Jeopardy!\"; \n }\n //if user presses the random button, then the random board game appears \n else{\n show=\"Random Jeopardy!\";\n }\n \n //creates a jframe \n JFrame frame = new JFrame(show);\n frame.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n //set width and height \n int width = 6;\n int height = 6;\n //value for \n int l,m,n;\n \n String Qestio,Answe,Section;\n //initiate array for question and answers to the question \n String[][] Question=new String[height][width];\n String[][] Answer=new String[height][width];\n //2 dimensional array, populated by jbuttons \n JButton[][] BLK = new JButton[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n BLK[i][j] = new JButton(new Integer(i*6+j+1).toString());\n JBox.setSize(BLK[i][j], WINDOW_WIDTH / width - 0,\n WINDOW_HEIGHT / height - 36);\n //set desired colour for the buttons \n BLK[i][j].setBackground(Color.WHITE);\n BLK[i][j].setForeground(Color.BLACK);\n BLK[i][j].setBorder(BorderFactory.createRaisedBevelBorder());\n BLK[i][j].setFont(new Font(\"DejaVu Serif\", Font.BOLD, 25));\n \n }\n }\n \n //create button \n JButton[] BLK1 = new JButton[4];\n BLK1[0] = new JButton(\"Go Back\");\n BLK1[1] = new JButton(\"Correct:\"+ score1);\n BLK1[2] = new JButton(\"Wrong:\"+ score2);\n //label textfield \n JTextField text=new JTextField(\"Correct:\");\n JTextField text1=new JTextField(\"Wrong:\");\n JTextField text2=new JTextField(\"Total:\");\n //set desired font, colours for the textfield \n text.setFont(new Font(\"DejaVu Serif\", Font.BOLD, 20)); \n text.setForeground(Color.GREEN);\n text.setBackground(Color.WHITE);\n text1.setFont(new Font(\"DejaVu Serif\", Font.BOLD, 20)); \n text1.setForeground(Color.red);\n text1.setBackground(Color.WHITE);\n text2.setFont(new Font(\"DejaVu Serif\", Font.BOLD, 20)); \n text2.setForeground(Color.BLUE);\n text2.setBackground(Color.WHITE);\n JLabel Res1 = new JLabel(\"Correct:\"+ score1+score2+score3);\n \n //loactions of the jbox in 2 diemensional array \n JBox board =\n JBox.vbox(\n JBox.hbox(BLK1[0]),\n JBox.hbox(BLK[0][0], BLK[0][1], BLK[0][2], BLK[0][3],BLK[0][4], BLK[0][5]),\n JBox.hbox(BLK[1][0], BLK[1][1], BLK[1][2], BLK[1][3],BLK[1][4], BLK[1][5]),\n JBox.hbox(BLK[2][0], BLK[2][1], BLK[2][2], BLK[2][3],BLK[2][4], BLK[2][5]),\n JBox.hbox(BLK[3][0], BLK[3][1], BLK[3][2], BLK[3][3],BLK[3][4], BLK[3][5]),\n JBox.hbox(BLK[4][0], BLK[4][1], BLK[4][2], BLK[4][3],BLK[4][4], BLK[4][5]),\n JBox.hbox(BLK[5][0], BLK[5][1], BLK[5][2], BLK[5][3],BLK[5][4], BLK[5][5]),\n JBox.hbox(text,text1,text2));\n \n //open the frame. Makes it visible \n board.setSize(WINDOW_WIDTH - 20, WINDOW_HEIGHT);\n frame.add(board);\n frame.setVisible(true);\n //read file \n String f1=\"QuestionAnswer.txt\";\n\n try{\n BufferedReader reader = new BufferedReader(new FileReader(f1));\n ArrayList<String> lines = new ArrayList<String>();\n //s is every single line of the file\n String s; \n //S is total file\n String S;\n S=\"\";\n while ((s = reader.readLine()) != null) {\n S=S+s;\n }\n reader.close();\n \n for ( int i = 0; i < height; i++) {\n // one dimensional array created for each unit at the beginning of code\n l = S.indexOf(Chapter[i]);\n if(i<5){\n m = S.indexOf(Chapter[i+1]);\n //begining index is the first unit (l) and the first unit ends before the second unit (m)\n //for loop repeats \n Section=S.substring(l,m);\n }\n else {\n Section=S.substring(l,S.length());\n }\n //Choose questions and answers\n for (int j = 0; j < width; j++) {\n l=Section.indexOf(String.valueOf(j+1)+\". \");\n m=Section.indexOf(\"a. \",1);\n Qestio=Section.substring(l+3, m);\n Question[i][j]=Qestio;\n Section=Section.substring(m,Section.length());\n \n n=Section.indexOf(\"()\",1);\n Answe=Section.substring(2,n);\n Answer[i][j]=Answe;\n }\n }\n \n //back button\n BLK1[0].addActionListener(new ActionListener() {\n \n /**\n *\n * @author Gloria Song\n */ \n public void actionPerformed(ActionEvent e) { \n //if press back, go back to mode option frame. Makes it visible\n new ModeOption().setVisible(true);\n //destroys jfram for the board game \n frame.dispose();\n frame.setVisible(false); \n }});\n \n for ( int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n //Question\n String Que;\n //RightAnswer\n String Right_Answer; \n if (yes == \"yes\"){\n Que = Question[j][i];\n Right_Answer = Answer[j][i]; \n //reset points to 0\n score1 = 0;\n score2 = 0;\n score3 = 0;\n }\n //open board game that is randomized \n else{\n Random rand = new Random();\n int i1 = rand.nextInt(6);\n int j1 = rand.nextInt(6);\n Que = Question[i1][j1];\n Right_Answer = Answer[i1][j1]; \n //reset points to 0\n score1 = 0;\n score2 = 0;\n score3 = 0;\n }\n \n BLK[i][j].addActionListener(new ActionListener() {\n \n public void actionPerformed(ActionEvent e) {\n //compares the users answer to the correct answer \n String your_answer = JOptionPane.showInputDialog(Que);\n JOptionPane.showMessageDialog(null, \"Reference and yours: \"+ Right_Answer +\" Vs \" + your_answer);\n JButton source = (JButton) e.getSource();\n source.setEnabled(false);\n System.out.println(Right_Answer.length());\n System.out.println(your_answer.length());\n\n //adds point if your right\n if (your_answer.equalsIgnoreCase(Right_Answer.trim())) {\n source.setBackground(Color.GREEN);\n score1++;\n text.setText(\"Correct:\"+score1);\n }\n //add point if your wrong \n else {\n source.setBackground(Color.red);\n score2++;\n text1.setText(\"Wrong:\"+score2);\n }\n //adds all points \n total=score1+score2;\n text2.setText(\"Total:\"+total);\n }\n });\n }\n }\n } catch(Exception e){\n\n }\n\n \n }", "public void reset(){\n\t\t\n\t\tframe.setVisible(false);\n\t\t\n\t\tfor(int row=0;row<SIZE;row++){\n\t\t\tfor(int col=0;col<SIZE;col++){\n\t\t\t\tframe.remove(buttonGrid[row][col]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSIZE = promptSIZE();\n\t\t\n\t\tbuttonGrid = new JButton[SIZE][SIZE];\n\t\t\n\t\tfor(int row=0;row<SIZE;row++){\n\t\t\tfor(int col=0;col<SIZE;col++){\n\t\t\t\tbuttonGrid[row][col] = new JButton();\n\t\t\t\tframe.add(buttonGrid[row][col]);\n\t\t\t\tbuttonGrid[row][col].addActionListener(this);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tisFinished = false;\n\t\t\n\t\tengine.SIZE=SIZE;\n\t\tengine.reset();\n\t\t\n\t\t\n\t\tframe.setSize(45*SIZE, 45*SIZE);\n\t\tframe.setLayout(new GridLayout(SIZE, SIZE));\n\t\tframe.setVisible(true);\n\t}", "public void actionPerformed(ActionEvent ae)\n{\n String str = ae.getActionCommand();\n if(str.equals(\"Deal\"))\n {\n\t\t//dealCards();\n\t\tcontrolP.deal.setEnabled(false);\n\t\t//Set rest of buttons active\n\t\tcontrolP.check.setEnabled(true);\n\t\tcontrolP.bet.setEnabled(true);\n\t\tcontrolP.call.setEnabled(false);\n\t\tcontrolP.raise.setEnabled(false);\n\t\tcontrolP.allIn.setEnabled(true);\n\t\tcontrolP.fold.setEnabled(true);\n\n\t\tmain.initGame();\n\n\n\n\t}\n\telse\n\tif(str.equals(\"Bet\"))\n\t{\n\t\tmain.playerBet();\n\t\tmain.userBet = true;\n\t\tmain.userAction = true;\n\t\t//controlP.bet.setEnabled(false);\n\t}\n\telse\n\tif(str.equals(\"Check\"))\n\t{\n\t\tmain.playerCheck();\n\t\tmain.userCheck = true;\n\t\tmain.userAction = true;\n\t\t//controlP.check.setEnabled(false);\n\t}\n\telse\n\tif(str.equals(\"Call\"))\n\t{\n\t\tmain.playerCall();\n\t\tmain.userAction = true;\n\t\tmain.userCall = true;\n\t\t//controlP.call.setEnabled(false);\n\t}\n\telse\n\tif(str.equals(\"Raise\"))\n\t{\n\t\tmain.playerRaise();\n\t\tmain.userAction = true;\n\t\tmain.userRaise = true;\n\t\t//controlP.raise.setEnabled(false);\n\t}\n\telse\n\tif(str.equals(\"All In\"))\n\t{\n\t\tmain.playerAllIn();\n\t\tcontrolP.deal.setEnabled(true);\n\t\tcontrolP.check.setEnabled(false);\n\t\tcontrolP.bet.setEnabled(false);\n\t\tcontrolP.call.setEnabled(false);\n\t\tcontrolP.raise.setEnabled(false);\n\t\tcontrolP.allIn.setEnabled(false);\n\t\tcontrolP.fold.setEnabled(false);\n\t\tmain.userAction = true;\n\t\tmain.userAllIn = true;\n\t\t//controlP.allIn.setEnabled(false);\n\t}\n\telse\n\tif(str.equals(\"Fold\"))\n\t{\n\t\tmain.playerFold();\n\t\tmain.userFold = true;\n\t\tcontrolP.deal.setEnabled(true);\n\t\tcontrolP.check.setEnabled(false);\n\t\tcontrolP.bet.setEnabled(false);\n\t\tcontrolP.call.setEnabled(false);\n\t\tcontrolP.raise.setEnabled(false);\n\t\tcontrolP.allIn.setEnabled(false);\n\t\tcontrolP.fold.setEnabled(false);\n\t}\n\telse\n\tif(str.equals(\"Exit\"))\n\t{\n\t\t//Exit the System\n\t\tint answer = JOptionPane.showConfirmDialog(null, \"Do you really want to exit?\", \"Exit PokerShark\", JOptionPane.YES_NO_OPTION);\n\t\tif(answer == 0)\n\t\t{\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t}\n\n}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t\tObject source = e.getSource();\n\n\t\tif (e.getActionCommand() == \"新建清单\") {\n\t\t\tcard.show(contentPane, \"1_1\");\n\t\t}\n\n\t\tif (e.getActionCommand() == \"查询清单及更新\") {\n\t\t\tcard.show(contentPane, \"1_2\");\n\t\t\tupdateCellsVector_12();\n\t\t\ttable_12.updateUI();\n\t\t}\n\n\t\tif (e.getActionCommand() == \"新建项目\") {\n\t\t\tcard.show(contentPane, \"2_1\");\n\t\t}\n\n\t\tif (e.getActionCommand() == \"查询项目及更新\") {\n\t\t\tcard.show(contentPane, \"2_2\");\n\t\t\tupdateCellsVector_22();\n\t\t\ttable_22.updateUI();\n\t\t}\n\n\t\tif (e.getActionCommand() == \"新建任务\") {\n\t\t\tcard.show(contentPane, \"3_1\");\n\t\t}\n\n\t\tif (e.getActionCommand() == \"查询任务及更新\") {\n\t\t\tcard.show(contentPane, \"3_2\");\n\t\t\tupdateCellsVector_32();\n\t\t\ttable_32.updateUI();\n\t\t}\n\n\t\tif (e.getActionCommand() == \"新建心得\") {\n\t\t\tcard.show(contentPane, \"4_1\");\n\t\t}\n\n\t\tif (e.getActionCommand() == \"查询心得及更新\") {\n\t\t\tcard.show(contentPane, \"4_2\");\n\t\t\tupdateCellsVector_42();\n\t\t\ttable_42.updateUI();\n\t\t}\n\n\t\tif (e.getActionCommand() == \"查询用户分享心得\") {\n\t\t\tcard.show(contentPane, \"4_3\");\n\t\t\tupdateCellsVector_43();\n\t\t\ttable_43.updateUI();\n\t\t}\n\t\tif (e.getActionCommand() == \"查看项目完成情况\") {\n\t\t\tarray = operator.getArray(userEmail);\n\t\t\tChartDemo demo = new ChartDemo(array);\n\t\t\tdemo.pack();\n\t\t\tRefineryUtilities.centerFrameOnScreen(demo);\n\t\t\tdemo.setVisible(true);\n\t\t}\n\n\t\tif (e.getActionCommand() == \"修改密码\") {\n\t\t\tLogin_Change Lg = new Login_Change(userEmail);\n\t\t}\n\n\t\t// 保存清单\n\t\tif (source == button_11) {\n\t\t\tString content = textArea_11.getText().trim();\n\t\t\toperator.insertList(userEmail, content);\n\t\t\ttextArea_11.setText(\"\");\n\t\t}\n\n\t\t// 保存清单记录的修改\n\t\tif (source == button_12_1) {\n\t\t\tString content = textArea_12.getText().trim();\n\t\t\tString cTime = cellsVector_12.get(table_12.getSelectedRow()).get(0);\n\n\t\t\toperator.updateList(content, userEmail, cTime);\n\t\t\tupdateCellsVector_12();\n\t\t\ttable_12.updateUI();\n\n\t\t\ttextArea_12.setText(\"\");\n\n\t\t}\n\n\t\t// 删除所选清单记录\n\t\tif (source == button_12_2) {\n\n\t\t\tString cTime = cellsVector_12.get(table_12.getSelectedRow()).get(0);\n\t\t\toperator.delList(cTime, userEmail);\n\t\t\tupdateCellsVector_12();\n\t\t\ttable_12.updateUI();\n\t\t}\n\n\t\t// 保存项目\n\t\tif (source == button_21) {\n\t\t\tString name = textField_21.getText().trim();\n\t\t\tString remark = textArea_21.getText().trim();\n\t\t\toperator.insertProject(userEmail, name, remark);\n\t\t\ttextArea_21.setText(\"\");\n\t\t\ttextField_21.setText(\"\");\n\t\t}\n\n\t\t// 保存项目状态记录的修改\n\t\tif (source == button_22_1) {\n\t\t\tString projStatus = textField_22.getText().trim();\n\t\t\tint projId = Integer.parseInt(cellsVector_22.get(table_22.getSelectedRow()).get(0));\n\n\t\t\toperator.updateProj(projStatus, projId);\n\t\t\tupdateCellsVector_22();\n\t\t\ttable_22.updateUI();\n\n\t\t\ttextField_22.setText(\"\");\n\n\t\t}\n\n\t\t// 删除所选项目记录\n\t\tif (source == button_22_2) {\n\t\t\tint projId = Integer.parseInt(cellsVector_22.get(table_22.getSelectedRow()).get(0));\n\t\t\toperator.delProj(projId);\n\t\t\tupdateCellsVector_22();\n\t\t\ttable_22.updateUI();\n\t\t}\n\n\t\t// 保存任务\n\t\tif (source == button_31) {\n\t\t\tint projId = Integer.parseInt(textField_31_1.getText().trim());\n\t\t\tString taskname = textField_31_2.getText().trim();\n\t\t\tString remark = textArea_31.getText().trim();\n\n\t\t\toperator.insertTask(projId, taskname, remark);\n\n\t\t\ttextField_31_1.setText(\"\");\n\t\t\ttextField_31_2.setText(\"\");\n\t\t\ttextArea_31.setText(\"\");\n\n\t\t}\n\n\t\t// 查询项目中的任务\n\t\tif (source == button_32_1) {\n\t\t\tupdateCellsVector_32();\n\t\t\ttable_32.updateUI();\n\t\t}\n\n\t\t// 保存任务修改\n\t\tif (source == button_32_2) {\n\t\t\tString taskStatus = textField_32.getText().trim();\n\t\t\tint row = table_32.getSelectedRow();\n\t\t\tint taskId = Integer.parseInt(cellsVector_32.get(row).get(0));\n\n\t\t\toperator.updateTask(taskId, taskStatus);\n\t\t\tupdateCellsVector_32();\n\t\t\ttable_32.updateUI();\n\n\t\t\ttextField_32.setText(\"\");\n\t\t}\n\n\t\t// 删除所选任务\n\t\tif (source == button_32_3) {\n\t\t\tint row = table_32.getSelectedRow();\n\t\t\tint taskId = Integer.parseInt(cellsVector_32.get(row).get(0));\n\n\t\t\toperator.delTask(taskId);\n\t\t\tupdateCellsVector_32();\n\t\t\ttable_32.updateUI();\n\t\t}\n\n\t\t// 查看任务完成情况图表\n\t\tif (source == button_32_4) {\n\t\t\tString projname = (String) comboBox_32.getSelectedItem();\n\t\t\tarray = operator.getArray_2(projname);\n\t\t\tChartDemo demo = new ChartDemo(array);\n\t\t\tdemo.pack();\n\t\t\tRefineryUtilities.centerFrameOnScreen(demo);\n\t\t\tdemo.setVisible(true);\n\t\t}\n\t\t// 保存新建心得\n\t\tif (source == button_41) {\n\t\t\tString title = textField_41.getText().trim();\n\t\t\tString content = textArea_41.getText().trim();\n\n\t\t\toperator.insertIdeas(userEmail, title, content);\n\n\t\t\ttextField_41.setText(\"\");\n\t\t\ttextArea_41.setText(\"\");\n\n\t\t}\n\n\t\t// 保存心得记录的修改\n\t\tif (source == button_42_1) {\n\n\t\t\tString cTime = cellsVector_42.get(table_42.getSelectedRow()).get(0);\n\t\t\tString title = textField_42_1.getText().trim();\n\t\t\tString content = textArea_42.getText().trim();\n\n\t\t\toperator.updateIdeas(title, content, userEmail, cTime);\n\t\t\tupdateCellsVector_42();\n\t\t\ttable_42.updateUI();\n\n\t\t\ttextField_42_1.setText(\"\");\n\t\t\ttextArea_42.setText(\"\");\n\t\t}\n\n\t\t// 删除所选心得记录\n\t\tif (source == button_42_2) {\n\n\t\t\tString cTime = cellsVector_42.get(table_42.getSelectedRow()).get(0);\n\t\t\toperator.delIdeas(cTime, userEmail);\n\t\t\tupdateCellsVector_42();\n\t\t\ttable_42.updateUI();\n\t\t}\n\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\tif(e.getSource()== addC1){\n\t\t\t\tcontroller.add(6);\n\n\t\t\t\t\n\t\t\t\tthis.refresh();\n\t\t\t\tif(cc1==6)addC1.setEnabled(false);//this stops the user from entering more than 6 chips in a column, its the same in all conditional statements\n\t\t\t}\n\t\t\telse if(e.getSource()== addC2){\n\t\t\t\tcontroller.add(5);\n\t\t\t\t/*if(controller.getColour(cc2,5)==\"blue\")cells[cc2][5].setBackground(Color.blue);\n\t\t\t\telse cells[cc2][5].setBackground(Color.red);\n\t\t\t\tcc2++;*/\n\t\t\t\tthis.refresh();\n\t\t\t\tif(cc2==6)addC2.setEnabled(false);\n\t\t\t}\n\t\t\telse if(e.getSource()== addC3){\n\t\t\t\tcontroller.add(4);\n\t\t\n\t\t\t\tthis.refresh();\n\t\t\t\t\n\t\t\t\tif(cc3==6)addC3.setEnabled(false);\n\t\t\t}\n\t\t\telse if(e.getSource()== addC4){\n\t\t\t\tcontroller.add(3);\n\t\t\n\t\t\t\tthis.refresh();\n\t\t\t\t\n\t\t\t\tif(cc4==6)addC4.setEnabled(false);\n\t\t\t}\n\t\t\telse if(e.getSource()== addC5){\n\t\t\t\tcontroller.add(2);\n\t\t\t\tthis.refresh();\n\t\t\t\t\n\t\t\t\tif(cc5==6)addC5.setEnabled(false);\n\t\t\t}\n\t\t\telse if(e.getSource()== addC6){\n\t\t\t\tcontroller.add(1);\n\t\t\t\tthis.refresh();\t\n\t\t\t\tif(cc6==6)addC6.setEnabled(false);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcontroller.add(0); \n\t\t\t\tthis.refresh();\n\t\t\t\tif(cc7==6)addC7.setEnabled(false);\n\t\t\t}\n\t\t\t \n\t\t\tif(playingAgainstComputer){\n\t\t\t\tdumbAI.setMove();\n\t\t\t\tcontroller.add(dumbAI.getMove());\n\t\t\t\tthis.refresh();\n\t\t\t}\n\t\t\tstatus.setText(\"Turn:\"+controller.getTurn()); \n\t\t\n\t\t\t//this goes and calls the controller to see if there is a winner, and then the board deals with it\n\t\t\tif(controller.winner() != \"\"){\n\t\t\t\tthis.winner(controller.winner());\n\t\t\t\tstatus.setText(\"The winner is \"+controller.winner()); \n\t\t\t}\n\n\t\t}", "private void makeDialog() {\n \t\tfinal BackgroundGame thisPanel = this;\n \n \t\tfinal JInternalFrame dialog = new JInternalFrame(\"Question!\");\n \t\tdialog.addInternalFrameListener(new InternalFrameListener() {\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameOpened(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosing(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameClosed(InternalFrameEvent arg0) {\n \t\t\t\tthisPanel.requestFocusInWindow();\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameIconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeiconified(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameActivated(InternalFrameEvent arg0) {\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void internalFrameDeactivated(InternalFrameEvent arg0) {\n \t\t\t}\n \t\t});\n \n \t\tQuestion randQuestion = questions.get(\n \t\t\t\t(int) (Math.random() * questions.size()));\n \n \t\tJLabel label = new JLabel(randQuestion.getQuestion());\n \t\tlabel.setHorizontalAlignment(SwingConstants.LEFT);\n \t\tFont font = label.getFont();\n \t\tlabel.setFont(label.getFont().deriveFont(font.PLAIN, 14.0f));\n \n \t\tJPanel a = new JPanel();\n \t\ta.setLayout(new BoxLayout(a, BoxLayout.Y_AXIS));\n \t\ta.add(label);\n \t\t\n \t\tJPanel choicesPanel = new JPanel();\n \t\tfor (int i = 1; i <= 4; ++i) {\n \t\t\tString choice = randQuestion.getChoice(i);\n \t\t\tJButton button = new JButton();\n \t\t\tif (randQuestion.answerIs(choice)) {\n \t\t\t\t//Remove the \"--\" marker\n \t\t\t\tchoice = choice.substring(0, choice.indexOf(\"--\"));\n \t\t\t\t\n \t\t\t\tbutton.addActionListener(new ActionListener() {\n \t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n \t\t\t\t\t\tdialog.setVisible(false);\n \t\t\t\t\t\tdialog.dispose();\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t}\n \t\t\t\t\t\t\t\n \t\t\tbutton.setText(choice);\n \t\t\tchoicesPanel.add(button);\n \t\t}\n \t\ta.add(choicesPanel);\n \n \t\tdialog.setContentPane(a);\n \n \t\tdialog.pack();\n \t\tdialog.setVisible(true);\n \t\tadd(dialog);\n \n \t\tdialog.setLocation(\n \t\t\t\t(int) (Math.random() * (getWidth() - dialog.getWidth())),\n \t\t\t\t(int) (Math.random() * (getHeight() - dialog.getHeight())));\n \t\t/*\n \t\t\n \t\tfor (max = max; max >= 1; max--) {\n \t\ttest = choices.get((int) (Math.random() * max) + min);\n \t\tSystem.out.println(test);\n \t\tSystem.out.println(choices.indexOf(test));\n \t\tchoices.remove(test);\n \t\tSystem.out.println(max);\n \t\t}*/\n \n \t\tincreaseCpuUsage(2);\n \t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jPanel1 = new javax.swing.JPanel();\n toss = new javax.swing.JPanel();\n b1 = new javax.swing.JButton();\n text = new javax.swing.JTextField();\n computer = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n b2 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n score = new javax.swing.JPanel();\n board = new javax.swing.JTextField();\n pscore = new javax.swing.JTextField();\n cscore = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n x = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setLayout(new java.awt.CardLayout());\n\n b1.setBackground(new java.awt.Color(51, 0, 255));\n b1.setText(\"Odd!\");\n b1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n b1ActionPerformed(evt);\n }\n });\n\n text.setText(\"0\");\n\n computer.setEditable(false);\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 0, 36)); // NOI18N\n jLabel1.setText(\"Your Move\");\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 0, 36)); // NOI18N\n jLabel2.setText(\"Computer\");\n\n b2.setBackground(new java.awt.Color(51, 0, 255));\n b2.setText(\"Even!\");\n b2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n b2ActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Copperplate Gothic Bold\", 1, 48)); // NOI18N\n jLabel3.setText(\"TOSS\");\n\n javax.swing.GroupLayout tossLayout = new javax.swing.GroupLayout(toss);\n toss.setLayout(tossLayout);\n tossLayout.setHorizontalGroup(\n tossLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tossLayout.createSequentialGroup()\n .addGap(44, 44, 44)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addGap(43, 43, 43))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tossLayout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(computer, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 148, Short.MAX_VALUE)\n .addGroup(tossLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(tossLayout.createSequentialGroup()\n .addComponent(text, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(tossLayout.createSequentialGroup()\n .addComponent(b1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(b2)\n .addGap(35, 35, 35))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tossLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3)\n .addGap(224, 224, 224))\n );\n tossLayout.setVerticalGroup(\n tossLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(tossLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(92, 92, 92)\n .addGroup(tossLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addGap(67, 67, 67)\n .addGroup(tossLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(text, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(computer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addGroup(tossLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(b1)\n .addComponent(b2))\n .addContainerGap(225, Short.MAX_VALUE))\n );\n\n jPanel1.add(toss, \"card2\");\n\n board.setEditable(false);\n board.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n boardActionPerformed(evt);\n }\n });\n\n pscore.setText(\"0\");\n\n cscore.setEditable(false);\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 0, 36)); // NOI18N\n jLabel4.setText(\"Your Move\");\n\n jLabel5.setFont(new java.awt.Font(\"Times New Roman\", 0, 36)); // NOI18N\n jLabel5.setText(\"Computer\");\n\n jLabel6.setFont(new java.awt.Font(\"Comic Sans MS\", 1, 24)); // NOI18N\n jLabel6.setText(\"Score\");\n\n x.setFont(new java.awt.Font(\"AR BLANCA\", 1, 36)); // NOI18N\n x.setText(\"GO\");\n x.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n xActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout scoreLayout = new javax.swing.GroupLayout(score);\n score.setLayout(scoreLayout);\n scoreLayout.setHorizontalGroup(\n scoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(scoreLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(scoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scoreLayout.createSequentialGroup()\n .addGroup(scoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scoreLayout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel4)\n .addGap(31, 31, 31))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scoreLayout.createSequentialGroup()\n .addComponent(cscore, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 158, Short.MAX_VALUE)\n .addComponent(pscore, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scoreLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(scoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(board, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(248, 248, 248))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scoreLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(x)\n .addGap(263, 263, 263))\n );\n scoreLayout.setVerticalGroup(\n scoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(scoreLayout.createSequentialGroup()\n .addGap(28, 28, 28)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(board, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(89, 89, 89)\n .addGroup(scoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(jLabel5))\n .addGap(67, 67, 67)\n .addGroup(scoreLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(pscore, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cscore, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)\n .addComponent(x)\n .addGap(131, 131, 131))\n );\n\n jPanel1.add(score, \"card3\");\n\n jScrollPane1.setViewportView(jPanel1);\n\n getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);\n\n pack();\n }", "public void gameButton(int size)\n {\n if(!playing)\n {\n board = new Board(size);\n boardPanel.setBoard(board);\n message.setText(size+\"x\"+size); //initializing the panel for the model\n //getContentPane().add(boardPanel, BorderLayout.CENTER);\n boardPanel.drawBoard();\n getContentPane().repaint();\n }\n else if (playing)\n {\n int input = JOptionPane.showConfirmDialog(null, \"Will you like to start a new game?\");\n // 0=yes, 1=no, 2=cancel\n if(input == 0)\n {\n board = new Board(size);\n boardPanel.setBoard(board);\n // getContentPane().add(boardPanel, BorderLayout.CENTER);\n boardPanel.drawBoard();\n getContentPane().repaint();\n playing = true;\n play();\n }\n }\n }", "Chemistry()\n { \n //sets label to screen at end of game\n game = new JLabel(\"A++\");\n game.setFont(new Font(\"Serif\", Font.BOLD, 100));\n game.setForeground(Color.yellow); \n game.setBounds(550,720,500,100); \n game.setVisible(false); //game is invisible\n \n //sets label to screen if enter button is clicked and input was wrong\n response = new JLabel(\"Wrong! Try Again.\");\n response.setFont(new Font(\"Serif\", Font.BOLD, 40));\n response.setForeground(Color.red); \n response.setBounds(80,450,500,100);\n response.setVisible(false); //response is invisible\n \n //sets label to screen if enter button is clicked and input was correct\n response2 = new JLabel(\"Correct!! Keep Going.\");\n response2.setFont(new Font(\"Serif\", Font.BOLD, 40));\n response2.setForeground(Color.red); \n response2.setBounds(80,450,500,100);\n response2.setVisible(false); //response2 is invisible\n \n //questions posed to user. Will be presented in a textField\n //0 = blue yellow \n //1 = purple yellow\n //2 = green orange\n questions = new String[3];\n questions[0] = \"Orange, violet, yellow, blue, red, and indigo. What’s the missing color that is in a rainbow?\";\n questions[1] = \"This is a type of fruit, but it is not a lime. There are no other words with which this word can rhyme.\";\n questions[2] = \"It rhymes with frown and it is something you'll see if you look down.\";\n \n //each color has a specified point value. The values in points represent the summation\n //of two different colors\n points = new int[3];\n points[0] = 87;\n points[1] = 111;\n points[2] = 103;\n \n x = 0; //starting problem number\n value = 0; //initializing value \n correct = false; //initializing correct\n \n f = new JFrame(\"Chemistry Class\"); \n f.setLayout(null); //allows the placement of diffrent objects without frame interference\n \n panel = new JPanel(); \n panel.setLayout(null); //allows the placement of diffrent objects without panel interference\n panel.setBounds(0,0,900,900); //covers the whole frame\n panel.setBackground(Color.blue); //sets background color to blue\n \n title(); //includes the title and other notes to the panel \n \n tf = new TextField(); \n tf.setText(questions[x]); //textfield created to display questions\n tf.setBounds(25,320,700,30); \n \n JButton orange = new JButton(); \n orange.setBounds(58,550,50,285);\n orange.setOpaque(false); //makes orange button invisible\n orange.setContentAreaFilled(false);\n orange.setBorderPainted(false);\n \n Icon obar = new ImageIcon(\"orangeBar.png\"); //creates invisible orange bar Image\n final JLabel lab3 = new JLabel(obar); \n lab3.setVisible(false); \n \n orange.addActionListener(new ActionListener()\n {\n \n /**\n * Button for the orange bar\n */\n \n public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab3.setBounds(510,y,230,60); \n lab3.setVisible(true); //displays orange bar image\n value += 27; //point value of orange\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n value = 0; \n y = 610; \n }\n }\n });\n \n JButton yellow = new JButton(); \n yellow.setBounds(130,550,50,285);\n yellow.setOpaque(false); //makes yellow button invisible\n yellow.setContentAreaFilled(false);\n yellow.setBorderPainted(false);\n \n Icon ybar = new ImageIcon(\"yellowBar.jpg\"); //creates invisible yellow bar image\n final JLabel lab4 = new JLabel(ybar); \n lab4.setVisible(false); \n \n yellow.addActionListener(new ActionListener()\n {\n \n /**\n * Button for the yellow bar\n */\n \n public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab4.setBounds(510,y,230,60); \n lab4.setVisible(true); //displays yellow bar image\n value += 82; //point value of yellow\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610; \n value = 0;\n } \n }\n });\n \n JButton green = new JButton(); \n green.setBounds(200,550,50,285);\n green.setOpaque(false); //makes green button invisible\n green.setContentAreaFilled(false);\n green.setBorderPainted(false);\n \n Icon gbar = new ImageIcon(\"greenBar.png\"); //creates invisible green bar image\n final JLabel lab5 = new JLabel(gbar); \n lab5.setVisible(false); \n \n green.addActionListener(new ActionListener()\n {\n \n /**\n * Button for the green bar\n */\n \n public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab5.setBounds(510,y,230,60); \n lab5.setVisible(true); //displays green bar image\n value += 76; //point value of green\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610; \n value = 0;\n }\n \n }\n }); \n \n JButton blue = new JButton(); \n blue.setBounds(272,550,50,285);\n blue.setOpaque(false); //makes blue button invisible\n blue.setContentAreaFilled(false);\n blue.setBorderPainted(false);\n \n Icon bbar = new ImageIcon(\"blueBar.png\"); //creates invisible blue bar image\n final JLabel lab6 = new JLabel(bbar); \n lab6.setVisible(false);\n \n blue.addActionListener(new ActionListener()\n {\n \n /**\n * This actionPreformed this is for the blue bar\n */\n \n public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab6.setBounds(510,y,230,60); \n lab6.setVisible(true); //displays blue bar image\n value += 5; //point value of blue\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610;\n value = 0;\n }\n \n }\n });\n \n JButton purple = new JButton(); \n purple.setBounds(342,550,50,285);\n purple.setOpaque(false); //makes purple button invisible\n purple.setContentAreaFilled(false);\n purple.setBorderPainted(false);\n \n Icon pbar = new ImageIcon(\"purpleBar.png\"); //creates invisible purple bar image\n final JLabel lab7 = new JLabel(pbar); \n lab7.setVisible(false);\n \n purple.addActionListener(new ActionListener()\n {\n \n /**\n * Buttom for the purple bar\n */\n \n public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab7.setBounds(510,y,230,60); \n lab7.setVisible(true); //displays purple bar image\n value += 29; //point value of purple\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610;\n value = 0;\n }\n \n }\n }); \n \n JButton prob1 = new JButton(\"Next Question\"); //button to move on to next question\n prob1.setBounds(50,390,150,30); \n \n prob1.addActionListener(new ActionListener()\n {\n \n /**\n * Button for the next button\n */\n \n public void actionPerformed(ActionEvent e)\n {\n //sets correct or wrong notes to invisible\n response.setVisible(false); \n response2.setVisible(false); \n if(correct) //if answer inputed was correct - set in enter button\n {\n if(x <= 1) //keeps track of which problem user is on\n {\n x++;\n tf.setText(questions[x]); //next question\n }\n else\n {\n //if all problems are solved class segways to next part of game\n game.setVisible(true); \n end.setVisible(true); \n }\n }\n \n correct = false; \n }\n });\n \n JButton enter = new JButton(\"Enter Answer\"); //checks answer\n enter.setBounds(300,390,150,30); \n \n enter.addActionListener(new ActionListener()\n {\n \n /**\n * Button to see whether the combination is correct. If it isn't it will reset the screen\n */\n \n public void actionPerformed(ActionEvent e)\n {\n //sets correct or wrong notes to invisible\n response.setVisible(false);\n response2.setVisible(false); \n if(points[x] == value) //checks if input matches answer\n {\n correct = true; \n response2.setVisible(true); //tells user they were correct\n }\n else\n {\n response.setVisible(true); //tells user they were wrong\n }\n \n //empties beaker \n lab3.setVisible(false); \n lab4.setVisible(false);\n lab5.setVisible(false);\n lab6.setVisible(false);\n lab7.setVisible(false);\n\n value = 0; //value to initial position and\n y = 610; //resets y coordinate \n }\n });\n \n end = new JButton(\"Continue\"); //snds user to next event in game\n end.setBounds(770,730,100,100);\n end.setVisible(false); //end is invisible\n\n end.addActionListener(new ActionListener()\n {\n \n /**\n * Button to go to lunch class\n */\n \n public void actionPerformed(ActionEvent e)\n {\n f.setVisible(false); //frame is set to invisible\n new Lunch(); //calls the Lunch class\n }\n });\n \n //adds above objects to panel\n panel.add(end); \n panel.add(game);\n panel.add(response); \n panel.add(response2);\n panel.add(purple);\n panel.add(lab7);\n panel.add(blue);\n panel.add(lab6);\n panel.add(lab5); \n panel.add(green);\n panel.add(lab4); \n panel.add(yellow); \n panel.add(enter); \n panel.add(lab3); \n panel.add(orange); \n panel.add(prob1);\n panel.add(tf); \n \n //panel added to frame and frame set to Visible\n f.add(panel);\n f.setSize(900,900); \n f.setVisible(true); \n }", "public void actionPerformed(ActionEvent e)\n {\n \tif(buttonActionFlag)\n \t{\n \t\tGraphics controlDisplay = new BasicControls();\n \t\tGraphics outwardDisplay = new OutwardDisplay();\n \t\tTimerImpl t = new TimerImpl();\n \t\tt.addObserver(controlDisplay);\n \t\tt.addObserver(outwardDisplay);\n \t\tScoreboardImpl s = new ScoreboardImpl();\n \t\ts.addObserver(controlDisplay);\n \t\ts.addObserver(outwardDisplay);\n \t\tTeamImpl t1 = new TeamImpl(teamName1.getText());\n \t\tt1.addObserver(controlDisplay);\n \t\tt1.addObserver(outwardDisplay);\n \t\tTeamImpl t2 = new TeamImpl(teamName2.getText());\n \t\tt2.addObserver(controlDisplay);\n \t\tt2.addObserver(outwardDisplay);\n \t\tcontrolDisplay.start(t, s, t1, t2);\n \t\toutwardDisplay.start(t, s, t1, t2);\n\t\t\tteamFrame.dispose();\n \t}\n \telse\n \t{\n \t\tArrayList<Player> team1players = new ArrayList<Player>();\n \t\tteam1players.add(new PlayerImpl(team1playerName1.getText(), Integer.valueOf(team1playerNumber1.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName2.getText(), Integer.valueOf(team1playerNumber2.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName3.getText(), Integer.valueOf(team1playerNumber3.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName4.getText(), Integer.valueOf(team1playerNumber4.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName5.getText(), Integer.valueOf(team1playerNumber5.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName6.getText(), Integer.valueOf(team1playerNumber6.getText())));\n \t\tteam1players.add(new PlayerImpl(team1playerName7.getText(), Integer.valueOf(team1playerNumber7.getText())));\n \t\tArrayList<Player> team2players = new ArrayList<Player>();\n \t\tteam2players.add(new PlayerImpl(team2playerName1.getText(), Integer.valueOf(team2playerNumber1.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName2.getText(), Integer.valueOf(team2playerNumber2.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName3.getText(), Integer.valueOf(team2playerNumber3.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName4.getText(), Integer.valueOf(team2playerNumber4.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName5.getText(), Integer.valueOf(team2playerNumber5.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName6.getText(), Integer.valueOf(team2playerNumber6.getText())));\n \t\tteam2players.add(new PlayerImpl(team2playerName7.getText(), Integer.valueOf(team2playerNumber7.getText())));\n \t\t\n \t\tGraphics controlDisplay = new AdvancedControls();\n \t\tGraphics outwardDisplay = new OutwardDisplay();\n \t\tTimerImpl t = new TimerImpl();\n \t\tt.addObserver(controlDisplay);\n \t\tt.addObserver(outwardDisplay);\n \t\tScoreboardImpl s = new ScoreboardImpl();\n \t\ts.addObserver(controlDisplay);\n \t\ts.addObserver(outwardDisplay);\n \t\tTeamImpl t1 = new TeamImpl(teamName1.getText());\n \t\tt1.addObserver(controlDisplay);\n \t\tt1.addObserver(outwardDisplay);\n \t\tt1.addPlayers(team1players);\n \t\tTeamImpl t2 = new TeamImpl(teamName2.getText());\n \t\tt2.addObserver(controlDisplay);\n \t\tt2.addObserver(outwardDisplay);\n \t\tt2.addPlayers(team2players);\n \t\tcontrolDisplay.start(t, s, t1, t2);\n \t\toutwardDisplay.start(t, s, t1, t2);\n\t\t\tteamFrame.dispose();\n \t}\n }", "protected void actionPerformed(GuiButton par1GuiButton)\n {\n if (par1GuiButton.id == 0)\n {\n this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));\n }\n\n if (par1GuiButton.id == 5)\n {\n this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings));\n }\n\n if (par1GuiButton.id == 1)\n {\n this.mc.displayGuiScreen(new GuiSelectWorld(this));\n }\n\n if (par1GuiButton.id == 2)\n {\n this.mc.displayGuiScreen(new GuiMultiplayer(this));\n }\n\n if (par1GuiButton.id == 3)\n {\n this.mc.displayGuiScreen(new GuiTexturePacks(this));\n }\n\n if (par1GuiButton.id == 4)\n {\n this.mc.shutdown();\n }\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getActionCommand().equals(\"Login\")){\r\n\t\t\tif(UserNamePane.isEnabled()){\r\n\t\t\tUserNamePane.setEnabled(false);\r\n\t\t\tUserNamePane.setVisible(false);\r\n\t\t\tlblTips.setText(\"TIPS:Login\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t if(tryLogin())\r\n\t\t\t dlg.dispose();\r\n\t\t\t else{\r\n\t\t\t\t lblTips.setText(\"Login Error\");\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Cancel\")){\r\n\t\t\t//serverinfo.port=-1;\r\n\t\t\t//serverinfo.OK=true;\r\n\t\t\tdlg.dispose();\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Register\")){\r\n\t\t\tif(UserNamePane.isEnabled()==false){\r\n\t\t\tUserNamePane.setEnabled(true);\r\n\t\t\tUserNamePane.setVisible(true);\r\n\t\t\tlblTips.setText(\"TIPS:Register\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(tryRegister()==false){\r\n\t\t\t\t\tUserNameText.setText(\"\");\r\n\t\t\t\t\tUserCodeText.setText(\"\");\r\n\t\t\t\t\tUserIDText.setText(\"\");\r\n\t\t\t\t\tlblTips.setText(\"Register error\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tlblTips.setText(\"Register successful->please try login\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public ComplexBoard(int x, int y, boolean Load) {\n this.x = x;\n this.y = y;\n\n GameLoad(Load);\n load = Load;\n\n // first create the panels\n topPanel = new JPanel();\n topPanel.setLayout(new FlowLayout());\n\n BackButton();\n\n bid = new BiddingSystem();\n\n if (!Load) {\n bid.SetUpForTimer();\n\n bid.InitialRobotsPosition();\n\n } else {\n bid.SetUpPanelLoading();\n bid.SetMovesAndText();\n\n }\n\n bottomPanel = new JPanel();\n bottomPanel.setLayout(new GridLayout(x, y));\n bottomPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));\n\n // for the bottom panel:\n // create the buttons and add them to the grid\n gridSquares = new ComplexGrid[x][y];\n\n for (int column = 0; column < x; column++) {\n for (int row = 0; row < y; row++) {\n gridSquares[column][row] = new ComplexGrid(x, y);\n gridSquares[column][row].setSize(200, 40);\n\n gridSquares[column][row].setOpaque(true); // without this line and the next the OS' default\n // gridSquares [column][row].setBorderPainted( false); // look & feel will\n // dominate / interfere\n // (try commenting each out & see what happens)\n\n gridSquares[column][row].addActionListener(this); // AGAIN, don't forget this line!\n gridSquares[column][row].setText(\"O\");\n gridSquares[column][row].setForeground(colorPalette[0]);\n gridSquares[column][row].setColor(column, row, redX, redY, blueX, blueY, greenX, greenY, yellowX,\n yellowY);\n bottomPanel.add(gridSquares[column][row]);\n }\n }\n\n // now add the top and bottom panels to the main frame\n getContentPane().setLayout(new BorderLayout());\n getContentPane().add(topPanel, BorderLayout.NORTH);\n getContentPane().add(bottomPanel, BorderLayout.SOUTH);\n pack();\n\n // housekeeping : behaviour\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setResizable(false);\n setVisible(true);\n loadGoal();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif(e.getSource().equals(begin)){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString fn = JOptionPane.showInputDialog(\"Please enter your name\");\n\t\t\t\t\t\tif(fn==null||fn.isEmpty()) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You did not follow the instructions. \"\n\t\t\t\t\t\t\t\t\t+ \"This app will now shut down\");\n\t\t\t\t\t\t\tdispose();\n\t\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLogicOfGUI logic=new LogicOfGUI(fn);\n\t\t\t\t\t\tlogic.setVisible(true);\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\tdispose(); //Deallocates the current view from memory\n\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tgf.interfaceofbegin.setVisible(true);\n\t\tgf.interfaceofhelp.setVisible(false);\n\t\tgf.validate();\n\t\t\n\t}", "public void actionPerformed(ActionEvent e){\t\n\t\t\n\t\t\n\t\tif(frameIndex == 0) {\n\t\t\t\n\t\t\t//Add key handler\n\t\t\tpanel.addKeyListener(this);\n\t\t\tpanel.addMouseMotionListener(this);\n\t\t\tpanel.addMouseListener(this);\n\t\t\tpanel.addFocusListener(this);\n\t\t\tpanel.requestFocus();\n\t\t\t\n\t\t\t//create camera\n\t\t\tCamera = new camera(new vector(3,2f,-1.25f), 0, 300);\n\t\t\n\t\t\t//Create look up tables\n\t\t\tgameData.makeData();\n\t\t\t\n\t\t\t//init grid \n\t\t\tgridMap = new grid(128);\n\t\t\t\n\t\t\t//init light source\n\t\t\tsunLight.init();\n\t\t\t\n\t\t\t//init rasterizer\n\t\t\trasterizer.init();\n\t\t\t\n\t\t\t//init 2d to 3d factory\n\t\t\tmy2Dto3DFactory = new Turn2DTo3DFactory();\n\t\t\tmy2Dto3DFactory.init();\n\t \n\t\t\tloadTexture();\n\t\t\t\t\n\t\t\ttheAssetManager = new AssetManager();\n\t\t\ttheAssetManager.init();\n\t\t\t\n\t\t\ttheGameCursor = new gameCursor();\n\t\t\ttheGameCursor.init();\n\t\t\t\n\t\t\tcurrentMouseX = getLocationOnScreen().x + screen_width/2;\n\t\t\tcurrentMouseY = getLocationOnScreen().y + screen_height/2;\n\t\t\t\n\t\t\tcenterScreenX = getLocationOnScreen().x + screen_width/2;\n\t\t\tcenterScreenY = getLocationOnScreen().y + screen_height/2;\n\t\t\t\n\t\t\t\n\t\t\tif(capturedMouse)\n\t\t\t\tmyRobot.mouseMove(centerScreenX, centerScreenY);\n\t\t\t\n\t\t\t//hide mouse cursor\n\t \t// Transparent 16 x 16 pixel cursor image.\n\t \tBufferedImage cursorImg = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);\n\n\t \t// Create a new blank cursor.\n\t \tCursor blankCursor = Toolkit.getDefaultToolkit().createCustomCursor(\n\t \t cursorImg, new Point(0, 0), \"blank cursor\");\n\n\t \t// Set the blank cursor to the JFrame.\n\t \tthis.getContentPane().setCursor(blankCursor);\n\t \t\n\t\t}\n\t\t\n\t\tframeIndex++;\t\n\n\t\tif(capturedMouse && !mouseLeftScreen && !focusLost) {\n\t\t\tcurrentMouseX = MouseInfo.getPointerInfo().getLocation().x;\n\t\t\tcurrentMouseY = MouseInfo.getPointerInfo().getLocation().y;\n\t\t\t\n\t\t\tcenterScreenX = getLocationOnScreen().x + screen_width/2;\n\t\t\tcenterScreenY = getLocationOnScreen().y + screen_height/2;\n\t\t\t\n\t\t\tint deltaX = currentMouseX - centerScreenX;\n\t\t\tint deltaY = currentMouseY - centerScreenY;\n\t\t\n\t\t\tmouseX+=deltaX;\n\t\t\tmouseY+=deltaY;\n\t\t\t\n\t\t\tmyRobot.mouseMove(centerScreenX, centerScreenY);\n\t\t\t\n\t\t\tif(mouseX < 0)\n\t\t\t\tmouseX = 0;\n\t\t\tif(mouseX >= screen_width)\n\t\t\t\tmouseX = screen_width-1;\n\t\t\tif(mouseY < 0)\n\t\t\t\tmouseY = 0;\n\t\t\tif(mouseY >= screen_height)\n\t\t\t\tmouseY = screen_height-1;\n\t\t\t\n\t\t\tinputHandler.mouse_x = mouseX;\n\t\t\tinputHandler.mouse_y = mouseY;\n\t\t}\n\t\tinputHandler.processInput();\n\t\t\n\t\tif(!gamePaused) {\n\t\t\tif(gameStarted)\n\t\t\t\tgameFrame++;\n\t\t\t\n\t\t\ttimeString = secondsToString((int)(gameFrame*0.025));\n\t\t\t\n\t\t\t//handle user's interaction with game GUI\n\t\t\tif(gameFrame == 1 && gameStarted){\n\t\t\t\ttheAssetManager.prepareAssetForNewGame();\n\t\t\t}\n\t\t\t\n\t\t\tgridMap.update();\n\t\t\t\n\t\t\t//Clears the z-buffer. All depth values are set to 0.\n\t\t\tclearDepthBuffer();\n\t\t\t\n\t\t\t//update camera\n\t\t\tCamera.update();\n\t\t\t\n\t\t\t//update light source\n\t\t\tsunLight.update();\n\t\t\t\t\t\n\t\t\t//update and draw 3D mashes from game objects\n\t\t\ttheAssetManager.updateAndDraw();\n\t\t\t\n\t\t\tif(gameStarted) {\n\t\t\t\tpc.update();\n\t\t\t\tec.update();\n\t\t\t}\n\t\t}else {\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t//show unpassable obstacle \n\t\t//gridMap.draw();\n\t\t\n\t\tif(this.getGraphics() != null && PPT!= null){\n\t\t\t//wait for the Post processing Thread if it is still working\n\t\t\twaitForPostProcessingThread();\n\t\t\t\n\t\t\t//prepare resources for the post processing thread\n\t\t\tpostProcessingThread.prepareResources();\n\t\t\t\n\t\t\t//Signal post processing thread that it can proceed\n\t\t\tsynchronized(PPT) {\n\t\t\t\tPPT.notify();\n\t\t\t}\n\t\t\t\n\t\t\tif(frameIndex %2 == 0 && frameIndex > 3){\n\t\t\t\tbf = doubleBuffer;\n\t\t\t\t//draw mouse cursor \n\t\t\t\ttheGameCursor.updateAndDraw(bufferScreen);\n\t\t\t\t\n\t\t\n\t\t\t}else if(frameIndex != 1 && frameIndex > 3){\n\t\t\t\tbf = doubleBuffer2;\n\t\t\t\t//draw mouse cursor \n\t\t\t\ttheGameCursor.updateAndDraw(buffer2Screen);\n\t\t\t}\n\t\t\t\n\t\t\tif(frameIndex > 3)\n\t\t\t\tpaintComponent(panel.getGraphics());\n\t\t\t\n\t\t\tswapResources();\n\t\t\n\t\t\t//maintain a constant frame rate\n\t\t\tregulateFramerate();\n\t\t}else{\n\t\t\tSystem.exit(-1);\n\t\t}\n\t}", "private void buttonClicked(int c){\r\n boardRep[currentFilled[c]][c] = blackToPlay ? 1:-1; //adjust board rep\r\n if (blackToPlay){\r\n boardSquares[5-currentFilled[c]][c].setBackground(Color.BLACK);\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.RED);\r\n }\r\n int y = 5-currentFilled[c];\r\n \r\n \r\n for (int i = 0; i < 4; i++) { //check horizontal for black win\r\n if ((c-3 + i)>-1 && c-3+i<4){\r\n horizontal4s[y][c-3+i]++;\r\n if (horizontal4s[y][c-3+i] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check vertical for black win\r\n if (y-3+i>-1 && y-3+i<3){\r\n vertical4s[y-3+i][c]++;\r\n if (vertical4s[y-3+i][c] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TLBR diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c-3+i>-1 && c-3+i<4){\r\n diagonalTLBR4s[y-3+i][c-3+i]++;\r\n if (diagonalTLBR4s[y-3+i][c-3+i] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TRBL diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c+3-i>-1 && c+3-i < 4){\r\n diagonalTRBL4s[y-3+i][c+3-i]++;\r\n if (diagonalTRBL4s[y-3+i][c+3-i] == 4){\r\n winnerText.setText(\"BLACK WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n \r\n \r\n }\r\n else{\r\n boardSquares[5-currentFilled[c]][c].setBackground(Color.RED);\r\n for (int i = 0; i < 7; i++) {\r\n moveSelect[i].setBackground(Color.BLACK);\r\n }\r\n \r\n int y = 5-currentFilled[c];\r\n \r\n \r\n for (int i = 0; i < 4; i++) { //check horizontal for black win\r\n if ((c-3 + i)>-1 && c-3+i<4){\r\n horizontal4s[y][c-3+i]--;\r\n if (horizontal4s[y][c-3+i] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check vertical for black win\r\n if (y-3+i>-1 && y-3+i<3){\r\n vertical4s[y-3+i][c]--;\r\n if (vertical4s[y-3+i][c] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TLBR diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c-3+i>-1 && c-3+i<4){\r\n diagonalTLBR4s[y-3+i][c-3+i]--;\r\n if (diagonalTLBR4s[y-3+i][c-3+i] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n for (int i = 0; i < 4; i++) { //check TRBL diag for black win\r\n if (y-3+i>-1 && y-3+i<3 && c+3-i>-1 && c+3-i < 4){\r\n diagonalTRBL4s[y-3+i][c+3-i]--;\r\n if (diagonalTRBL4s[y-3+i][c+3-i] == -4){\r\n winnerText.setText(\"RED WINS\");\r\n disableMoves();\r\n }\r\n }\r\n }\r\n \r\n \r\n }\r\n blackToPlay = !blackToPlay;\r\n currentFilled[c]++;\r\n if(currentFilled[c] == 6)\r\n moveSelect[c].setEnabled(false);\r\n }", "public GUIBoard(boolean isServer) {\n initComponents();\n jLabel1.setText(isServer ? \"Server\" : \"Client\");\n labelMyScore.setForeground(isServer ? Color.RED : Color.BLUE);\n labelEnemyScore.setForeground(!isServer ? Color.RED : Color.BLUE);\n\n this.isServer = isServer;\n buttonBoard = new javax.swing.JButton[3][3];\n buttonBoard[0][0] = btn1;\n buttonBoard[0][1] = btn2;\n buttonBoard[0][2] = btn3;\n buttonBoard[1][0] = btn4;\n buttonBoard[1][1] = btn5;\n buttonBoard[1][2] = btn6;\n buttonBoard[2][0] = btn7;\n buttonBoard[2][1] = btn8;\n buttonBoard[2][2] = btn9;\n\n //exit handler\n WindowListener exitListener = new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n JFrame TicTacToe = new JFrame(\"Exit\");\n\n if (JOptionPane.showConfirmDialog(TicTacToe, \"Apakah anda ingin keluar?\", \"Tic Tac Toe\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_NO_OPTION) {\n controller.stop();\n controller.shutdown();\n }\n }\n };\n this.addWindowListener(exitListener);\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (myBoard.myGame.status != GameStatus.inProgress) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//if starting square is selected\r\n\t\tif (myBoard.selectedSquare!=null) {\r\n\t\t\t//create list of valid moves\r\n\t\t\tArrayList<Move> validMovesList = myBoard.selectedSquare.mySB.validMoves;\r\n\t\t\t//remove highlight from board\r\n\t\t\tint size = validMovesList.size();\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\tSquareButton sb = validMovesList.get(i).end.mySB;\r\n\t\t\t\tsb.setBackground(sb.defaultColor);\r\n\t\t\t}\r\n\t\t\t//making sure we do not move to the same square\r\n\t\t\tif (myBoard.selectedSquare!=mySquare) {\r\n\t\t\t\tMove attemptedMove = new Move(myBoard.selectedSquare, mySquare, myBoard.selectedSquare.myPiece.colour);\r\n\t\t\t\tSystem.out.println(\"Attempted move is: \" + attemptedMove);\r\n\t\t\t\t\r\n\t\t\t\t//check if attempted move is valid\r\n\t\t\t\tif(validMovesList.contains(attemptedMove)) {\r\n\t\t\t\t\tMove moveFound = validMovesList.get(validMovesList.indexOf(attemptedMove));\r\n\t\t\t\t\tSystem.out.println(\"Move Found Type: \" + moveFound.moveType);\r\n\t\t\t\t\tmyBoard.performMove(moveFound);\r\n\t\t\t\t\t//check if the move is legal - if so, undo the move\r\n\t\t\t\t\tif (myBoard.isKingThreatened()) {\r\n\t\t\t\t\t\tmyBoard.undoMove(myBoard.moveStack.pop());\r\n\t\t\t\t\t} else { //the player has made a legal move\r\n\t\t\t\t\t\tmyBoard.swapActiveColour();\r\n\t\t\t\t\t\t//determine if we are playing against AI\r\n\t\t\t\t\t\tif (Game.myAILevel != AILevel.off) {\r\n\t\t\t\t\t\t\tmyBoard.myGame.myAI.makeMove();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t\t//debugging\r\n//\t\t\t\t\tSystem.out.println(\"Enemy's List - My active colour was: \" + myBoard.activeColour);\r\n//\t\t\t\t\tArrayList<Square> result = enemyValidSquares();\r\n//\t\t\t\t\tfor (Square s: result) {\r\n//\t\t\t\t\t\ts.mySB.setBackground(Color.ORANGE);\r\n//\t\t\t\t\t}\r\n//\t\t\t\t\tmyBoard.whiteKingSquare.mySB.setBackground(Color.PINK);\r\n//\t\t\t\t\tmyBoard.blackKingSquare.mySB.setBackground(Color.magenta);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n//\t\t\t\t\tshowLists();\r\n\t\t\t\t\t//check if my opponent is checkmated by this move\r\n\t\t\t\t\t//if opponent is in check\r\n\t\t\t\t\tif (myBoard.isKingThreatened()) {\r\n\t\t\t\t\t\t//try every possible move\r\n\t\t\t\t\t\tif (myBoard.isCheckmate()) {\r\n\t\t\t\t\t\t\tColour winningColour = (myBoard.activeColour == Colour.WHITE) ? Colour.BLACK : Colour.WHITE;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(new JFrame(), myBoard.activeColour + \" is checkmated! \\n\" + winningColour + \" wins!\");\r\n\t\t\t\t\t\t\tmyBoard.myGame.status = (winningColour == Colour.WHITE) ? GameStatus.winWhite : GameStatus.winBlack;\r\n\t\t\t\t\t\t\t//turn off all buttons in the east panel\r\n\t\t\t\t\t\t\tfor (Component comp : myBoard.myGame.myBoardHolder.myEastPanel.getComponents()) {\r\n\t\t\t\t\t\t\t\tcomp.setEnabled(false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tSystem.out.println(\"Checkmate!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n//\t\t\t\t\t//end of debug\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//unselect the square\r\n\t\t\t\t\tmyBoard.selectedSquare = null;\r\n\t\t\t\t\tSystem.out.println(\"Invalid Move\");\r\n\t\t\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\t\t\tSystem.out.println(validMovesList.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(myBoard);\r\n\t\t\t}\r\n\t\t\tmyBoard.selectedSquare = null;\r\n\t\t\tif (myBoard.myGame.status == GameStatus.inProgress) myBoard.myGame.myBoardHolder.myEastPanel.getComponent(0).setEnabled(true);\r\n\t\t\t\r\n\t\t}\r\n\t\t//if starting square is not selected\r\n\t\telse {\r\n\t\t\t//debugging\r\n//\t\t\tshowLists();\r\n\t\t\t//end of debug\r\n\t\t\tif ((mySquare.myPiece!=null) && (mySquare.myPiece.colour == myBoard.activeColour)) {\r\n\t\t\t\tmyBoard.selectedSquare = mySquare;\r\n\t\t\t\tSystem.out.println(\"Selected starting square: \" + myBoard.selectedSquare.row + \", \" + myBoard.selectedSquare.col);\r\n\t\t\t\t//generate valid moves\r\n\t\t\t\tvalidMoves = getValidMoves();\r\n\t\t\t\t\r\n\t\t\t\t//highlight valid squares if starting square has not been selected yet\r\n\t\t\t\tint size = validMoves.size();\r\n\t\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\t\tSquareButton sb = validMoves.get(i).end.mySB;\r\n\t\t\t\t\tsb.setBackground(sb.getBackground().brighter());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmyBoard.myGame.myBoardHolder.myEastPanel.getComponent(0).setEnabled(false);\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n \n private void initComponents() {\n \n this.setIconImage(new ImageIcon(getClass().getResource(\n\t\t\t\tPuzzleProperties.APPLICATION_ICON_FILE)).getImage());\n \n LoginPanel = new LoginPanel();\n btnLogin = new javax.swing.JToggleButton();\n panelLogin = new javax.swing.JPanel();\n cmbUsers = new javax.swing.JComboBox();\n btnLog = new javax.swing.JButton();\n btnNewPupil = new javax.swing.JButton();\n btnExit = new javax.swing.JButton();\n lblLogTitle = new javax.swing.JLabel();\n \n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setPreferredSize(new java.awt.Dimension(970, 647));\n this.setUndecorated(true);\n this.getRootPane().setWindowDecorationStyle(JRootPane.NONE);\n\n LoginPanel.setBackground(new java.awt.Color(255, 255, 255));\n LoginPanel.setPreferredSize(new java.awt.Dimension(970, 647));\n\n btnLogin.setFont(new java.awt.Font(\"DK Crayon Crumble\", 1, 36)); \n btnLogin.setText(\"Enter Class\");\n btnLogin.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icon/enter.png\")));\n btnLogin.setBackground(new java.awt.Color(47, 28, 18));\n btnLogin.setForeground(new java.awt.Color(255, 255, 255));\n btnLogin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLoginActionPerformed(evt);\n }\n });\n\n panelLogin.setBackground(new java.awt.Color(213, 210, 208));\n panelLogin.setVisible(false);\n \n cmbUsers.setFont(new java.awt.Font(\"DK Crayon Crumble\", 0, 24)); // NOI18N\n cmbUsers.setModel(new javax.swing.DefaultComboBoxModel(new String[] { }));\n\n btnLog.setFont(new java.awt.Font(\"DK Crayon Crumble\", 0, 24)); \n btnLog.setBackground(new java.awt.Color(66, 139, 202));\n btnLog.setText(\"Enter\");\n btnLog.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnLogActionPerformed(evt);\n }\n });\n\n lblLogTitle.setFont(new java.awt.Font(\"DK Crayon Crumble\", 1, 24)); // NOI18N\n lblLogTitle.setText(\"Select your name:\");\n lblLogTitle.setForeground(new java.awt.Color(47, 28, 18));\n \n\n javax.swing.GroupLayout panelLoginLayout = new javax.swing.GroupLayout(panelLogin);\n panelLogin.setLayout(panelLoginLayout);\n panelLoginLayout.setHorizontalGroup(\n panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLoginLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cmbUsers, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(panelLoginLayout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addComponent(btnLog, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n )\n .addComponent(lblLogTitle))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n panelLoginLayout.setVerticalGroup(\n panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelLoginLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(lblLogTitle)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbUsers, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(9, 9, 9)\n .addGroup(panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n \n .addComponent(btnLog, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnNewPupil.setText(\"New Pupil\");\n btnNewPupil.setFont(new java.awt.Font(\"DK Crayon Crumble\", 0, 24)); \n btnNewPupil.setBackground(new java.awt.Color(66, 139, 202));\n btnNewPupil.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icon/pupil.png\")));\n btnNewPupil.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNewPupilActionPerformed(evt);\n }\n });\n\n btnExit.setText(\"Close\");\n btnExit.setFont(new java.awt.Font(\"DK Crayon Crumble\", 1, 24)); \n btnExit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/icon/close.png\")));\n btnExit.setBackground(new java.awt.Color(190, 30, 45));\n btnExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnExitActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout LoginPanelLayout = new javax.swing.GroupLayout(LoginPanel);\n LoginPanel.setLayout(LoginPanelLayout);\n LoginPanelLayout.setHorizontalGroup(\n LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, LoginPanelLayout.createSequentialGroup()\n .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(LoginPanelLayout.createSequentialGroup()\n .addGap(0, 220, Short.MAX_VALUE)\n .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(LoginPanelLayout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(btnNewPupil, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(panelLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(117, 117, 117))\n );\n LoginPanelLayout.setVerticalGroup(\n LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(LoginPanelLayout.createSequentialGroup()\n .addContainerGap(158, Short.MAX_VALUE)\n .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(btnLogin, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(panelLogin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(120, 120, 120)\n .addGroup(LoginPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNewPupil, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(LoginPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 687, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(LoginPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 449, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void fillPuzzle(){\n JFrame App = new JFrame(\"Create Sudoku Puzzle\");\r\n App.setSize(500,500);\r\n App.setVisible(true);\r\n App.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n //We will make 3 panels one for instructions, one for the boxes, last one for submit button\r\n JPanel instructionsPanel = new JPanel(), fillPanel = new JPanel(), submitPanel = new JPanel();\r\n JTextField [][] textFields = new JTextField[sudokuSize][sudokuSize];\r\n JLabel[] labels = {\r\n new JLabel(\"Fill in a valid sudoku puzzle\"),\r\n new JLabel(\"Rules are :\"),\r\n new JLabel(\"1. Digits should be numbers only\"),\r\n new JLabel(\"2. Digits should be less than one\"),\r\n };\r\n for (JLabel lb : labels)instructionsPanel.add(lb);\r\n instructionsPanel.setLayout(new FlowLayout(FlowLayout.CENTER));\r\n JButton submitButton = new JButton(\"Submit\");//Submit the puzzle\r\n submitPanel.add(submitButton, BorderLayout.CENTER);\r\n //Add the textFields\r\n for(int i = 0; i < textFields.length; ++i)for(int j = 0; j < textFields[i].length; ++j)textFields[i][j] = new JTextField();//Add the fields to the array\r\n for(JTextField[] txt_row: textFields)for(JTextField txt_f: txt_row)fillPanel.add(txt_f); //Render the entries to the panel\r\n App.add(instructionsPanel);App.add(fillPanel);App.add(submitPanel);\r\n fillPanel.setLayout(new GridLayout(sudokuSize, sudokuSize));\r\n App.setLayout(new GridLayout(3, 1));\r\n\r\n submitButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n if(gridValid(textFields)){//If the arrangement is valid\r\n //Update the puzzle variable\r\n System.out.println(\"Inside fillPuzzle() method\");\r\n for( String[] nodeRow: puzzle)System.out.println(Arrays.toString(nodeRow));\r\n updatePuzzle(textFields);\r\n App.dispose();\r\n //For the code to work we had to solve the puzzle form this method\r\n Solver.Sys puzzleSystem = new Solver.Sys(puzzle);\r\n puzzleSystem.printData();\r\n //We save the created puzzle\r\n FileSys saver = new FileSys();\r\n try {\r\n saver.savePuzzle(puzzleSystem);\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n puzzleSystem.solvePuzzle();\r\n }\r\n else{\r\n JOptionPane.showMessageDialog(App, \"Invalid fill\");\r\n }\r\n }\r\n });\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == createButton) {\n cardLayout.show(functions, \"Create\");\n } else if (e.getSource() == editButton) {\n cardLayout.show(functions, \"Edit\");\n } else if (e.getSource() == changeButton) {\n cardLayout.show(functions, \"Change\");\n }\n // If the User pressed new user button - send form\n if (e.getSource() == submitNewUser) {\n try {\n addNewUser();\n } catch (UnitException unitException) {\n String msg = \"New User Error: The inputted unit ID doesn't exist currently.\";\n JOptionPane.showMessageDialog(null, msg);\n } catch (Exception exception) {\n }\n }\n // If the user changes combobox accounttype, change the value of account Type\n if (e.getSource() == accountType) {\n accountTypeValue = (String) accountType.getSelectedItem();\n }\n if (e.getSource() == accountTypeEdit) {\n accountTypeValueEdit = (String) accountTypeEdit.getSelectedItem();\n }\n // If user presses edit account button - send form\n if (e.getSource() == editAccTypeBtn) {\n try {\n editAccountType();\n } catch (SQLException exception) {\n String msg = \"Change Account Type: Unable to change user account in database\";\n JOptionPane.showMessageDialog(null, msg);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }\n if (e.getSource() == changePassBtn) {\n try {\n changePassword();\n } catch (Exception userException) {\n String msg = \"Password Change Error: Unable to change user password in database\";\n JOptionPane.showMessageDialog(null, msg);\n }\n }\n }", "public void displayMoveButtons(JPanel panel, GameState currentGS) {\n\n super.getContentPane().removeAll();\n\n Pokemon p2Pman = currentGS.player2CurrentPokemon;\n\n if (this.move1 == null) {\n\n Move move = p2Pman.moves.get(0);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX,moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move1 = new ActionButtonInner();\n this.move1.setButton(moveB);\n this.move1.setActionIndex(0);\n\n }\n else {\n\n Move move = p2Pman.moves.get(0);\n JButton button = this.move1.buttonObj;\n button.setText(move.moveName);\n this.move1.setActionIndex(0);\n panel.add(button);\n\n }\n\n if (this.move2 == null) {\n\n Move move = p2Pman.moves.get(1);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + (moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move2 = new ActionButtonInner();\n this.move2.setButton(moveB);\n this.move2.setActionIndex(1);\n\n }\n else {\n\n Move move = p2Pman.moves.get(1);\n JButton button = this.move2.buttonObj;\n button.setText(move.moveName);\n this.move2.setActionIndex(1);\n panel.add(button);\n\n }\n\n if (this.move3 == null) {\n\n Move move = p2Pman.moves.get(2);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 2*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move3 = new ActionButtonInner();\n this.move3.setButton(moveB);\n this.move3.setActionIndex(2);\n\n }\n else {\n\n Move move = p2Pman.moves.get(2);\n JButton button = this.move3.buttonObj;\n button.setText(move.moveName);\n this.move3.setActionIndex(2);\n panel.add(button);\n\n }\n\n if (this.move4 == null) {\n\n Move move = p2Pman.moves.get(3);\n JButton moveB = makeMoveButton(move);\n moveB.setBounds(moveButtonStartingX + 3*(moveButtonXSize),moveButtonStartingY,moveButtonXSize,moveButtonYSize);\n panel.add(moveB);\n this.move4 = new ActionButtonInner();\n this.move4.setButton(moveB);\n this.move4.setActionIndex(3);\n\n }\n else {\n\n Move move = p2Pman.moves.get(3);\n JButton button = this.move4.buttonObj;\n button.setText(move.moveName);\n this.move4.setActionIndex(3);\n panel.add(button);\n\n }\n\n super.getContentPane().add(panel);\n super.revalidate();\n\n }", "private void initPlayers() {\n UIManager.put(\"Panel.background\", LIGHT_GRAY);\n UIManager.put(\"OptionPane.background\", LIGHT_GRAY);\n\n JOptionPane pane = new JOptionPane();\n JDialog dialog = pane.createDialog(\"\");\n dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\n JButton onePlayer = createButton(\"1P\", dialog);\n JButton twoPlayer = createButton(\"2P\", dialog);\n Object option[] = {onePlayer, Box.createRigidArea(new Dimension(20,0)), twoPlayer};\n\n JPanel panel = new JPanel(new BorderLayout());\n pane.setMessage(panel);\n pane.setOptions(option);\n\n dialog.setSize(new Dimension(150, 100));\n dialog.setLocationRelativeTo(null);\n dialog.setVisible(true);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Puzzle_Result = new javax.swing.JLabel();\n Select_New_Puzzle = new javax.swing.JButton();\n\n setBackground(new java.awt.Color(59, 61, 62));\n\n Puzzle_Result.setFont(new java.awt.Font(\"Felix Titling\", 1, 48)); // NOI18N\n Puzzle_Result.setForeground(new java.awt.Color(194, 194, 194));\n Puzzle_Result.setText(cpt_chess.Puzzles_Main.winner_loser_text);\n\n Select_New_Puzzle.setFont(new java.awt.Font(\"Dubai Medium\", 0, 14)); // NOI18N\n Select_New_Puzzle.setText(\"Return to Chess Puzzle Menu\");\n Select_New_Puzzle.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Select_New_PuzzleActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(221, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(Puzzle_Result)\n .addGap(182, 182, 182))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(Select_New_Puzzle, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(255, 255, 255))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(Puzzle_Result)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 233, Short.MAX_VALUE)\n .addComponent(Select_New_Puzzle, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(105, 105, 105))\n );\n }", "private void initializeGUI(JPanel chessBoardGUI){\n GUI.setBorder(new EmptyBorder(5,5,5,5));\n\n JToolBar tools = new JToolBar();\n //tools.setPreferredSize(new Dimension(600,50) );\n tools.setFloatable(false);\n GUI.add(tools, BorderLayout.PAGE_START);\n JButton newGameButton = new JButton(\"New Game\");\n newGameButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n newGameClicked(e);\n }\n });\n tools.add(newGameButton);\n tools.addSeparator();\n JButton forfeitButton = new JButton(\"Forfeit\");\n forfeitButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n forfeitClicked(e);\n }\n });\n tools.add(forfeitButton);\n tools.addSeparator();\n JButton changeSideButton = new JButton(\"Change side\");\n changeSideButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n changeSideClicked(e);\n }\n });\n tools.add(changeSideButton);\n tools.addSeparator();\n JButton newPlayersButton = new JButton(\"New Players\");\n newPlayersButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n newPlayersClicked(e);\n }\n });\n tools.add(newPlayersButton);\n tools.addSeparator();\n JButton undoButton = new JButton(\"Undo\");\n undoButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n undoClicked(e);\n }\n });\n tools.add(undoButton);\n tools.addSeparator();\n tools.add(message);\n JPanel pageEndPanel = new JPanel();\n pageEndPanel.setLayout(new GridLayout(1,3));\n pageEndPanel.add(new JLabel(\" Score:\"));\n pageEndPanel.add(scoreInfo);\n pageEndPanel.add(turnInfo);\n GUI.add(pageEndPanel, BorderLayout.PAGE_END);\n GUI.add(chessBoardGUI);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\n\t\t\t\t\tint counter = 0;\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0; i < textFieldHolder.size(); i++){//if field isn't empty\n\t\t\t\t\t\tif(!textFieldHolder.get(i).getText().equals(\"\")){\n\t\t\t\t\t\t\t//game.addTeamToGame(textFieldHolder.get(i).getText()); // adds team to game\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//System.out.println(\"teams: \"+ textFieldHolder.get(i).getText());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(host.isSelected()){\n\t\t\t\t\t\tString portStr = portText.getText();\n\t\t\t\t\t\tSystem.out.println(\"port # : \" + portStr);\n\t\t\t\t\t\t\n\t\t\t\t\t\tint portInt = Integer.parseInt(portStr);\n\t\t\t\t\t\t\n\t\t\t\t\t\tint sliderValue = hostSlider.getValue();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tgameData = new Jeopardy_Game(fileName, teamsFromUser, gameType);\n\t\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnew GameServer(portInt, sliderValue, gameData);\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew GameClient(portInt, hostUN.getText());\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if(joinGame.isSelected()){\n\t\t\t\t\t\tString portStr = joinPort.getText();\n\t\t\t\t\t\tSystem.out.println(\"port # : \" + portStr);\n\t\t\t\t\t\tString ipStr = ip.getText();\n\t\t\t\t\t\tint portInt = Integer.parseInt(portStr);\n\t\t\t\t\t\tnew GameClient(portInt, joinName.getText());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse{ //if \"not networked\" is selected\n\t\t\t\t\t\tdisplayGB();\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "public ConnectFive()\n {\n setTitle(\"Connect Five\");\n setResizable(false);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n getContentPane().setLayout(new BorderLayout());\n\n //adding buttons (top)\n JPanel boardSizePanel = new JPanel(new GridLayout(2, 3, 5 , 5));\n JButton largeBoard = new JButton(\"Board Size (15x15)\");\n JButton mediumBoard = new JButton(\"Board Size (12x12)\");\n JButton smallBoard = new JButton(\"Board Size (9x9)\");\n JButton playGame = new JButton(\"Play Game\");\n JButton change = new JButton(\"Change Color\");\n JButton muting = new JButton(\"Mute\");\n for (JButton button: new JButton[] { largeBoard, mediumBoard, smallBoard, change, playGame, muting })\n {\n button.setFocusPainted(true);\n boardSizePanel.add(button);\n }\n getContentPane().add(boardSizePanel, BorderLayout.NORTH);\n board = new Board(15);\n playing = false;\n mute = false;\n\n //create Board GUI instance (center)\n boardPanel = new BoardPanel(board); //initializing the panel for the model\n boardPanel.setPreferredSize(new Dimension(670, 670));\n getContentPane().add(boardPanel, BorderLayout.CENTER);\n\n //creating message label (bottom)\n JPanel statusPanel = new JPanel();\n statusPanel.setBackground(Color.DARK_GRAY);\n statusPanel.setPreferredSize(new Dimension(670, 50));\n message = new JLabel(\"Welcome to Connect Five\");\n message.setForeground(Color.WHITE);\n message.setFont(new Font(message.getName(), Font.BOLD, 28));\n statusPanel.add(message);\n getContentPane().add(statusPanel, BorderLayout.SOUTH);\n\n\n //Actions for the three different buttons.\n //Actions for (15x15) button\n largeBoard.addActionListener(e ->\n {\n buttonSound();\n gameButton(15);\n });\n\n //Actions for (12x12) button\n mediumBoard.addActionListener(e ->\n {\n buttonSound();\n gameButton(12);\n });\n\n //Actions for (9x9) button\n smallBoard.addActionListener(e ->\n {\n buttonSound();\n gameButton(9);\n });\n\n //Actions for play game button\n playGame.addActionListener(e ->\n {\n if(playing)\n {\n play();\n }\n else if(!playing)\n {\n playing = true;\n play();\n boardPanel.setPlaying(true);\n }\n });\n message.setText(\"Please choose your table mode.\");\n\n //Actions for change color button\n change.addActionListener(e ->\n {\n boolean foundColor = true;\n String [] colors = {\"Green\",\"Blue\",\"Yellow\",\"Red\",\"Black\",\"Gray\",\"Orange\",\"Purple\"};\n String[] possibilities = {\"hey\",\"no\"};//Simple initialization\n String colorPlayer1 = BoardPanel.getPlayer1ColorName();\n String colorPlayer2 = BoardPanel.getPlayer2ColorName();\n if(playing)\n {\n String inputColor = \"\";\n int r = 0, g = 0, b = 0;\n possibilities = new String[6];\n for(int i = 0, j= 0; i < 6 && j < colors.length; j++)\n {\n if(!(colorPlayer1.equals(colors[j])) && !(colorPlayer2.equals(colors[j])))//Adds the options to be displayed if they are not used.\n {\n possibilities[i] = colors[j];\n i += 1;\n }\n }\n if(board.getNumberOfDisks() % 2 == 0)\n {\n inputColor = (String) JOptionPane.showInputDialog(null, \"Color\",\"Player 1 please choose a color.\", JOptionPane.QUESTION_MESSAGE, null, possibilities,colorPlayer1); // Gets the color choosen by the user.\n }\n else if(board.getNumberOfDisks() % 2 == 1)\n {\n inputColor = (String) JOptionPane.showInputDialog(null, \"Color\",\"Player 2 please choose a color.\", JOptionPane.QUESTION_MESSAGE, null, possibilities,colorPlayer2); // Gets the color choosen by the user.\n }\n if(inputColor != null)\n {\n switch(inputColor)\n {\n case \"Green\":\n r = 140;\n g = 197;\n b = 141;\n break;\n\n case \"Blue\":\n r = 0;\n g = 0;\n b = 255;\n break;\n\n case \"Yellow\":\n r = 240;\n g = 226;\n b = 84;\n break;\n\n case \"Red\":\n r = 237;\n g = 90;\n b = 76;\n break;\n\n case \"Black\":\n r = 0;\n g = 0;\n b = 0;\n break;\n\n case \"Gray\":\n r = 128;\n g = 128;\n b = 128;\n break;\n\n case \"Orange\":\n r = 237;\n g = 166;\n b = 79;\n break;\n\n case \"Purple\":\n r = 125;\n g = 110;\n b = 246;\n break;\n\n case \"Oscar\":\n r = 55;\n g = 120;\n b = 117;\n break;\n }\n Color provisional = new Color(r,g,b);\n if(board.getNumberOfDisks() % 2 == 0 && !inputColor.equals(\"\") && boardPanel.getPlayer2Color().getRGB() != provisional.getRGB())\n {\n boardPanel.setPlayer1Color(r,g,b);\n boardPanel.setPlayer1ColorName(inputColor);\n }\n else if(board.getNumberOfDisks() % 2 == 1 && !inputColor.equals(\"\") && boardPanel.getPlayer1Color().getRGB() != provisional.getRGB())\n {\n boardPanel.setPlayer2Color(r,g,b);\n boardPanel.setPlayer2ColorName(inputColor);\n }\n playcolorMod();\n }\n }\n });\n\n //Actions when the mute button is pressed\n muting.addActionListener(e ->\n {\n if(mute)\n mute = false;\n\n else if(!mute)\n mute = true;\n });\n\n //Actions when the mousd is clicked\n boardPanel.addMouseListener(new MouseAdapter()\n {\n public void mousePressed(MouseEvent e)\n {\n if(playing)\n {\n board.addDisk(e.getX(), e.getY());\n play();\n boardPanel.drawBoard();\n getContentPane().repaint();\n }\n else if(!playing)\n {\n errorSound();\n message.setFont(new Font(message.getName(), Font.BOLD, 22));\n message.setText(\"Please choose a new game board and press 'play game'.\");\n }\n }//end mouse pressed\n });\n }", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "private void initActionListeners(){\n\n// button.addActionListener(new ActionListener() {\n// @Override\n// public void actionPerformed(ActionEvent e) {\n// createMatchesFrame();\n// }\n// });\n\n littlesRankingsBox.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JComboBox littlebox = (JComboBox) e.getSource();\n Object selected = littlebox.getSelectedItem();\n if (selected.toString().equals(\"Clear\")){\n setLinedText(littlesRankingsResultsLabel, new ArrayList<String>());\n return;\n }\n ArrayList<String> prefBigs = matching.littlesPreferences.get(selected);\n// infoPanel.littlesRankingsResultsLabel.setText(prefBigs.toString());\n setLinedText(littlesRankingsResultsLabel, prefBigs);\n\n\n }\n });\n bigsRankingsBox.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JComboBox bigbox = (JComboBox) e.getSource();\n Object selected = bigbox.getSelectedItem();\n if (selected.toString().equals(\"Clear\")){\n setLinedText(bigsRankingsResultsLabel, new ArrayList<String>());\n return;\n }\n ArrayList<String> prefLittles = matching.bigsPreferences.get(selected);\n// infoPanel.bigsRankingsResultsLabel.setText(prefLittles.toString());\n setLinedText(bigsRankingsResultsLabel, prefLittles);\n\n }\n });\n\n whoRanksLittleBox.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JComboBox littlebox = (JComboBox) e.getSource();\n Object selected = littlebox.getSelectedItem();\n String selectedLittle = selected.toString();\n if (selected.toString().equals(\"Clear\")){\n setLinedText(whoRanksLittleResultsLabel, new ArrayList<String>());\n return;\n }\n findBigsWhoRankedLittle(selectedLittle);\n\n }\n });\n whoRanksBigBox.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JComboBox bigbox = (JComboBox) e.getSource();\n Object selected = bigbox.getSelectedItem();\n String selectedBig = selected.toString();\n if (selected.toString().equals(\"Clear\")){\n setLinedText(whoRanksBigResultsLabel, new ArrayList<String>());\n return;\n }\n findLittlesWhoRankedBig(selectedBig);\n\n }\n });\n }", "private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }", "private static void buttonSetup() {\n \n // For all buttons except clear and equals=, update display\n for(JButton i:buttonOrder) {\n if(i.equals(clear) || i.equals(equals))\n continue;\n i.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(displayString.toString().equals(\"ERROR\")) {\n displayString.replace(0, displayString.length(), i.getText());\n numField.setText(displayString.toString());\n } else {\n displayString.append(i.getText());\n numField.setText(displayString.toString());\n }\n }\n });\n }\n \n // Clears display\n clear.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n displayString.delete(0, displayString.length());\n numField.setText(displayString.toString());\n }\n });\n \n // Clears display, shows result\n equals.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n equationParse(displayString);\n }\n });\n }", "private void onOkButtonPressed() {\n\t\tconfirm = true;\n\t\tif (template.getAskDimension()) {\n\t\t\ttry {\n\t\t\t\twidth = Integer.parseInt(widthInputField.getFieldString());\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\twidthInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\theight = Integer.parseInt(heightInputField.getFieldString());\n\t\t\t\theightInputField.setFieldColor(GameFrame.getStandardFieldColor());\n\t\t\t} catch (Exception except) {\n\t\t\t\theightInputField.setFieldColor(GameFrame.getWrongFieldColor());\n\t\t\t\tconfirm = false;\n\t\t\t}\n\t\t\tif(!confirm)\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (template.getAskLoading()) {\n\t\t\tint result = savefileChooser.showOpenDialog(this);\n\t\t\tif (result != JFileChooser.APPROVE_OPTION) {\n\t\t\t\tconfirm = false;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tdispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\n\t}", "public void initComponents() {\n \tgetContentPane().removeAll();\n\t\tgetContentPane().invalidate();\n\t\tJPanel topPanel = new JPanel();\n\t //topPanel.setLayout(new BorderLayout());\n\t getContentPane().add(topPanel);\n\n\t if(user.getpHealth() <= 0){\n\t \t\n\t\t\t// OK button closes the dialog\n\t\t\t//YahtzeeTest.incrementCount();\n\t\t\tJLabel text = new JLabel(\"You Lost!\",SwingConstants.CENTER);\n\t\t\ttext.setPreferredSize(new Dimension(1100, 800));\n\t\t\t\n\t\t\t//JButton ok = new JButton(\"OK\");\n\t\t\t//ok.addActionListener(event -> setVisible(false));\n\t\t\t\n\t\t\t// add OK button to southern border\n\t\t\tJPanel buttonPanel = new JPanel();\n\t\t\t\n\t\t\tbuttonPanel.add(text);\n\t\t\t//buttonPanel.add(ok);\n\t\t\tsetContentPane(buttonPanel);\n\t\t\tpack();\n\t\t\trepaint();\n\t\t\t\n\t\t\t\n\t\t\t// ScorePanel\n\t\t\t//scorePanel = new JPanel();\n\t\t\t\n\t } else {\n\t int round = YahtzeeTest.getRound();\n\t\tif(round == 1){\n\t\t\tenemy = new ImageIcon(\"New Piskel (2).png\");\n\t\t} else if(round == 2) {\n\t\t\tenemy = new ImageIcon(\"Strong Yahtzee P (1).png\");\n\t\t} else if(round == 3) {\n\t\t\tenemy = new ImageIcon(\"Panzer.png\");\n\t\t} else if(round == 4) {\n\t\t\tenemy = new ImageIcon(\"Party Leader.png\");\n\t\t} else if(round == 5) {\n\t\t\tenemy = new ImageIcon(\"Japan Soldier.png\");\n\t\t} else if(round == 6) {\n\t\t\tenemy = new ImageIcon(\"Strong Japan Soldier.png\");\n\t\t} else if(round == 7) {\n\t\t\tenemy = new ImageIcon(\"Zero.png\");\n\t\t} else {\n\t\t\tenemy = new ImageIcon(\"Emperor.png\");\n\t\t}\n\t\t\n\t\tsaveGamebutton.setIcon(USFlag);\n\t\tif(YahtzeeTest.getRound() <= 4){\n\t\t\tlaunchBattle.setIcon(YahtzeePartyFlag);\n\t\t} else {\n\t\t\tlaunchBattle.setIcon(KamaFlag);\n\t\t}\n \t\n jPanel1 = new JPanel(){\n \tpublic void paintComponent(Graphics g){\n \t\tg.drawImage(map.getImage(), 0, 0, this.getWidth(), this.getHeight(), null);\n \t\tg.drawImage(player.getImage(), x, y, 160, 160, null);\n \t\tg.drawImage(enemy.getImage(), 300, 50, 160, 160, null);\n \t}\n };\n \t\n \t\n\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\n GroupLayout jPanel1Layout = new GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGap(0, 493, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGap(0, 314, Short.MAX_VALUE)\n );\n \n if(YahtzeeTest.getCount() >= 2){\n \tupdateHealth();\n \thand.sortHand();\n }\n \n if(aiList.get(YahtzeeTest.getRound()-1).getHealth() <= 0 ){\n \trollDice.setText(\"Start Battle\");\n } else if(YahtzeeTest.getCount() >= 2){\n \tYahtzeeTest.setReset(true);\n \t\n \trollDice.setText(\"Start New Hand\");\n \t//YahtzeeTest.resetCount();\n }\n else{\n \tYahtzeeTest.setReset(false);\n \trollDice.setText(\"Roll Dice\");\n }\n \n\n playerHealth.setText(\"<html><div style='text-align: center;'>Player Health<br>\"+ Integer.toString(user.getpHealth())+ \"</div></html\");\n //playerHealth.setColumns(20);\n //playerHealth.setRows(5);\n jScrollPane1.setViewportView(playerHealth);\n\n aiScore.setText(\"<html><div style='text-align: center;'>Enemy Score<br>\"+ Integer.toString(aiList.get(YahtzeeTest.getRound()-1).getTotalDice())+ \"</div></html\");\n //aiScore.setColumns(20);\n //aiScore.setRows(5);\n jScrollPane2.setViewportView(aiScore);\n\n aiHealth2.setText(\"<html><div style='text-align: center;'>Players Score<br>\"+ Integer.toString(hand.getMaxScore())+ \"</div></html\");\n //aiHealth2.setColumns(20);\n //aiHealth2.setRows(5);\n jScrollPane4.setViewportView(aiHealth2);\n\n\n //enemyHealthButton();\n //System.out.println(\"enemy button called\");\n \n //aiHealth.setColumns(20);\n //aiHealth.setRows(5);\n aiHealth.setText(\"<html><div style='text-align: center;'>Enemy Health<br>\"+ Integer.toString(aiList.get(YahtzeeTest.getRound()-1).getHealth())+ \"</div></html\");\n jScrollPane5.setViewportView(aiHealth);\n\n scoreTobeat.setColumns(20);\n scoreTobeat.setRows(5);\n jScrollPane6.setViewportView(scoreTobeat);\n \n \n \n dice = new DisplayDice(hand);\n ArrayList<JToggleButton> dButtons = dice.getDiceArray();\n \n //for(JToggleButton die : diceButtons):\n \n //JToggleButton tempButton = new JToggleButton(\"Hello\");\n //jToggleButton1 = tempButton;\n jToggleButton1 = dButtons.get(0); \n \n jToggleButton2 = dButtons.get(1); \n jToggleButton3 = dButtons.get(2); \n jToggleButton4 = dButtons.get(3); \n jToggleButton5 = dButtons.get(4); \n \n\n //saveGamebutton.setText(\"Save Game\");\n\n //messageCenter.setColumns(20);\n //messageCenter.setRows(5);\n messageCenter.setText(YahtzeeTest.getMessageText(hand));\n jScrollPane7.setViewportView(messageCenter);\n\n //launchBattle.setText(\"Launch Battle\");\n\n GroupLayout layout = new GroupLayout(getContentPane());\n \n \n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)\n .addComponent(jScrollPane1)\n .addComponent(rollDice, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(26, 26, 26)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jToggleButton1, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton2, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton3, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton4, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jToggleButton5, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE))\n .addComponent(jScrollPane7))))\n .addGap(0, 2, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(saveGamebutton, GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(launchBattle, GroupLayout.PREFERRED_SIZE, 167, GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(3, 3, 3)\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(53, 53, 53)\n .addComponent(jPanel1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(65, 65, 65)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(saveGamebutton, GroupLayout.PREFERRED_SIZE, 73, GroupLayout.PREFERRED_SIZE)\n .addComponent(launchBattle, GroupLayout.PREFERRED_SIZE, 73, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane7, GroupLayout.PREFERRED_SIZE, 86, GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(jToggleButton1, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton2, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton3, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton4, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE)\n .addComponent(jToggleButton5, GroupLayout.PREFERRED_SIZE, 85, GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)\n .addComponent(rollDice, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane6))))\n .addGap(6, 6, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n \n if(aiList.get(YahtzeeTest.getRound()-1).getHealth() > 0 && YahtzeeTest.getCount() >= 2){\n \taiList.get(YahtzeeTest.getRound()-1).rollDice();\n \tYahtzeeTest.resetCount();\n }\n\n getContentPane().revalidate();\n pack();\n\t }\n \n // new !!\n //setVisible(true);\n //setLocationRelativeTo(null);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tshowPanel(createReinforcePanel(MainPlayScreen.this.game.getCurrentPlayer()));\t\t\n\t\t\t\n\t\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 2;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_RESULTS_SCREEN\");\r\n\t\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\r\n switch (e.getActionCommand()) {\r\n case ABRIR_NOTICIAS:\r\n wdwNoticias w = new wdwNoticias(gln);\r\n w.setVisible(true);\r\n this.dispose();\r\n break;\r\n case ABRIR_CLASIFICACION:\r\n wdwClasificacion c = new wdwClasificacion(gln);\r\n c.setVisible(true);\r\n this.dispose();\r\n break;\r\n case ABRIR_JORNADA:\r\n \twdwJornadas wj=new wdwJornadas(gln);\r\n \twj.setVisible(true);\r\n \tthis.dispose();\r\n break;\r\n\r\n case INSERTAR_JUGADOR:\r\n wdwJugador j = new wdwJugador(gln);\r\n j.setVisible(true);\r\n this.dispose();\r\n break;\r\n case INSERTAR_EQUIPO:\r\n wdwEquipo eq = new wdwEquipo(gln);\r\n eq.setVisible(true);\r\n this.dispose();\r\n break;\r\n case INSERTAR_POSICION:\r\n wdwPosicion p = new wdwPosicion(gln);\r\n p.setVisible(true);\r\n this.dispose();\r\n break;\r\n case INSERTAR_ESTADO:\r\n wdwEstado es = new wdwEstado(gln);\r\n es.setVisible(true);\r\n this.dispose();\r\n break;\r\n case INSERTAR_CAMPO:\r\n wdwCampo ca = new wdwCampo(gln);\r\n ca.setVisible(true);\r\n this.dispose();\r\n break;\r\n case INSERTAR_TEMPORADA:\r\n try {\r\n gln.anadirTemporada();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n } catch (EquiposInsuficientesException ex) {\r\n JOptionPane.showMessageDialog(this,ex.getMessage());\r\n }\r\n break;\r\n case CERRAR_SESION:\r\n wdwRegistrarUsuario ru = new wdwRegistrarUsuario(gln);\r\n ru.setVisible(true);\r\n this.dispose();\r\n break;\r\n case CAMBIAR_EQUIPO_FAV:\r\n updateEquipoFav ef = new updateEquipoFav(gln);\r\n ef.setVisible(true);\r\n this.dispose();\r\n break;\r\n case DATOS_PERSONALES:\r\n wdwDatosPersonales dp = new wdwDatosPersonales(gln);\r\n dp.setVisible(true);\r\n this.dispose();\r\n break;\r\n\r\n\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n EndPopUp = new javax.swing.JOptionPane();\n Square1 = new javax.swing.JTextField();\n Square2 = new javax.swing.JTextField();\n Square3 = new javax.swing.JTextField();\n Square4 = new javax.swing.JTextField();\n Square5 = new javax.swing.JTextField();\n Square6 = new javax.swing.JTextField();\n Square7 = new javax.swing.JTextField();\n Square8 = new javax.swing.JTextField();\n Square9 = new javax.swing.JTextField();\n Square10 = new javax.swing.JTextField();\n Square11 = new javax.swing.JTextField();\n Square12 = new javax.swing.JTextField();\n Square13 = new javax.swing.JTextField();\n Square14 = new javax.swing.JTextField();\n Square15 = new javax.swing.JTextField();\n Square16 = new javax.swing.JTextField();\n Square17 = new javax.swing.JTextField();\n Square18 = new javax.swing.JTextField();\n Square19 = new javax.swing.JTextField();\n Square20 = new javax.swing.JTextField();\n Square21 = new javax.swing.JTextField();\n Square22 = new javax.swing.JTextField();\n Square23 = new javax.swing.JTextField();\n Square24 = new javax.swing.JTextField();\n Square25 = new javax.swing.JTextField();\n Square26 = new javax.swing.JTextField();\n Square27 = new javax.swing.JTextField();\n Square28 = new javax.swing.JTextField();\n Square29 = new javax.swing.JTextField();\n Square30 = new javax.swing.JTextField();\n Square31 = new javax.swing.JTextField();\n Square32 = new javax.swing.JTextField();\n Square33 = new javax.swing.JTextField();\n Square34 = new javax.swing.JTextField();\n Square35 = new javax.swing.JTextField();\n Square36 = new javax.swing.JTextField();\n Square37 = new javax.swing.JTextField();\n Square38 = new javax.swing.JTextField();\n Square39 = new javax.swing.JTextField();\n Square40 = new javax.swing.JTextField();\n Square41 = new javax.swing.JTextField();\n Square42 = new javax.swing.JTextField();\n Input1 = new javax.swing.JButton();\n Input2 = new javax.swing.JButton();\n Input3 = new javax.swing.JButton();\n Input4 = new javax.swing.JButton();\n Input5 = new javax.swing.JButton();\n Input6 = new javax.swing.JButton();\n Input7 = new javax.swing.JButton();\n\n setPreferredSize(new java.awt.Dimension(900, 600));\n setLayout(new java.awt.GridLayout(7, 0));\n\n Square1.setEditable(false);\n add(Square1);\n\n Square2.setEditable(false);\n add(Square2);\n\n Square3.setEditable(false);\n add(Square3);\n\n Square4.setEditable(false);\n add(Square4);\n\n Square5.setEditable(false);\n add(Square5);\n\n Square6.setEditable(false);\n add(Square6);\n\n Square7.setEditable(false);\n add(Square7);\n\n Square8.setEditable(false);\n add(Square8);\n\n Square9.setEditable(false);\n add(Square9);\n\n Square10.setEditable(false);\n add(Square10);\n\n Square11.setEditable(false);\n add(Square11);\n\n Square12.setEditable(false);\n add(Square12);\n\n Square13.setEditable(false);\n add(Square13);\n\n Square14.setEditable(false);\n add(Square14);\n\n Square15.setEditable(false);\n add(Square15);\n\n Square16.setEditable(false);\n add(Square16);\n\n Square17.setEditable(false);\n add(Square17);\n\n Square18.setEditable(false);\n add(Square18);\n\n Square19.setEditable(false);\n add(Square19);\n\n Square20.setEditable(false);\n add(Square20);\n\n Square21.setEditable(false);\n add(Square21);\n\n Square22.setEditable(false);\n add(Square22);\n\n Square23.setEditable(false);\n add(Square23);\n\n Square24.setEditable(false);\n add(Square24);\n\n Square25.setEditable(false);\n add(Square25);\n\n Square26.setEditable(false);\n add(Square26);\n\n Square27.setEditable(false);\n add(Square27);\n\n Square28.setEditable(false);\n add(Square28);\n\n Square29.setEditable(false);\n add(Square29);\n\n Square30.setEditable(false);\n add(Square30);\n\n Square31.setEditable(false);\n add(Square31);\n\n Square32.setEditable(false);\n add(Square32);\n\n Square33.setEditable(false);\n add(Square33);\n\n Square34.setEditable(false);\n add(Square34);\n\n Square35.setEditable(false);\n add(Square35);\n\n Square36.setEditable(false);\n add(Square36);\n\n Square37.setEditable(false);\n add(Square37);\n\n Square38.setEditable(false);\n add(Square38);\n\n Square39.setEditable(false);\n add(Square39);\n\n Square40.setEditable(false);\n add(Square40);\n\n Square41.setEditable(false);\n add(Square41);\n\n Square42.setEditable(false);\n add(Square42);\n\n Input1.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n Input1.setText(\"1\");\n Input1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Input1ActionPerformed(evt);\n }\n });\n add(Input1);\n\n Input2.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n Input2.setText(\"2\");\n Input2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Input2ActionPerformed(evt);\n }\n });\n add(Input2);\n\n Input3.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n Input3.setText(\"3\");\n Input3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Input3ActionPerformed(evt);\n }\n });\n add(Input3);\n\n Input4.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n Input4.setText(\"4\");\n Input4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Input4ActionPerformed(evt);\n }\n });\n add(Input4);\n\n Input5.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n Input5.setText(\"5\");\n Input5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Input5ActionPerformed(evt);\n }\n });\n add(Input5);\n\n Input6.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n Input6.setText(\"6\");\n Input6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Input6ActionPerformed(evt);\n }\n });\n add(Input6);\n\n Input7.setFont(new java.awt.Font(\"Tahoma\", 0, 20)); // NOI18N\n Input7.setText(\"7\");\n Input7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Input7ActionPerformed(evt);\n }\n });\n add(Input7);\n }", "public TicTac() { //creates the method to draw the game board\r\n super (\"Tic Tac Toe\"); //creates the Title for the App\r\n getContentPane().setBackground(new Color(153, 204, 204));\r\n setSize (600,500); //sets the size of the outer frame\r\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); \r\n //sets the program to quit if the window is closed\r\n FlowLayout layout = new FlowLayout(); \r\n /**arranges components from left to right, centering \r\n * components horizontally with a five pixel gap between them.*/\r\n getContentPane().setLayout(layout); \r\n int name = 0; // creates a variable to keep track of box number\r\n String newname; // will be used to hold button names\r\n GridLayout layout1 = new GridLayout(3, 3, 12, 12); \r\n //arranges the components in a rectangular grid, where all cells are of equal size.\r\n row1.setLayout(layout1);\r\n JOptionPane.showMessageDialog(null, \"ADIDAS STARTS THE GAME\"); \r\n // show the message before the game boots that adidas starts\r\n for (int x=0; x<=2; x++){ //creates and adds the buttons to the GridLayout, goes up and down\r\n for (int y=0; y<=2; y++){ //goes across on the GridLayout\r\n name = name + 1; //adds one to the loop\r\n newname = Integer.toString(name); //names newname from number 1-9\r\n boxes[x][y] = new JButton(newname); //sets the boxes to show number 1-9\r\n boxes[x][y].setIcon(back); //sets the images of the back of the buttons\r\n row1.add(boxes[x][y]); //adds remaining components to the GridLayout.\r\n }\r\n }\r\n \r\n // add the reset button to the game board, this will reset the game board\r\n JButton btnReset = new JButton(\"Reset\");\r\n // when the reset button is clicked the following code will occur\r\n btnReset.addActionListener(new ActionListener() {\r\n \tpublic void actionPerformed(ActionEvent arg0) {\r\n \t\t// loop that goes through all of the boxes to check them of they are disabled to reset them\r\n \t\tfor (int row = 0; row <=2; row++) {\r\n \t\t\tfor (int col = 0; col <=2; col++) {\r\n \t\t\t\t// as the loop continues on each button is getting enabled\r\n \t\t\t\tboxes[row][col].setEnabled(true);\r\n \t\t\t\t// the icon is set to the carback image \r\n \t\t\t\tboxes[row][col].setDisabledIcon(tictac.c);\r\n \t\t\t\t// the check is reset for each box so clicks is 0 to old memory is deleted\r\n \t\t\t\ttictac.check[row][col] = 0;\r\n \t\t\t\t// win is 0 so the gae can be played again\r\n \t\t\t\ttictac.win = 0;\r\n \t\t\t\t// number of clicks = 0 so that the game can be played again\r\n \t\t\t\ttictac.clicks = 0;\r\n \t\t\t\t// set the colours of the txtboxes back to white since they flash yellow when a win in the category is added\r\n \t\t txtAdidas.setBackground(Color.WHITE);\r\n \t\t txtNike.setBackground(Color.WHITE);\r\n \t\t txtTie.setBackground(Color.WHITE);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n });\r\n getContentPane().add(btnReset);\r\n \r\n // add the exit button to the game board to exit the game\r\n JButton btnExit = new JButton(\"Exit\");\r\n btnExit.addActionListener(new ActionListener() {\r\n \tpublic void actionPerformed(ActionEvent e) {\r\n \t\t// the frame exits\r\n \t\tSystem.exit(0);\r\n \t}\r\n });\r\n getContentPane().add(btnExit);\r\n \r\n // add the txtbox that shows how many wins x has\r\n txtAdidas = new JTextField();\r\n txtAdidas.setBackground(Color.WHITE);\r\n txtAdidas.setText(\"Adidas wins: 0\");\r\n getContentPane().add(txtAdidas);\r\n txtAdidas.setColumns(10);\r\n \r\n // add the txtbox that shows how many wins o has \r\n txtNike = new JTextField();\r\n txtNike.setText(\"Nike wins: 0\");\r\n getContentPane().add(txtNike);\r\n txtNike.setColumns(10);\r\n \r\n // add the txtbox that shows how many games were tied\r\n txtTie = new JTextField();\r\n txtTie.setText(\"Ties: 0\");\r\n getContentPane().add(txtTie);\r\n txtTie.setColumns(10);\r\n getContentPane().add (row1);\r\n\r\n for (int x=0; x<=2; x++){ //runs a loop to see which button was pressed\r\n for (int y=0; y<=2; y++){\r\n boxes[x][y].addActionListener(tictac); //listens to button being clicked\r\n }\r\n }\r\n\r\n setVisible(true); //shows the FlowLayout on the screen.\r\n }", "private void makeGUI() {\n\t\tframe = new JFrame(\"Sudoku\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tpane = frame.getContentPane();\n\t\t// Knappar\n\t\tbtnSolve = new JButton(\"Solve\");\n\t\tbtnClear = new JButton(\"Clear\");\n\t\tDimension btnDim = new Dimension(100, 25);\n\t\tbtnSolve.setPreferredSize(btnDim);\n\t\tbtnClear.setPreferredSize(btnDim);\n\t\t// ActionListeners\n\t\tbtnSolve.addActionListener(e -> {\n\t\t\tboolean errorFound = false;\n\t\t\tfor (int r = 0; r < size; r++) {\n\t\t\t\tfor (int c = 0; c < size; c++) {\n\t\t\t\t\tint nbr;\n\t\t\t\t\tString input = grid[r][c].getText();\n\t\t\t\t\tboolean isEmpty = input.equals(\"\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (input.strip().equals(\"0\")) {\n\t\t\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnbr = Integer.parseInt(input);\n\t\t\t\t\t} catch (NumberFormatException err1) {\n\t\t\t\t\t\tnbr = 0;\n\t\t\t\t\t\tif (!isEmpty) {\n\t\t\t\t\t\t\tgrid[r][c].setText(\"\");\n\t\t\t\t\t\t\tshowBadInputMessage();\n\t\t\t\t\t\t\terrorFound = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (nbr == 0) {\n\t\t\t\t\t\t\tb.clearNumber(r, c);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tb.setNumber(r, c, nbr);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IllegalArgumentException err2) {\n\t\t\t\t\t\tnbr = 0;\n\t\t\t\t\t\tgrid[r][c].setText(\"\");\n\t\t\t\t\t\tshowBadInputMessage();\n\t\t\t\t\t\terrorFound = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!errorFound) {\n\t\t\t\tboolean solved = b.solve();\n\t\t\t\tif (!solved) showUnsolvableMessage();\n\t\t\t\telse setMatrixText(b.getMatrix());\n\t\t\t}\n\t\t});\n\t\tbtnClear.addActionListener(e -> {\n\t\t\tb.clear();\n\t\t\tclear();\n\t\t});\n\t\t// Dimensioner\n\t\tint sqDim = (int) Math.sqrt(size);\n\t\t// Ramar\n\t\tsquareBorder = BorderFactory.createLineBorder(Color.BLACK, 2);\n\t\tcellBorder = BorderFactory.createLineBorder(Color.GRAY, 1);\n\t\tgridBorder = BorderFactory.createLineBorder(Color.DARK_GRAY, 2);\n\t\t// Lägg till alla textrutor i matrisen, sätt alla tal till 0\n\t\tfor (int r = 0; r < size; r++) {\n\t\t\tfor (int c = 0; c < size; c++) {\n\t\t\t\tb.getMatrix()[r][c] = 0;\n\t\t\t\tJTextField cell = new JTextField();\n\t\t\t\tcell.setBorder(cellBorder);\n\t\t\t\tcell.setHorizontalAlignment(JTextField.CENTER);\n\t\t\t\tcell.setFont(new Font(\"Verdana\", Font.CENTER_BASELINE, 20));\n\t\t\t\tgrid[r][c] = cell;\n\t\t\t}\n\t\t}\n\t\t//Paneler\n\t\tsquarePanels = new JPanel[sqDim][sqDim];\n\t\tgridPanel = new JPanel();\n\t\tgridPanel.setLayout(new GridLayout(sqDim, sqDim));\n\t\tgridPanel.setBorder(gridBorder);\n\t\t\n\t\tbtnPanel = new JPanel();\n\t\tbtnPanel.setLayout(new BorderLayout());\n\t\tbtnPanel.add(btnSolve,\tBorderLayout.WEST);\n\t\tbtnPanel.add(btnClear,\tBorderLayout.EAST);\n\t\t// Lägg till alla stora rutor i matrisen och rutnätet\n\t\tfor (int r = 0; r < sqDim; r++) {\n\t\t\tfor (int c = 0; c < sqDim; c++) {\n\t\t\t\tJPanel square = new JPanel();\n\t\t\t\tsquare.setLayout(new GridLayout(sqDim, sqDim));\n\t\t\t\tsquare.setBorder(squareBorder);\n\t\t\t\tsquarePanels[r][c] = square;\n\t\t\t\tgridPanel.add(square);\n\t\t\t}\n\t\t}\n\t\t// Lägg till textrutorna i de stora stora rutorna\n\t\tfor (int r = 0; r < size; r++) {\n\t\t\tfor (int c = 0; c < size; c++) {\n\t\t\t\tint currentRow = r / sqDim;\n\t\t\t\tint currentCol = c / sqDim;\n\t\t\t\tsquarePanels[currentRow][currentCol].add(grid[r][c]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpane.add(gridPanel,\tBorderLayout.CENTER);\n\t\tframe.add(btnPanel,\tBorderLayout.SOUTH);\n\t\tpane.setPreferredSize(new Dimension(400,400));\n\t\tframe.pack();\n\t\tframe.setVisible(true);\n\t}", "public void displayBoard() {\r\n\t\tboard = new JButton[6][7];\r\n\t\tfor (int row = 0; row < board.length; row++) {\r\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\r\n\t\t\t\tboard[row][col] = new JButton();\r\n\t\t\t\tboard[row][col].addActionListener(this);\r\n\t\t\t\tboard[row][col].setBorder(new EtchedBorder());\r\n\t\t\t\tboard[row][col].setEnabled(true);\r\n\t\t\t\tboardPanel.add(board[row][col]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Melee_Flame = new javax.swing.JButton();\n panel = new GamePanel()\n ;\n Heal_GroupHeal = new javax.swing.JButton();\n Sacrifice_Fireworks = new javax.swing.JButton();\n Switch = new javax.swing.JButton();\n Fumes = new javax.swing.JButton();\n HelpButton = new javax.swing.JButton();\n DisplayTeams = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Melee_Flame.setText(\"Melee\");\n Melee_Flame.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Melee_FlameActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);\n panel.setLayout(panelLayout);\n panelLayout.setHorizontalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1300, Short.MAX_VALUE)\n );\n panelLayout.setVerticalGroup(\n panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 556, Short.MAX_VALUE)\n );\n\n Heal_GroupHeal.setText(\"Heal\");\n Heal_GroupHeal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Heal_GroupHeal_GroupHealActionPerformed(evt);\n }\n });\n\n Sacrifice_Fireworks.setText(\"Sacrifice\");\n Sacrifice_Fireworks.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n Sacrifice_FireworksActionPerformed(evt);\n }\n });\n\n Switch.setText(\"Switch Fighter\");\n Switch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SwitchActionPerformed(evt);\n }\n });\n\n Fumes.setText(\"Fumes\");\n Fumes.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n FumesActionPerformed(evt);\n }\n });\n\n HelpButton.setText(\"Instructions\");\n HelpButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n HelpButtonActionPerformed(evt);\n }\n });\n\n DisplayTeams.setText(\"Show Team Details\");\n DisplayTeams.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n DisplayTeamsActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(Melee_Flame)\n .addGap(100, 100, 100)\n .addComponent(Sacrifice_Fireworks)\n .addGap(100, 100, 100)\n .addComponent(Heal_GroupHeal)\n .addGap(100, 100, 100)\n .addComponent(Fumes)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(DisplayTeams)\n .addGap(100, 100, 100)\n .addComponent(HelpButton)\n .addGap(100, 100, 100)\n .addComponent(Switch)\n .addGap(50, 50, 50))\n .addComponent(panel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Melee_Flame)\n .addComponent(Sacrifice_Fireworks))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(Switch)\n .addComponent(Heal_GroupHeal)\n .addComponent(Fumes)\n .addComponent(HelpButton)\n .addComponent(DisplayTeams)))\n .addGap(21, 21, 21)\n .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public int checkWin() {\r\n\t int diagSum1 = 0;\r\n\t int diagSum2 = 0;\r\n\t int colSum = 0;\r\n\t int rowSum = 0;\r\n\t int j = 0;\r\n\t String winner = \"\";\r\n\t \r\n\t \r\n\r\n\t diagSum1 = buttons[0][2].getValue() + buttons[1][1].getValue() + buttons[2][0].getValue();\r\n\t diagSum2 = buttons[0][0].getValue() + buttons[1][1].getValue() + buttons[2][2].getValue();\r\n\r\n\t if(diagSum1 == 3 || diagSum2 == 3) {\r\n\t winner = \"computer\";\r\n\t \t message.setText(\"COMPUTER WINS!\");\r\n\t setPanelEnabled(board, false);\r\n\t\t aiscore.setText(Integer.toString(computerscore+=2));\r\n\t\t restart.setVisible(true);\r\n\t\t j=1;\r\n\r\n\t }\r\n\t if(diagSum1 == -3 || diagSum2 == -3) {\r\n\t winner = \"you win\";\r\n\t setPanelEnabled(board, false);\r\n\t \tmessage.setText(\"YOU WIN\");\r\n\t humanscore.setText(Integer.toString(playerscore+=2));\r\n\t restart.setVisible(true);\r\n\t j=1;\r\n\t }\r\n\r\n\t for(int x = 0; x<3; x++) {\r\n\t for(int y = 0; y<3; y++) {\r\n\t rowSum += buttons[x][y].getValue(); \r\n\t colSum += buttons[y][x].getValue();\r\n\t }\r\n\t if(rowSum == 3 || colSum == 3 && winner.equals(\"\")) { \r\n\t setPanelEnabled(board, false);\r\n\t restart.setVisible(true);\r\n\t\t // frame.add(better);\r\n\t winner = \"Computer wins!\";\r\n\t \t message.setText(\"COMPUTER WINS!\");\r\n\t\t\t aiscore.setText(Integer.toString(computerscore+=2));\r\n\t\t\t j=1;\r\n\t }\r\n\t else if(rowSum == -3 || colSum == -3 && winner.equals(\"\")) {\r\n\t setPanelEnabled(board, false);\r\n\t\t // frame.add(restart);\r\n\t winner = \"You win\";\r\n\t \tmessage.setText(\"YOU WIN\");\r\n\t\t humanscore.setText(Integer.toString(playerscore+=2));\r\n\t\t restart.setVisible(true);\r\n\t\t // frame.add(better);\r\n\t\t j=1;\r\n\t }\r\n\t rowSum = 0;\r\n\t colSum = 0;\r\n\t }\r\n\t \r\n\t if(clicks >= 9 && winner.equals(\"\")) {\r\n winner = \"draw\";\r\n\t setPanelEnabled(board, false);\r\n\t restart.setVisible(true);\r\n\t // frame.add(better);\r\n\t message.setText(\"IT'S A DRAW!\");\r\n\t humanscore.setText(Integer.toString(playerscore+=1));\r\n\t\t aiscore.setText(Integer.toString(computerscore+=1));\r\n\t\t j=1;\r\n\t }\r\n\t return j;\r\n\t }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnStart = new javax.swing.JButton();\n lblScore1 = new javax.swing.JLabel();\n spnTurns = new javax.swing.JSpinner();\n radTwoPlayers = new javax.swing.JRadioButton();\n radThreePlayers = new javax.swing.JRadioButton();\n radFourPlayers = new javax.swing.JRadioButton();\n tbtnPlayer1 = new javax.swing.JToggleButton();\n tbtnPlayer2 = new javax.swing.JToggleButton();\n tbtnPlayer3 = new javax.swing.JToggleButton();\n tbtnPlayer4 = new javax.swing.JToggleButton();\n txtMessage = new javax.swing.JTextField();\n lblScore2 = new javax.swing.JLabel();\n lblScore3 = new javax.swing.JLabel();\n lblScore4 = new javax.swing.JLabel();\n pnBoard = new AbalonePaintPanel();\n lblTurn = new javax.swing.JLabel();\n pnlPlayer1 = new javax.swing.JPanel();\n pnlPlayer2 = new javax.swing.JPanel();\n pnlPlayer3 = new javax.swing.JPanel();\n pnlPlayer4 = new javax.swing.JPanel();\n spnTime = new javax.swing.JSpinner();\n lblTurns = new javax.swing.JLabel();\n lblTime = new javax.swing.JLabel();\n mbMenuBar = new javax.swing.JMenuBar();\n mnFile = new javax.swing.JMenu();\n miOpen = new javax.swing.JMenuItem();\n miSaveAs = new javax.swing.JMenuItem();\n miExit = new javax.swing.JMenuItem();\n mnHelp = new javax.swing.JMenu();\n miHelp = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Abalone\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n btnStart.setText(\"Start\");\n btnStart.setToolTipText(\"Start Playing!!\");\n btnStart.setBorder(null);\n btnStart.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnStartActionPerformed(evt);\n }\n });\n\n lblScore1.setBackground(new java.awt.Color(0, 0, 255));\n lblScore1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblScore1.setForeground(new java.awt.Color(0, 0, 255));\n lblScore1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblScore1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n spnTurns.setModel(new javax.swing.SpinnerNumberModel(50, 20, 150, 10));\n spnTurns.setToolTipText(\"Number of Turns\");\n spnTurns.setEditor(new javax.swing.JSpinner.NumberEditor(spnTurns, \"\"));\n spnTurns.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnTurnsStateChanged(evt);\n }\n });\n\n radTwoPlayers.setSelected(true);\n radTwoPlayers.setText(\"2 Players\");\n radTwoPlayers.setToolTipText(\"2 Players Mode\");\n radTwoPlayers.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radTwoPlayersActionPerformed(evt);\n }\n });\n\n radThreePlayers.setText(\"3 Players\");\n radThreePlayers.setToolTipText(\"3 Players Mode\");\n radThreePlayers.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radThreePlayersActionPerformed(evt);\n }\n });\n\n radFourPlayers.setText(\"4 Players\");\n radFourPlayers.setToolTipText(\"4 Players Mode\");\n radFourPlayers.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n radFourPlayersActionPerformed(evt);\n }\n });\n\n tbtnPlayer1.setBackground(new java.awt.Color(0, 0, 255));\n tbtnPlayer1.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n tbtnPlayer1.setText(\"Player 1\");\n tbtnPlayer1.setToolTipText(\"Toggle to Computer\");\n tbtnPlayer1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbtnPlayer1MouseClicked(evt);\n }\n });\n tbtnPlayer1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tbtnPlayer1ActionPerformed(evt);\n }\n });\n\n tbtnPlayer2.setBackground(new java.awt.Color(255, 0, 0));\n tbtnPlayer2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n tbtnPlayer2.setText(\"Player 2\");\n tbtnPlayer2.setToolTipText(\"Toggle to Computer\");\n tbtnPlayer2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbtnPlayer2MouseClicked(evt);\n }\n });\n tbtnPlayer2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tbtnPlayer2ActionPerformed(evt);\n }\n });\n\n tbtnPlayer3.setBackground(new java.awt.Color(0, 255, 0));\n tbtnPlayer3.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n tbtnPlayer3.setText(\"Player 3\");\n tbtnPlayer3.setToolTipText(\"Toggle to Computer\");\n tbtnPlayer3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbtnPlayer3MouseClicked(evt);\n }\n });\n tbtnPlayer3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tbtnPlayer3ActionPerformed(evt);\n }\n });\n\n tbtnPlayer4.setBackground(new java.awt.Color(255, 165, 0));\n tbtnPlayer4.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n tbtnPlayer4.setText(\"Player 4\");\n tbtnPlayer4.setToolTipText(\"Toggle to Computer\");\n tbtnPlayer4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tbtnPlayer4MouseClicked(evt);\n }\n });\n tbtnPlayer4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tbtnPlayer4ActionPerformed(evt);\n }\n });\n\n txtMessage.setEditable(false);\n txtMessage.setToolTipText(\"Messages\");\n\n lblScore2.setBackground(new java.awt.Color(255, 0, 0));\n lblScore2.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblScore2.setForeground(new java.awt.Color(255, 0, 0));\n lblScore2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblScore2.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n lblScore3.setBackground(new java.awt.Color(0, 200, 0));\n lblScore3.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblScore3.setForeground(new java.awt.Color(0, 170, 0));\n lblScore3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblScore3.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n lblScore4.setBackground(new java.awt.Color(255, 165, 0));\n lblScore4.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n lblScore4.setForeground(new java.awt.Color(255, 165, 0));\n lblScore4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblScore4.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n pnBoard.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));\n pnBoard.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n pnBoard.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n pnBoardMouseDragged(evt);\n }\n });\n pnBoard.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n pnBoardMousePressed(evt);\n }\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n pnBoardMouseReleased(evt);\n }\n });\n\n javax.swing.GroupLayout pnBoardLayout = new javax.swing.GroupLayout(pnBoard);\n pnBoard.setLayout(pnBoardLayout);\n pnBoardLayout.setHorizontalGroup(\n pnBoardLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n pnBoardLayout.setVerticalGroup(\n pnBoardLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 523, Short.MAX_VALUE)\n );\n\n lblTurn.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n lblTurn.setText(\"Turn:\");\n\n pnlPlayer1.setBackground(new java.awt.Color(200, 200, 200));\n\n javax.swing.GroupLayout pnlPlayer1Layout = new javax.swing.GroupLayout(pnlPlayer1);\n pnlPlayer1.setLayout(pnlPlayer1Layout);\n pnlPlayer1Layout.setHorizontalGroup(\n pnlPlayer1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 44, Short.MAX_VALUE)\n );\n pnlPlayer1Layout.setVerticalGroup(\n pnlPlayer1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n pnlPlayer2.setBackground(new java.awt.Color(200, 200, 200));\n\n javax.swing.GroupLayout pnlPlayer2Layout = new javax.swing.GroupLayout(pnlPlayer2);\n pnlPlayer2.setLayout(pnlPlayer2Layout);\n pnlPlayer2Layout.setHorizontalGroup(\n pnlPlayer2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 44, Short.MAX_VALUE)\n );\n pnlPlayer2Layout.setVerticalGroup(\n pnlPlayer2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n pnlPlayer3.setBackground(new java.awt.Color(200, 200, 200));\n\n javax.swing.GroupLayout pnlPlayer3Layout = new javax.swing.GroupLayout(pnlPlayer3);\n pnlPlayer3.setLayout(pnlPlayer3Layout);\n pnlPlayer3Layout.setHorizontalGroup(\n pnlPlayer3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 44, Short.MAX_VALUE)\n );\n pnlPlayer3Layout.setVerticalGroup(\n pnlPlayer3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n pnlPlayer4.setBackground(new java.awt.Color(200, 200, 200));\n\n javax.swing.GroupLayout pnlPlayer4Layout = new javax.swing.GroupLayout(pnlPlayer4);\n pnlPlayer4.setLayout(pnlPlayer4Layout);\n pnlPlayer4Layout.setHorizontalGroup(\n pnlPlayer4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 44, Short.MAX_VALUE)\n );\n pnlPlayer4Layout.setVerticalGroup(\n pnlPlayer4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n\n spnTime.setModel(new javax.swing.SpinnerNumberModel(300, 60, 1800, 60));\n spnTime.setToolTipText(\"Time Limit\");\n spnTime.setEditor(new javax.swing.JSpinner.NumberEditor(spnTime, \"\"));\n spnTime.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n spnTimeStateChanged(evt);\n }\n });\n\n lblTurns.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n lblTurns.setText(\"Turns:\");\n\n lblTime.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n lblTime.setText(\"Time:\");\n\n mnFile.setText(\"File\");\n\n miOpen.setText(\"Open...\");\n miOpen.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n miOpenActionPerformed(evt);\n }\n });\n mnFile.add(miOpen);\n\n miSaveAs.setText(\"Save As...\");\n miSaveAs.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n miSaveAsActionPerformed(evt);\n }\n });\n mnFile.add(miSaveAs);\n\n miExit.setText(\"Exit\");\n miExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n miExitActionPerformed(evt);\n }\n });\n mnFile.add(miExit);\n\n mbMenuBar.add(mnFile);\n\n mnHelp.setText(\"Help\");\n\n miHelp.setText(\"Help\");\n miHelp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n miHelpActionPerformed(evt);\n }\n });\n mnHelp.add(miHelp);\n\n mbMenuBar.add(mnHelp);\n\n setJMenuBar(mbMenuBar);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnStart, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(txtMessage))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(lblScore1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblScore2, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblScore3, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(lblScore4, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(radTwoPlayers)\n .addGap(18, 18, 18)\n .addComponent(radThreePlayers)\n .addGap(18, 18, 18)\n .addComponent(radFourPlayers))\n .addGroup(layout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addComponent(lblTurns, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(spnTurns, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lblTime, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(8, 8, 8)\n .addComponent(spnTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(lblTurn, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(11, 11, 11)\n .addComponent(tbtnPlayer1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(pnlPlayer1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(6, 6, 6)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tbtnPlayer2, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pnlPlayer2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tbtnPlayer3, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(pnlPlayer3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(pnlPlayer4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(tbtnPlayer4, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(pnBoard, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(11, 11, 11))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tbtnPlayer4)\n .addComponent(tbtnPlayer3)\n .addComponent(tbtnPlayer2)\n .addComponent(tbtnPlayer1)\n .addComponent(radFourPlayers)\n .addComponent(radThreePlayers)\n .addComponent(radTwoPlayers))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(pnlPlayer2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(lblTurn)\n .addComponent(spnTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(spnTurns, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(lblTurns)\n .addComponent(lblTime))\n .addComponent(pnlPlayer1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pnlPlayer4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pnlPlayer3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(lblScore3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(lblScore2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE)\n .addComponent(lblScore1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(lblScore4, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(pnBoard, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(11, 11, 11)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnStart, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtMessage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n txtMessage.getAccessibleContext().setAccessibleName(\"\");\n\n pack();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n removeAll();\n switch (in) {\n case 1:\n initial();\n button.setToolTipText(\"To main menu\");\n break;\n case 2:\n settings();\n button.setToolTipText(\"To settings\");\n break;\n default:\n highScores();\n button.setToolTipText(\"To high scores\");\n break;\n }\n revalidate();\n repaint();\n }", "public void actionPerformed(ActionEvent e) \n\t{\t\t\t\t\n\t\t//Will close the JFrame if user clicks the exit button\n\t\t//Displays the main menu\n\t\tif (e.getSource()==exitButton)\n\t\t{\n\t\t\tif(isTimerActive)\n\t\t\t{\n\t\t\t\ttimer.stop();\n\t\t\t}\n\t\t\tdispose();\n\t\t\tnew GoogleplexMenu();\n\t\t}\n\t\t\n\t\t//Will reset the number boxes\n\t\tif (e.getSource()==resetButton)\n\t\t{\n\t\t\tnum1 = -1;\n\t\t\tnum2 = -1;\n\t\t\tnum3 = -1;\n\t\t\tnum1Label.setText(\"\");\n\t\t\tnum2Label.setText(\"\");\n\t\t\tnum3Label.setText(\"\");\n\t\t\t\n\t\t\t//Will re-enable all the number buttons\n\t\t\tfor(int i = 0; i < 9; i++)\n\t\t\t{\n\t\t\t\tbuttonList[i].setEnabled(true);\n\t\t\t}\n\t\t\tcheckEquationButton.setEnabled(false);\n\t\t}//end if\n\t\t\n\t\t//Check if the equation is right when the check button is clicked\n\t\t//give points if equation is correct\n\t\t//clear bonus boxes if equation is incorrect\n\t\tif (e.getSource()==checkEquationButton)\n\t\t{\n\t\t\tint num1 = Integer.parseInt(num1Label.getText());\n\t\t\tint num2 = Integer.parseInt(num2Label.getText());\n\t\t\tint num3 = Integer.parseInt(num3Label.getText());\n\t\t\t\n\t\t\t//Goes to method to check is equation is correct\n\t\t\tboolean correctEquation = checkEquation(num1, num2, num3);\n\t\t\t\n\t\t\tif (correctEquation)\n\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t//End bonus points if applicable\n\t\t\t\tif(isThereBonus)\n\t\t\t\t{\n\t\t\t\t\tscore += getBonusPoints();\n\t\t\t\t}\n\t\t\t\t//Add points\n\t\t\t\tscore++;\n\t\t\t\t//Clear the boxes\n\t\t\t\tbonus1Label.setText(\"\"+num1);\n\t\t\t\tbonus2Label.setText(\"\"+num2);\n\t\t\t\tbonus3Label.setText(\"\"+num3);\n\t\t\t\tisThereBonus = true;\n\t\t\t\t//Changes image to a check mark\n\t\t\t\tcheckEquationIcon = new ImageIcon(\"Images/checkmark.png\");\n\t\t\t\tcheckEquationLabel.setIcon(checkEquationIcon);\n\t\t\t\t//Get new random numbers and locations\n\t\t\t\trefresh();\n\t\t\t}//end if \n\t\t\t\n\t\t\telse\t\t//if equation is not right\n\t\t\t{\n\t\t\t\tbonus1Label.setText(\"\");\n\t\t\t\tbonus2Label.setText(\"\");\n\t\t\t\tbonus3Label.setText(\"\");\n\t\t\t\tisThereBonus = false;\n\t\t\t\t//changes image to an x\n\t\t\t\tcheckEquationIcon = new ImageIcon(\"Images/xmark.png\");\n\t\t\t\tcheckEquationLabel.setIcon(checkEquationIcon);\n\t\t\t}// end else\n\t\t\tscoreLabel.setText(\"\" + score);\n\t\t}//end if \n\t\t\n\t\t//Will check which number the user clicked\n\t\t//and places it in the first available box\n\t\tfor(int i = 0; i <9; i++)\n\t\t{\n\t\t\tif(e.getSource()==buttonList[i])\n\t\t\t{\n\t\t\t\tif (num1 == -1)\n\t\t\t\t{\n\t\t\t\t\tnum1 = randomNumList[i];\n\t\t\t\t}\n\t\t\t\telse if (num2 == -1)\n\t\t\t\t{\n\t\t\t\t\tnum2 = randomNumList[i];\n\t\t\t\t}\n\t\t\t\telse if (num3 == -1)\n\t\t\t\t{\n\t\t\t\t\tnum3 = randomNumList[i];\n\t\t\t\t}\n\t\t\t\tbuttonList[i].setEnabled(false);\n\t\t\t}// end if\n\t\t}//end for loop\n\t\t\t\n\t\t//Once the user has selected their first number, display it in num1Label\n\t\tif (num1 != -1)\n\t\t{\n\t\t\tnum1Label.setText(\"\"+num1);\n\t\t\tnum1Label.setHorizontalAlignment(JLabel.CENTER);\n\t\t}// end if\n\t\t\n\t\t//Once the user has selected their second number, display it in num2Label\n\t\tif(num2 != -1)\n\t\t{ \n\t\t\tnum2Label.setText(\"\"+num2);\n\t\t\tnum2Label.setHorizontalAlignment(JLabel.CENTER);\n\t\t}//end if\n\t\t\n\t\t//Once the user has selected their third number, display it in num3Label\n\t\tif(num3 != -1)\n\t\t{ \n\t\t\tnum3Label.setText(\"\"+num3);\n\t\t\tnum3Label.setHorizontalAlignment(JLabel.CENTER);\n\t\t\tcheckEquationButton.setEnabled(true);\n\t\t}// end if\n\t\t\n\t\trepaint();\t\t\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tif (game.getPlayerID() == -1)\n\t\t\t{\n\t\t\t\tclearMsgArea();\n\t\t\t\tgame.makeConnection();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprintMsg(\"You're already in the game.\\n\");\n\t\t\t}\n\t\t\t/*\n\t\t\tBigTwoDeck ndeck = new BigTwoDeck();\n\t\t\tndeck.shuffle();\n\t\t\tgame.start(ndeck);\n\t\t\t*/\n\n\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tsecuencia = button.getSecuencia();\r\n\t\tporcentaje = Float.parseFloat(button.getPorcentaje().getText());\r\n\t\tcorrect = false;\r\n\t\tif (button.getTypeN().isSelected()) {\r\n\t\t\ttype = 'n';\r\n\t\t} else {\r\n\t\t\ttype = 'p';\r\n\t\t}\r\n\r\n\t\twhile (correct) {\r\n\t\t\tif (button.getSecuencia() == null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbutton.getResult().setText(\"No se ha introducido una secuencia\");\r\n\t\t\t\t\tcorrect = false;\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tSystem.out.print(\"Error en la pantalla: \" + e.toString());\r\n\t\t\t\t}\r\n\t\t\t} else if (button.getPorcentaje().getText() == null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbutton.getResult().setText(\"No se ha introducido el porcentaje\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tSystem.out.print(\"Error en la pantalla: \" + e.toString());\r\n\t\t\t\t\tcorrect = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcorrect = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!correct) {\r\n\t\t\tBlastController bCnt = new BlastController();\r\n\t\t\ttry {\r\n\t\t\t\tString result = bCnt.blastQuery(type, dataBaseFile, dataBaseIndexes, (float) porcentaje, secuencia);\r\n\t\t\t\tbutton.printResult(result);\r\n\t\t\t} catch (Exception exc) {\r\n\t\t\t\tSystem.out.println(\"Error en la llamada: \" + exc.toString());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void initialize()throws InvalidInputException {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t\n\t\tframe.setTitle(\"Set Total Thinking Time\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tframe.setContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\t\n\t\t// set total thinking time panel \n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBounds(0, 0, 450, 278);\n\t\tcontentPane.add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJLabel lblSetTotalThinkingTime = new JLabel(\"Set the total thinking time (minutes and seconds) for both players\");\n\t\tlblSetTotalThinkingTime.setBounds(18, 54, 415, 16);\n\t\tpanel.add(lblSetTotalThinkingTime);\n\t\t\n\t\t\n\t\t\n\t\tJLabel lblMinutes = new JLabel(\"Minutes:\");\n\t\tlblMinutes.setBounds(141, 147, 54, 16);\n\t\tpanel.add(lblMinutes);\n\t\t\n\t\tmin = new JTextField();\n\t\tmin.setBounds(207, 142, 130, 26);\n\t\tpanel.add(min);\n\t\tmin.setColumns(10);\n\t\t\n\t\tJLabel lblSeconds = new JLabel(\"Seconds:\");\n\t\tlblSeconds.setBounds(139, 111, 56, 16);\n\t\tpanel.add(lblSeconds);\n\t\t\n\t\tsec = new JTextField();\n\t\tsec.setBounds(207, 106, 130, 26);\n\t\tpanel.add(sec);\n\t\tsec.setColumns(10);\n\t\t\n\t\tJButton btnOk = new JButton(\"OK\");\n\t\tbtnOk.setBounds(200, 205, 75, 30);\n\t\tpanel.add(btnOk);\n\t\t\n\t\tJLabel inputError = new JLabel(\"Invalid Inputs Given\");\n\t\tinputError.setBounds(170, 180, 130, 20);\n\t\tinputError.setForeground(Color.RED);\n\t\tpanel.add(inputError);\n\t\tinputError.setVisible(false);\n\t\t\n\t\t\n\t\t\n\t\t// initialize board panel\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\tpanel_1.setBounds(0, 0, 450, 278);\n\t\tcontentPane.add(panel_1);\n\t\tpanel_1.setLayout(null);\n\t\tpanel_1.setVisible(false);\n\t\t\n\t\t\n\t\t\n\t\tJButton btnInitializeBoard = new JButton(\"Initialize Board\");\n\t\tbtnInitializeBoard.setBounds(120, 100, 220, 30);\n\t\tpanel_1.add(btnInitializeBoard);\n\t\t\n\t\tbtnOk.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tString min_input = min.getText();\n\t\t\t\tString sec_input = sec.getText();\n\t\t\t\tint input_min = -1;\n\t\t\t\tint input_sec = -1;\n\t\t\t\ttry {\n\t\t\t\t\tinput_min = Integer.parseInt(min_input);\n\t\t\t\t}catch (NumberFormatException e1) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tinput_sec = Integer.parseInt(sec_input);\n\t\t\t\t}catch(NumberFormatException e2){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// call controller method \n\t\t\t\tif(min_input.isEmpty() || sec_input.isEmpty() || input_min <0 || input_sec<0 ) {\n\t\t\t\t\tinputError.setVisible(true);\n\t\t\t\t}else if (input_min ==0 && input_sec==0) {\n\t\t\t\t\tinputError.setVisible(true);\n\t\t\t\t}else {\n\t\t\t\t\tinputError.setVisible(false);\n\t\t\t\t\tpanel.setVisible(false);\n\t\t\t\t\tpanel_1.setVisible(true);\n\t\t\t\t\tframe.setTitle(\"Initialize Board\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\t\tTime input_totalthinkingTime = new java.sql.Time(0,input_min, input_sec);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tQuoridorController.setTotalThinkingTime(input_totalthinkingTime);\n\t\t\t\t\t} catch (InvalidInputException e1) {\n\t\t\t\t\t\tinputError.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tbtnInitializeBoard.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tQuoridorController.initializeBoard();\n\t\t\t\t} catch (InvalidInputException e1) {\n\t\t\t\t}\n\n\t\t\t\t// go to board view on GUI\n\t\t\t\t\n\t\t\t\tMyQuoridor.run();\n\t\t\t\tframe.setVisible(false);\n\t\t\t\tframe.dispose();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "private void init()\n { \n JPanel control = new JPanel(); //declare control panel\n \n //CREATE BUTTONS\n JButton tourB = new JButton(\"Tour the Knight\");\n JButton resetB = new JButton(\"Reset\");\n JButton nextB = new JButton(\"Next Step\");\n JButton prevB = new JButton(\"Previous Step\");\n \n //DISABLE MOVEMENT BUTTONS, SINCE THERE IS NO TOUR YET\n nextB.setEnabled(false);\n prevB.setEnabled(false);\n\n //CREATE TEXTFIELDS\n JTextField xStartTxt = new JTextField(\"1\");\n JTextField yStartTxt = new JTextField(\"1\");\n JTextField messageTxt = new JTextField(\"Enter starting X and Y, then press Tour.\");\n \n messageTxt.setEditable(false); //message field is not editable\n \n //ACTION LISTENERS FOR BUTTONS AND TEXTFIELDS\n \n //Knight Tour button actionlistener\n tourB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n messageTxt.setText(\"Working on solution\"); // display on message\n \n kComp.setStart( Integer.parseInt(xStartTxt.getText()), Integer.parseInt(yStartTxt.getText()) );//update the starting x and y position\n \n kComp.tourKnight(); //tour the knight's tour\n \n //Disable changing start position\n xStartTxt.setEnabled(false);\n yStartTxt.setEnabled(false);\n \n //enable movement buttons\n nextB.setEnabled(true);\n prevB.setEnabled(true);\n \n //disable Knight tour buttons\n tourB.setEnabled(false);\n \n //display message\n messageTxt.setText(\"Solution on Display\");\n \n }\n });\n \n //Reset action listener\n resetB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.reset(); //call reset method\n \n //set the starting position to 1x1\n xStartTxt.setText(\"1\");\n yStartTxt.setText(\"1\");\n \n //enable the acces to start-pos fields\n xStartTxt.setEnabled(true);\n yStartTxt.setEnabled(true);\n \n //disable movement buttons\n nextB.setEnabled(false);\n prevB.setEnabled(false);\n \n //enable tour button\n tourB.setEnabled(true);\n \n //update the start position\n kComp.setStart( Integer.parseInt(xStartTxt.getText()), Integer.parseInt(yStartTxt.getText()) );\n \n //update the message box\n messageTxt.setText(\"Enter starting X and Y, then press Tour.\");\n }\n });\n \n \n //Next step movement event\n nextB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.nextStep(); //call the next step method\n }\n });\n \n //Previous step movement event\n prevB.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.prevStep(); //call the previous step method\n }\n });\n \n //Action event class for textfields\n class TextListener implements ActionListener\n {\n public void actionPerformed(ActionEvent e)\n {\n kComp.setStart( Integer.parseInt(xStartTxt.getText()), Integer.parseInt(yStartTxt.getText()) );//update the start location\n }\n }\n \n //Add the Textlistener to the texfields\n xStartTxt.addActionListener(new TextListener());\n yStartTxt.addActionListener(new TextListener());\n \n //Add 3-layered layout\n control.setLayout(new GridLayout(3,1));\n \n //Create top, middle, and bottom panels \n JPanel topP = new JPanel();\n JPanel midP = new JPanel(new GridLayout(1,3)); // 1 by 3 grid layout\n JPanel botP = new JPanel(new GridLayout(1,3)); // 1 by 3 grid layout\n \n //Add Message to Top Panel\n topP.add(messageTxt);\n \n \n //Add x-pos, y-pos, and Tour button to Middle Panel\n midP.add(xStartTxt);\n midP.add(yStartTxt);\n midP.add(tourB);\n \n //Add reset and movement buttons to Bottom Panel\n botP.add(resetB);\n botP.add(prevB);\n botP.add(nextB);\n \n //Add panels to the control panel\n control.add(topP);\n control.add(midP);\n control.add(botP);\n \n //add panel to the south of frame\n this.getContentPane().add(control, BorderLayout.SOUTH);\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n mainPanel = new javax.swing.JPanel();\n txtPass = new javax.swing.JTextField();\n butPass = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n panelCentral = new javax.swing.JLabel();\n lblSituation = new javax.swing.JLabel();\n menuBar = new javax.swing.JMenuBar();\n javax.swing.JMenu fileMenu = new javax.swing.JMenu();\n javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();\n javax.swing.JMenu helpMenu = new javax.swing.JMenu();\n javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();\n statusPanel = new javax.swing.JPanel();\n javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();\n statusMessageLabel = new javax.swing.JLabel();\n statusAnimationLabel = new javax.swing.JLabel();\n progressBar = new javax.swing.JProgressBar();\n\n mainPanel.setMaximumSize(new java.awt.Dimension(449, 317));\n mainPanel.setMinimumSize(new java.awt.Dimension(449, 317));\n mainPanel.setName(\"mainPanel\"); // NOI18N\n mainPanel.setPreferredSize(new java.awt.Dimension(449, 317));\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(himbilgame.HimbilGameApp.class).getContext().getResourceMap(HimbilGameView.class);\n txtPass.setText(resourceMap.getString(\"txtPass.text\")); // NOI18N\n txtPass.setName(\"txtPass\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(himbilgame.HimbilGameApp.class).getContext().getActionMap(HimbilGameView.class, this);\n butPass.setAction(actionMap.get(\"Click\")); // NOI18N\n butPass.setFont(resourceMap.getFont(\"butPass.font\")); // NOI18N\n butPass.setText(resourceMap.getString(\"butPass.text\")); // NOI18N\n butPass.setName(\"butPass\"); // NOI18N\n\n jLabel1.setFont(resourceMap.getFont(\"jLabel1.font\")); // NOI18N\n jLabel1.setText(resourceMap.getString(\"jLabel1.text\")); // NOI18N\n jLabel1.setName(\"jLabel1\"); // NOI18N\n\n panelCentral.setBackground(resourceMap.getColor(\"panelCentral.background\")); // NOI18N\n panelCentral.setFont(resourceMap.getFont(\"panelCentral.font\")); // NOI18N\n panelCentral.setForeground(resourceMap.getColor(\"panelCentral.foreground\")); // NOI18N\n panelCentral.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n panelCentral.setText(resourceMap.getString(\"panelCentral.text\")); // NOI18N\n panelCentral.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n panelCentral.setDisabledIcon(resourceMap.getIcon(\"panelCentral.disabledIcon\")); // NOI18N\n panelCentral.setName(\"panelCentral\"); // NOI18N\n\n lblSituation.setFont(resourceMap.getFont(\"lblSituation.font\")); // NOI18N\n lblSituation.setForeground(resourceMap.getColor(\"lblSituation.foreground\")); // NOI18N\n lblSituation.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblSituation.setText(resourceMap.getString(\"lblSituation.text\")); // NOI18N\n lblSituation.setName(\"lblSituation\"); // NOI18N\n\n javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);\n mainPanel.setLayout(mainPanelLayout);\n mainPanelLayout.setHorizontalGroup(\n mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addGap(154, 154, 154)\n .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addComponent(txtPass, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(butPass))\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(panelCentral, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addGap(60, 60, 60)\n .addComponent(lblSituation, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(106, Short.MAX_VALUE))\n );\n mainPanelLayout.setVerticalGroup(\n mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(mainPanelLayout.createSequentialGroup()\n .addGap(88, 88, 88)\n .addComponent(lblSituation, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(29, 29, 29)\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(butPass)\n .addComponent(txtPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(50, 50, 50)\n .addComponent(panelCentral, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(56, Short.MAX_VALUE))\n );\n\n menuBar.setName(\"menuBar\"); // NOI18N\n\n fileMenu.setText(resourceMap.getString(\"fileMenu.text\")); // NOI18N\n fileMenu.setName(\"fileMenu\"); // NOI18N\n\n exitMenuItem.setAction(actionMap.get(\"quit\")); // NOI18N\n exitMenuItem.setName(\"exitMenuItem\"); // NOI18N\n fileMenu.add(exitMenuItem);\n\n menuBar.add(fileMenu);\n\n helpMenu.setText(resourceMap.getString(\"helpMenu.text\")); // NOI18N\n helpMenu.setName(\"helpMenu\"); // NOI18N\n\n aboutMenuItem.setAction(actionMap.get(\"showAboutBox\")); // NOI18N\n aboutMenuItem.setName(\"aboutMenuItem\"); // NOI18N\n helpMenu.add(aboutMenuItem);\n\n menuBar.add(helpMenu);\n\n statusPanel.setName(\"statusPanel\"); // NOI18N\n statusPanel.setPreferredSize(new java.awt.Dimension(0, 0));\n\n statusPanelSeparator.setName(\"statusPanelSeparator\"); // NOI18N\n\n statusMessageLabel.setName(\"statusMessageLabel\"); // NOI18N\n\n statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n statusAnimationLabel.setName(\"statusAnimationLabel\"); // NOI18N\n\n progressBar.setName(\"progressBar\"); // NOI18N\n\n javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);\n statusPanel.setLayout(statusPanelLayout);\n statusPanelLayout.setHorizontalGroup(\n statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)\n .addGroup(statusPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(statusMessageLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 318, Short.MAX_VALUE)\n .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(statusAnimationLabel)\n .addContainerGap())\n );\n statusPanelLayout.setVerticalGroup(\n statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(statusPanelLayout.createSequentialGroup()\n .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(statusMessageLabel)\n .addComponent(statusAnimationLabel)\n .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(3, 3, 3))\n );\n\n setComponent(mainPanel);\n setMenuBar(menuBar);\n setStatusBar(statusPanel);\n }", "public void actionPerformed(ActionEvent arg0) {\n \t\tfor (int row = 0; row <=2; row++) {\r\n \t\t\tfor (int col = 0; col <=2; col++) {\r\n \t\t\t\t// as the loop continues on each button is getting enabled\r\n \t\t\t\tboxes[row][col].setEnabled(true);\r\n \t\t\t\t// the icon is set to the carback image \r\n \t\t\t\tboxes[row][col].setDisabledIcon(tictac.c);\r\n \t\t\t\t// the check is reset for each box so clicks is 0 to old memory is deleted\r\n \t\t\t\ttictac.check[row][col] = 0;\r\n \t\t\t\t// win is 0 so the gae can be played again\r\n \t\t\t\ttictac.win = 0;\r\n \t\t\t\t// number of clicks = 0 so that the game can be played again\r\n \t\t\t\ttictac.clicks = 0;\r\n \t\t\t\t// set the colours of the txtboxes back to white since they flash yellow when a win in the category is added\r\n \t\t txtAdidas.setBackground(Color.WHITE);\r\n \t\t txtNike.setBackground(Color.WHITE);\r\n \t\t txtTie.setBackground(Color.WHITE);\r\n \t\t\t}\r\n \t\t}\r\n \t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tswitch( FinalJeopardyScreen.this.stage )\n\t\t\t{\n\t\t\t\tcase TITLE:\n\t\t\t\t\tFinalJeopardyScreen.this.stage = FinalJeopardyStage.CATEGORY;\n\t\t\t\t\tFinalJeopardyScreen.this.mainScreen.label = FinalJeopardyScreen.this.category.name;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CATEGORY:\n\t\t\t\t\tFinalJeopardyScreen.this.stage = FinalJeopardyStage.CLUE;\n\t\t\t\t\tFinalJeopardyScreen.this.mainScreen.label = FinalJeopardyScreen.this.clue.text;\n\t\t\t\t\tbreak;\n\t\t\t\tcase CLUE:\n\t\t\t\t\tFinalJeopardyScreen.this.stage = FinalJeopardyStage.ANSWER;\n\t\t\t\t\tFinalJeopardyScreen.this.mainScreen.label = FinalJeopardyScreen.this.clue.answer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ANSWER:\n\t\t\t\t\tLogger.log( \"Final Jeopardy is complete!\");\n\t\t\t\t\tFinalJeopardyScreen.this.controller.startNextRound();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t\tMySQLConnect dal = new MySQLConnect();\r\n\t\t\ttry {\r\n\t\t\t\tString name;\r\n\t\t\t\tString date;\r\n\t\t\t\tString desc;\r\n\t\t\t\tString course;\r\n\t\t\t\tString type;\r\n\t\t\t\tString prior;\r\n\t\t\t\tScanner scan = new Scanner(System.in);\r\n\t\t\t\tSystem.out.println(\"Name: \");\r\n\t\t\t\tname = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Due Date(YYYY-MM-DD): \");\r\n\t\t\t\tdate = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Description: \");\r\n\t\t\t\tdesc = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Course: \");\r\n\t\t\t\tcourse = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Type: \");\r\n\t\t\t\ttype = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"Priority: \");\r\n\t\t\t\tprior = scan.nextLine();\r\n\t\t\t\tSystem.out.println(\"The following form was added to the database:\");\r\n\t\t\t\tString[] check = dal.addForm(name.toString(),\"admin\",date.toString(),desc.toString(),course.toString(),type.toString(),prior.toString());\r\n\t\t\t\tfor(int i=0; i<check.length; i++){\r\n\t\t\t\t\tSystem.out.print(check[i] + \" \");\r\n\t\t\t\t}\r\n\t\t\t\t//test confirmation that button works\r\n\t\t\t\ttextArea.append(\"Form Submitted!\\n\");\r\n\t\t\t} catch (SQLException ex) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}", "private void init() {\n\n if (isRunning && USE_RUN_WARNINGS) {\n JOptionPane\n .showMessageDialog(\n null,\n \"WARNING: You are modifying system parameters while a simulation is running. \\n \"\n + \"It is reccomended that you first stop the simulation using the stop button.\\n\"\n + \" Some functions may not behave as they are supposed to.\",\n \"Warning!\", JOptionPane.WARNING_MESSAGE);\n }\n\n setModal(true);\n setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\n // Setup the internal content pane to hold the user content pane\n // and the standard button panel\n JPanel internalContentPane = new JPanel();\n\n internalContentPane.setLayout(new BorderLayout(COMPONENT_SPACING,\n COMPONENT_SPACING));\n\n internalContentPane.setBorder(BorderFactory.createEmptyBorder(\n COMPONENT_SPACING, COMPONENT_SPACING, COMPONENT_SPACING,\n COMPONENT_SPACING));\n\n // Create the standard \"Ok\" Button\n Action okAction = new AbstractAction(\"OK\") {\n public void actionPerformed(final ActionEvent actionEvent) {\n if (isValidData()) {\n myIsDialogCancelled = false;\n closeDialogOk();\n }\n }\n };\n\n // Create the standard \"Cancel\" Button\n Action cancelAction = new AbstractAction(\"Cancel\") {\n public void actionPerformed(final ActionEvent actionEvent) {\n myIsDialogCancelled = true;\n closeDialogCancel();\n dispose();\n }\n };\n\n JPanel buttonPanel = new JPanel();\n\n buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));\n\n okButton = new JButton(okAction);\n buttonPanel.add(customButtonPanel);\n buttonPanel.add(okButton);\n cancelButton = new JButton(cancelAction);\n buttonPanel.add(cancelButton);\n\n getRootPane().setDefaultButton(okButton);\n\n internalContentPane.add(buttonPanel, BorderLayout.SOUTH);\n\n // Initialize the user content pane with a JPanel\n setContentPane(new JPanel(new BorderLayout()));\n\n super.setContentPane(internalContentPane);\n\n // Finally, add a listener for the window close button.\n // Process this event the same as the \"Cancel\" button.\n WindowAdapter windowAdapter = new WindowAdapter() {\n public void windowClosing(final WindowEvent windowEvent) {\n myIsDialogCancelled = true;\n closeDialogCancel();\n }\n };\n\n addWindowListener(windowAdapter);\n\n this.getRootPane().registerKeyboardAction(\n actionListener,\n KeyStroke.getKeyStroke(KeyEvent.VK_W, Toolkit\n .getDefaultToolkit().getMenuShortcutKeyMask()), 0);\n\n // this.setAlwaysOnTop(true); //BREAKS SOME VERSIONS\n pack();\n\n }", "public static void buttonSetup(JFrame f)\r\n {\r\n int x = 3;\r\n int y = 3;\r\n JPanel panel = new JPanel();\r\n JPanel buttonRow1 = new JPanel();\r\n JPanel panel2 = new JPanel();\r\n JPanel buttonRow2 = new JPanel();\r\n JButton insertCar = new JButton(\"Insert Car\");\r\n JButton insertBus = new JButton(\"Insert Bus\");\r\n JButton insertTruck = new JButton(\"Insert Truck\");\r\n rightTurn.addActionListener(new ActionListener()\r\n { \r\n public void actionPerformed(ActionEvent e)\r\n { \r\n frame.setVisible(false);\r\n nextTurn(\"right\");\r\n } \r\n }); \r\n \r\n JButton endOfTurn = new JButton(\"Next Turn\");\r\n straight.addActionListener(new ActionListener()\r\n { \r\n public void actionPerformed(ActionEvent e)\r\n { \r\n frame.setVisible(false);\r\n nextTurn(\"Straight\");\r\n } \r\n }); \r\n endOfTurn.addActionListener(new ActionListener()\r\n { \r\n public void actionPerformed(ActionEvent e)\r\n { \r\n frame.setVisible(false);\r\n nextTurn(\"Straight\");\r\n } \r\n }); \r\n \r\n insertCar.addActionListener(new ActionListener()\r\n { \r\n public void actionPerformed(ActionEvent e)\r\n { \r\n frame.setVisible(false);\r\n insertCar.setEnabled(false);\r\n insertBus.setEnabled(false);\r\n insertTruck.setEnabled(false);\r\n straight.setEnabled(true);\r\n randomInsert(\"Car\", \"Player1\");\r\n intersection();\r\n } \r\n }); \r\n \r\n insertBus.addActionListener(new ActionListener()\r\n { \r\n public void actionPerformed(ActionEvent e)\r\n { \r\n frame.setVisible(false);\r\n insertCar.setEnabled(false);\r\n insertBus.setEnabled(false);\r\n insertTruck.setEnabled(false);\r\n straight.setEnabled(true);\r\n randomInsert(\"Bus\", \"Player1\");\r\n intersection();\r\n } \r\n }); \r\n \r\n insertTruck.addActionListener(new ActionListener()\r\n { \r\n public void actionPerformed(ActionEvent e)\r\n { \r\n \r\n frame.setVisible(false);\r\n insertCar.setEnabled(false);\r\n insertBus.setEnabled(false);\r\n insertTruck.setEnabled(false);\r\n straight.setEnabled(true);\r\n randomInsert(\"Truck\", \"Player1\");\r\n intersection();\r\n } \r\n }); \r\n \r\n \r\n leftTurn.setEnabled(false);\r\n straight.setEnabled(false);\r\n rightTurn.setEnabled(false);\r\n \r\n buttonRow1.setLayout(new GridLayout(1, 3));\r\n buttonRow1.add(leftTurn);\r\n buttonRow1.add(straight);\r\n buttonRow1.add(rightTurn);\r\n \r\n buttonRow2.setLayout(new GridLayout(1, 3));\r\n buttonRow2.add(insertCar);\r\n buttonRow2.add(insertBus);\r\n buttonRow2.add(insertTruck);\r\n \r\n panel.setLayout(new GridLayout(3, 1));\r\n panel.add(buttonRow1);\r\n panel.add(buttonRow2);\r\n \r\n panel.add(endOfTurn);\r\n JPanel container = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\r\n container.add(panel);\r\n JScrollPane scrollPane = new JScrollPane(container);\r\n f.getContentPane().add(scrollPane);\r\n }", "private void designBtnActionPerformed(ActionEvent evt) {\n }", "public void repeatGui(String name){\r\n winCounter.setText(\"User Win Counter: \"+userWins);\r\n \r\n if(playAgain==false){ //if they don't want to play again\r\n if(name.equals(\"AI\")&&fullBoard()==false){\r\n instructions.setText(\"<html> The AI has won the game. \"+\"</br> Better luck next time. </br> Would you like to play again? </html>\");\r\n }\r\n else if(fullBoard()==true){\r\n instructions.setText(\"<html>Wow!, It's a tie! \"+\"</br> Would you like to play again?\");\r\n }\r\n else{\r\n instructions.setText(\"<html>Congratulations! \"+\"</br>\" +name+ \", you have won the game!</br> Would you like to play again? </html>\");\r\n }\r\n \r\n welcome.add(again);\r\n welcome.add(notAgain);\r\n again.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n notAgain.setAlignmentX(Component.CENTER_ALIGNMENT); //adding the buttons that let the user decide whtehr to play again\r\n welcome.remove(input);\r\n }\r\n \r\n if(playAgain==true){ //if they want to play again\r\n super.dispose();\r\n name1=\"\"; \r\n name2 = \"AI\"; \r\n choice = 1; \r\n mode = 1; //resetting all necessary variables and restarting the GUI\r\n whoseTurn = 1; \r\n numTurns = 0; \r\n canGo = false; \r\n randomnum = -1;\r\n AINumber = 3; \r\n erase = 0; \r\n color2=Color.magenta;\r\n AIPlayed = false; \r\n GameWon = false;\r\n playAgain = false;\r\n canPlace = true;\r\n trapBlocked = false;\r\n mustPlace = -1;\r\n \r\n for(int i = 0; i<7; i++){ //resetting everything so that the next time the GUI runs, things are not messed up\r\n shouldNotPlace[i] = -1;\r\n }\r\n \r\n okButton.removeActionListener(this); //removing all the actionlisteners becauase i dont want to have two action listeners when the gui is run again\r\n pvp.removeActionListener(this);\r\n pvai.removeActionListener(this);\r\n black.removeActionListener(this);\r\n red.removeActionListener(this);\r\n yellow.removeActionListener(this);\r\n green.removeActionListener(this);\r\n okayButton.removeActionListener(this);\r\n easyAI.removeActionListener(this);\r\n hardAI.removeActionListener(this);\r\n again.removeActionListener(this);\r\n notAgain.removeActionListener(this);\r\n p1first.removeActionListener(this);\r\n p2first.removeActionListener(this);\r\n hORt.removeActionListener(this);\r\n \r\n instructions.setText(\"Please enter your name\"); //the original thing that it's supposed to say\r\n \r\n for(int i = 0; i<6; i++){\r\n for(int j = 0; j<7; j++){\r\n arrayCircles[i][j].setColor(Color.white);\r\n }\r\n }\r\n \r\n welcome.removeAll();\r\n board.removeAll(); //removing all components from the panels\r\n \r\n remove(board); //removing the panels\r\n remove(welcome);\r\n \r\n Connect4Final frame1 = new Connect4Final(); //restarting the Frame with a new instance\r\n }\r\n }" ]
[ "0.70677197", "0.69113445", "0.67509955", "0.6696094", "0.6677591", "0.66742253", "0.6663313", "0.6624019", "0.6623674", "0.66193575", "0.66187054", "0.6603731", "0.65916574", "0.6589246", "0.6586322", "0.6566708", "0.65585744", "0.6552455", "0.6545538", "0.6526315", "0.65093195", "0.6505259", "0.6501183", "0.6499552", "0.6496304", "0.6471365", "0.6459734", "0.6443742", "0.6426989", "0.6420255", "0.6419986", "0.6409134", "0.64091283", "0.6402962", "0.64029276", "0.63998216", "0.63994795", "0.63886136", "0.63743967", "0.63637835", "0.6354603", "0.6352155", "0.635109", "0.6350746", "0.6349669", "0.6343711", "0.63434696", "0.6322018", "0.6320685", "0.6315358", "0.6312068", "0.6310875", "0.63075703", "0.6298946", "0.6290217", "0.6289806", "0.62760115", "0.6275645", "0.62667483", "0.62554777", "0.6252116", "0.62475526", "0.6247041", "0.62432814", "0.6225153", "0.62221724", "0.6220928", "0.62208986", "0.6214701", "0.6212327", "0.6211691", "0.61914694", "0.61892897", "0.6189097", "0.61890763", "0.61884445", "0.6184589", "0.61825067", "0.61737275", "0.61733365", "0.6173143", "0.61655116", "0.616523", "0.61607546", "0.6149778", "0.6149352", "0.61478895", "0.61408305", "0.614078", "0.6136924", "0.6134191", "0.61324835", "0.612887", "0.6125885", "0.61255586", "0.61236286", "0.6110441", "0.61076355", "0.61049575", "0.6099444" ]
0.6200916
71
/ renamed from: co.znly.models.PingProto$GroupMemberMetadataOrBuilder
public interface PingProto$GroupMemberMetadataOrBuilder extends MessageLiteOrBuilder { long getBolt(); Timestamp getLastBoltAt(); Timestamp getMuteUntil(); boolean getMuteUntilComeBack(); String getNickname(); ByteString getNicknameBytes(); boolean hasLastBoltAt(); boolean hasMuteUntil(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.google.protobuf.ByteString getGroupBytes();", "private GroupEventPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public final void rule__AstMemberAccess__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21980:1: ( ( ( rule__AstMemberAccess__Group_2__0 )* ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21981:1: ( ( rule__AstMemberAccess__Group_2__0 )* )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21981:1: ( ( rule__AstMemberAccess__Group_2__0 )* )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21982:1: ( rule__AstMemberAccess__Group_2__0 )*\n {\n before(grammarAccess.getAstMemberAccessAccess().getGroup_2()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21983:1: ( rule__AstMemberAccess__Group_2__0 )*\n loop174:\n do {\n int alt174=2;\n int LA174_0 = input.LA(1);\n\n if ( (LA174_0==81) ) {\n alt174=1;\n }\n\n\n switch (alt174) {\n \tcase 1 :\n \t // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21983:2: rule__AstMemberAccess__Group_2__0\n \t {\n \t pushFollow(FOLLOW_rule__AstMemberAccess__Group_2__0_in_rule__AstMemberAccess__Group__2__Impl44040);\n \t rule__AstMemberAccess__Group_2__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop174;\n }\n } while (true);\n\n after(grammarAccess.getAstMemberAccessAccess().getGroup_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Group(int groupID, String groupName, ArrayList<Integer> members, ArrayList<Integer> adminIDs) {\n this.groupID = groupID;\n this.groupName = groupName;\n this.memberIDs = memberIDs;\n this.adminIDs = adminIDs;\n }", "com.google.ads.googleads.v6.resources.AdGroupOrBuilder getAdGroupOrBuilder();", "public final void ruleAstMemberAccess() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2353:2: ( ( ( rule__AstMemberAccess__Group__0 ) ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2354:1: ( ( rule__AstMemberAccess__Group__0 ) )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2354:1: ( ( rule__AstMemberAccess__Group__0 ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2355:1: ( rule__AstMemberAccess__Group__0 )\n {\n before(grammarAccess.getAstMemberAccessAccess().getGroup()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2356:1: ( rule__AstMemberAccess__Group__0 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2356:2: rule__AstMemberAccess__Group__0\n {\n pushFollow(FOLLOW_rule__AstMemberAccess__Group__0_in_ruleAstMemberAccess4967);\n rule__AstMemberAccess__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getAstMemberAccessAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private SCSyncMemberInfo(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public interface GroupAnnotation extends Annotation {\n\n\t/**\n\t * Add a new annotation to the group\n\t *\n\t * @param member the annotation to add to the group\n\t */\n\tpublic void addMember(Annotation member);\n\n\t/**\n\t * Remove an annotation from the group\n\t *\n\t * @param member the annotation to be removed\n\t */\n\tpublic void removeMember(Annotation member);\n\n\t/**\n\t * Return the list of members for this group\n\t *\n\t * @return the list of group members\n\t */\n\tpublic List<Annotation> getMembers();\n}", "private GroupChatPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Group(String name) {\n super(name);\n this.members = new HashSet<>();\n }", "public MetadataGroup getMetadataGroup(String collectionId, String groupId, String id) {\r\n MetadataGroup toReturn = new MetadataGroup(id);\r\n if (null == collectionId || null == groupId || null == id || 0 == collectionId.length() || 0 == groupId.length()\r\n || 0 == id.length()) {\r\n setError(\"APIL_0100\", \"argument's not valid.\");\r\n return toReturn;\r\n }\r\n\r\n String[] paramFields = {\"collection_id\", \"group_id\", \"id\", \"item_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"retriever\", \"get_metadata_grp\", SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY,\r\n \"\", paramFields);\r\n request.setValue(\"collection_id\", collectionId);\r\n request.setValue(\"group_id\", groupId);\r\n request.setValue(\"id\", id);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0601\", \"failed in getting a metadata group item: coll_id=\" + collectionId + \"/group_id=\" + groupId\r\n + \"/id=\" + id);\r\n } else {\r\n wrapError(\"APIL_0601\", \"failed in getting a metadata group item: coll_id=\" + collectionId + \"/group_id=\"\r\n + groupId + \"/id=\" + id);\r\n }\r\n } else {\r\n String date = response.getValue(\"date\");\r\n toReturn = new MetadataGroup(id, date);\r\n\r\n String fieldsString = Tools.padEmptyItem(response.getValue(\"fields\"), ITEM_DELIMITER);\r\n String valuesString = Tools.padEmptyItem(response.getValue(\"values\"), ITEM_DELIMITER);\r\n\r\n String[] fields = StringTool.stringToArray(fieldsString, ITEM_DELIMITER);\r\n String[] values = StringTool.stringToArray(valuesString, ITEM_DELIMITER);\r\n\r\n if (fields.length != values.length) {\r\n setError(\"APIL_0602\", \"failed in parsing message in metadata group item retrieval: coll_id=\" + collectionId\r\n + \"/group_id=\" + groupId + \"/id=\" + id);\r\n return toReturn;\r\n }\r\n\r\n for (int i = 0; i < fields.length; i++) {\r\n if (\" \".equals(fields[i]))\r\n continue;\r\n else if (\" \".equals(values[i]))\r\n toReturn.setValue(fields[i], \"\");\r\n else\r\n toReturn.setValue(fields[i], values[i]);\r\n }\r\n }\r\n return toReturn;\r\n }", "com.google.protobuf.StructOrBuilder getMetadataFieldsOrBuilder();", "private DTeamMember(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "com.google.ads.googleads.v6.resources.AdGroupLabelOrBuilder getAdGroupLabelOrBuilder();", "com.google.protobuf.Struct getMetadataFields();", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6361:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6362:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6362:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6363:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6364:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\n loop43:\n do {\n int alt43=2;\n int LA43_0 = input.LA(1);\n\n if ( (LA43_0==39) ) {\n alt43=1;\n }\n\n\n switch (alt43) {\n \tcase 1 :\n \t // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6364:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0\n \t {\n \t pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl12985);\n \t rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop43;\n }\n } while (true);\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "com.google.protobuf.ByteString\n getGroupIdBytes();", "com.google.protobuf.ByteString\n getGroupIdBytes();", "public final void rule__XMemberFeatureCall__Group_1_1_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9304:1: ( rule__XMemberFeatureCall__Group_1_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1_1__2 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9305:2: rule__XMemberFeatureCall__Group_1_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1_1__2\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__119152);\r\n rule__XMemberFeatureCall__Group_1_1_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__2_in_rule__XMemberFeatureCall__Group_1_1_1__119155);\r\n rule__XMemberFeatureCall__Group_1_1_1__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public interface PingProto$ConversationUpdateOrBuilder extends MessageLiteOrBuilder {\n int getBolt();\n\n String getConversationUuid();\n\n ByteString getConversationUuidBytes();\n\n String getGroupName();\n\n ByteString getGroupNameBytes();\n\n C6818b getMembers(int i);\n\n int getMembersCount();\n\n List<C6818b> getMembersList();\n\n Timestamp getUntil();\n\n C7466b getWhat();\n\n int getWhatValue();\n\n boolean hasUntil();\n}", "com.google.cloud.compute.v1.MetadataOrBuilder getMetadataOrBuilder();", "public final void rule__XMemberFeatureCall__Group_1_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6068:1: ( rule__XMemberFeatureCall__Group_1_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1_1__2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6069:2: rule__XMemberFeatureCall__Group_1_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1_1__2\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__112401);\n rule__XMemberFeatureCall__Group_1_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__2_in_rule__XMemberFeatureCall__Group_1_1_1__112404);\n rule__XMemberFeatureCall__Group_1_1_1__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8523:1: ( rule__XMemberFeatureCall__Group_1_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1_1__2 )\r\n // InternalDroneScript.g:8524:2: rule__XMemberFeatureCall__Group_1_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1_1__2\r\n {\r\n pushFollow(FOLLOW_62);\r\n rule__XMemberFeatureCall__Group_1_1_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1_1__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6256:1: ( rule__XMemberFeatureCall__Group_1_1_3__1__Impl rule__XMemberFeatureCall__Group_1_1_3__2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6257:2: rule__XMemberFeatureCall__Group_1_1_3__1__Impl rule__XMemberFeatureCall__Group_1_1_3__2\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3__112772);\n rule__XMemberFeatureCall__Group_1_1_3__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__2_in_rule__XMemberFeatureCall__Group_1_1_3__112775);\n rule__XMemberFeatureCall__Group_1_1_3__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public GroupMembership getGroupMembership() { return groupMembership; }", "public final void rule__XMemberFeatureCall__Group_1_1_3__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9492:1: ( rule__XMemberFeatureCall__Group_1_1_3__1__Impl rule__XMemberFeatureCall__Group_1_1_3__2 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9493:2: rule__XMemberFeatureCall__Group_1_1_3__1__Impl rule__XMemberFeatureCall__Group_1_1_3__2\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3__119523);\r\n rule__XMemberFeatureCall__Group_1_1_3__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__2_in_rule__XMemberFeatureCall__Group_1_1_3__119526);\r\n rule__XMemberFeatureCall__Group_1_1_3__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public UserGroupMemberRecord() {\n super(UserGroupMember.USER_GROUP_MEMBER);\n }", "public Group()\n\t{\n\t\tthis.members = new ArrayList<>();\n\t\tthis.groupID= idCounter;\n\t\tidCounter++;\n\t}", "public final void rule__XMemberFeatureCall__Group_1_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9055:1: ( rule__XMemberFeatureCall__Group_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1__2 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9056:2: rule__XMemberFeatureCall__Group_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1__2\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1__118659);\r\n rule__XMemberFeatureCall__Group_1_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__2_in_rule__XMemberFeatureCall__Group_1_1__118662);\r\n rule__XMemberFeatureCall__Group_1_1__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9113:1: ( rule__XMemberFeatureCall__Group_1_1__3__Impl rule__XMemberFeatureCall__Group_1_1__4 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9114:2: rule__XMemberFeatureCall__Group_1_1__3__Impl rule__XMemberFeatureCall__Group_1_1__4\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__3__Impl_in_rule__XMemberFeatureCall__Group_1_1__318780);\r\n rule__XMemberFeatureCall__Group_1_1__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__4_in_rule__XMemberFeatureCall__Group_1_1__318783);\r\n rule__XMemberFeatureCall__Group_1_1__4();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8685:1: ( rule__XMemberFeatureCall__Group_1_1_3__1__Impl rule__XMemberFeatureCall__Group_1_1_3__2 )\r\n // InternalDroneScript.g:8686:2: rule__XMemberFeatureCall__Group_1_1_3__1__Impl rule__XMemberFeatureCall__Group_1_1_3__2\r\n {\r\n pushFollow(FOLLOW_63);\r\n rule__XMemberFeatureCall__Group_1_1_3__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1_3__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6413:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6414:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__113082);\n rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9586:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9587:2: rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__119709);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9649:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9650:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__119833);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public static List<Member> getGroupMembers(String groupId) {\n try {\n String url = BASE_URL + \"groups/\" + groupId + \"/members\";\n return extractMembers(sendAuthenticated(new HttpGet(url)));\n } catch (Exception e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6321:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6322:2: rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1__1\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__012898);\n rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1__1_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__012901);\n rule__XMemberFeatureCall__Group_1_1_3_1_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6350:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6351:2: rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__112958);\n rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public Group() {\n\t\t\tmembers = new ArrayList<String>();\n\t\t\tcreatorName = null;\n\t\t\tdemotedCreatorName = null;\n\t\t}", "public final void rule__XMemberFeatureCall__Group_1_1__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8307:1: ( rule__XMemberFeatureCall__Group_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1__2 )\r\n // InternalDroneScript.g:8308:2: rule__XMemberFeatureCall__Group_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1__2\r\n {\r\n pushFollow(FOLLOW_59);\r\n rule__XMemberFeatureCall__Group_1_1__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9597:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9598:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9598:1: ( ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )* )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9599:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9600:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0 )*\r\n loop63:\r\n do {\r\n int alt63=2;\r\n int LA63_0 = input.LA(1);\r\n\r\n if ( (LA63_0==84) ) {\r\n alt63=1;\r\n }\r\n\r\n\r\n switch (alt63) {\r\n \tcase 1 :\r\n \t // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9600:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0\r\n \t {\r\n \t pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__1__Impl19736);\r\n \t rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop63;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\r\n\tprotected void setData(GroupMember t) {\n\r\n\t}", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6382:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6383:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__013020);\n rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1_in_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__013023);\n rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static GroupMembers createEntity() {\n GroupMembers groupMembers = new GroupMembers()\n .groupId(DEFAULT_GROUP_ID)\n .subscriptionId(DEFAULT_SUBSCRIPTION_ID)\n .msisdn(DEFAULT_MSISDN)\n .groupRole(DEFAULT_GROUP_ROLE)\n .endReasonCode(DEFAULT_END_REASON_CODE)\n .remarks(DEFAULT_REMARKS)\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .createdDate(DEFAULT_CREATED_DATE)\n .createdBy(DEFAULT_CREATED_BY)\n .lastUpdatedDate(DEFAULT_LAST_UPDATED_DATE)\n .lastUpdatedBy(DEFAULT_LAST_UPDATED_BY)\n .tenantId(DEFAULT_TENANT_ID);\n return groupMembers;\n }", "private ResourceGroupProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public final void rule__XMemberFeatureCall__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5850:1: ( rule__XMemberFeatureCall__Group_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1__2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5851:2: rule__XMemberFeatureCall__Group_1_1__1__Impl rule__XMemberFeatureCall__Group_1_1__2\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__1__Impl_in_rule__XMemberFeatureCall__Group_1_1__111971);\n rule__XMemberFeatureCall__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__2_in_rule__XMemberFeatureCall__Group_1_1__111974);\n rule__XMemberFeatureCall__Group_1_1__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public static GroupMembers createUpdatedEntity() {\n GroupMembers groupMembers = new GroupMembers()\n .groupId(UPDATED_GROUP_ID)\n .subscriptionId(UPDATED_SUBSCRIPTION_ID)\n .msisdn(UPDATED_MSISDN)\n .groupRole(UPDATED_GROUP_ROLE)\n .endReasonCode(UPDATED_END_REASON_CODE)\n .remarks(UPDATED_REMARKS)\n .startDate(UPDATED_START_DATE)\n .endDate(UPDATED_END_DATE)\n .createdDate(UPDATED_CREATED_DATE)\n .createdBy(UPDATED_CREATED_BY)\n .lastUpdatedDate(UPDATED_LAST_UPDATED_DATE)\n .lastUpdatedBy(UPDATED_LAST_UPDATED_BY)\n .tenantId(UPDATED_TENANT_ID);\n return groupMembers;\n }", "public final void rule__XMemberFeatureCall__Group_1_0_0_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8930:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl rule__XMemberFeatureCall__Group_1_0_0_0__2 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8931:2: rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl rule__XMemberFeatureCall__Group_1_0_0_0__2\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl_in_rule__XMemberFeatureCall__Group_1_0_0_0__118413);\r\n rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__2_in_rule__XMemberFeatureCall__Group_1_0_0_0__118416);\r\n rule__XMemberFeatureCall__Group_1_0_0_0__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9273:1: ( rule__XMemberFeatureCall__Group_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_1__1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9274:2: rule__XMemberFeatureCall__Group_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_1__1\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__019090);\r\n rule__XMemberFeatureCall__Group_1_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__1_in_rule__XMemberFeatureCall__Group_1_1_1__019093);\r\n rule__XMemberFeatureCall__Group_1_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9557:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1__1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9558:2: rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1__1\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__019649);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1__1_in_rule__XMemberFeatureCall__Group_1_1_3_1_1__019652);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9191:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9192:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9192:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9193:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9194:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9194:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl18936);\r\n rule__XMemberFeatureCall__Group_1_1_0_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public long getGroup()\r\n { return group; }", "private PingMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6227:1: ( rule__XMemberFeatureCall__Group_1_1_3__0__Impl rule__XMemberFeatureCall__Group_1_1_3__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6228:2: rule__XMemberFeatureCall__Group_1_1_3__0__Impl rule__XMemberFeatureCall__Group_1_1_3__1\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_3__012712);\n rule__XMemberFeatureCall__Group_1_1_3__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__1_in_rule__XMemberFeatureCall__Group_1_1_3__012715);\n rule__XMemberFeatureCall__Group_1_1_3__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public int countGroups()\n/* 25: */ {\n/* 26:22 */ return this.members.size();\n/* 27: */ }", "public final void rule__XMemberFeatureCall__Group_1_0_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8880:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8881:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8881:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8882:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8883:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8883:2: rule__XMemberFeatureCall__Group_1_0_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__0_in_rule__XMemberFeatureCall__Group_1_0_0__0__Impl18320);\r\n rule__XMemberFeatureCall__Group_1_0_0_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6126:1: ( rule__XMemberFeatureCall__Group_1_1_1__3__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6127:2: rule__XMemberFeatureCall__Group_1_1_1__3__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__3__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__312522);\n rule__XMemberFeatureCall__Group_1_1_1__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9067:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9068:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9068:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9069:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9070:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\r\n int alt58=2;\r\n int LA58_0 = input.LA(1);\r\n\r\n if ( (LA58_0==23) ) {\r\n alt58=1;\r\n }\r\n switch (alt58) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9070:2: rule__XMemberFeatureCall__Group_1_1_1__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1__1__Impl18689);\r\n rule__XMemberFeatureCall__Group_1_1_1__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8361:1: ( rule__XMemberFeatureCall__Group_1_1__3__Impl rule__XMemberFeatureCall__Group_1_1__4 )\r\n // InternalDroneScript.g:8362:2: rule__XMemberFeatureCall__Group_1_1__3__Impl rule__XMemberFeatureCall__Group_1_1__4\r\n {\r\n pushFollow(FOLLOW_60);\r\n rule__XMemberFeatureCall__Group_1_1__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1__4();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9618:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9619:2: rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__019771);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1_in_rule__XMemberFeatureCall__Group_1_1_3_1_1_1__019774);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8658:1: ( rule__XMemberFeatureCall__Group_1_1_3__0__Impl rule__XMemberFeatureCall__Group_1_1_3__1 )\r\n // InternalDroneScript.g:8659:2: rule__XMemberFeatureCall__Group_1_1_3__0__Impl rule__XMemberFeatureCall__Group_1_1_3__1\r\n {\r\n pushFollow(FOLLOW_63);\r\n rule__XMemberFeatureCall__Group_1_1_3__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1_3__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0_0__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8442:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0__Impl rule__XMemberFeatureCall__Group_1_1_0_0__1 )\r\n // InternalDroneScript.g:8443:2: rule__XMemberFeatureCall__Group_1_1_0_0__0__Impl rule__XMemberFeatureCall__Group_1_1_0_0__1\r\n {\r\n pushFollow(FOLLOW_56);\r\n rule__XMemberFeatureCall__Group_1_1_0_0__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1_0_0__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8496:1: ( rule__XMemberFeatureCall__Group_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_1__1 )\r\n // InternalDroneScript.g:8497:2: rule__XMemberFeatureCall__Group_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_1__1\r\n {\r\n pushFollow(FOLLOW_61);\r\n rule__XMemberFeatureCall__Group_1_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public Group getGroupData(String groupName);", "public final void rule__XMemberFeatureCall__Group_1_0_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5725:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl rule__XMemberFeatureCall__Group_1_0_0_0__2 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5726:2: rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl rule__XMemberFeatureCall__Group_1_0_0_0__2\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl_in_rule__XMemberFeatureCall__Group_1_0_0_0__111725);\n rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__2_in_rule__XMemberFeatureCall__Group_1_0_0_0__111728);\n rule__XMemberFeatureCall__Group_1_0_0_0__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5955:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5956:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5956:1: ( ( rule__XMemberFeatureCall__Group_1_1_0_0__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5957:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5958:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5958:2: rule__XMemberFeatureCall__Group_1_1_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_1_0__0__Impl12185);\n rule__XMemberFeatureCall__Group_1_1_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9463:1: ( rule__XMemberFeatureCall__Group_1_1_3__0__Impl rule__XMemberFeatureCall__Group_1_1_3__1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9464:2: rule__XMemberFeatureCall__Group_1_1_3__0__Impl rule__XMemberFeatureCall__Group_1_1_3__1\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_3__019463);\r\n rule__XMemberFeatureCall__Group_1_1_3__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__1_in_rule__XMemberFeatureCall__Group_1_1_3__019466);\r\n rule__XMemberFeatureCall__Group_1_1_3__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6037:1: ( rule__XMemberFeatureCall__Group_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_1__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6038:2: rule__XMemberFeatureCall__Group_1_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_1__1\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__012339);\n rule__XMemberFeatureCall__Group_1_1_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__1_in_rule__XMemberFeatureCall__Group_1_1_1__012342);\n rule__XMemberFeatureCall__Group_1_1_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:33:59.726 -0500\", hash_original_method = \"9948141C64D53CA8E17E7FD2EBA08DA8\", hash_generated_method = \"CD57B10B47E4384F9C72F867F5045C16\")\n \nprivate GroupMembership() {}", "public final void rule__XMemberFeatureCall__Group_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9026:1: ( rule__XMemberFeatureCall__Group_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1__1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9027:2: rule__XMemberFeatureCall__Group_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1__1\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1__018599);\r\n rule__XMemberFeatureCall__Group_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__1_in_rule__XMemberFeatureCall__Group_1_1__018602);\r\n rule__XMemberFeatureCall__Group_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6097:1: ( rule__XMemberFeatureCall__Group_1_1_1__2__Impl rule__XMemberFeatureCall__Group_1_1_1__3 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6098:2: rule__XMemberFeatureCall__Group_1_1_1__2__Impl rule__XMemberFeatureCall__Group_1_1_1__3\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__2__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__212461);\n rule__XMemberFeatureCall__Group_1_1_1__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__3_in_rule__XMemberFeatureCall__Group_1_1_1__212464);\n rule__XMemberFeatureCall__Group_1_1_1__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6285:1: ( rule__XMemberFeatureCall__Group_1_1_3__2__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6286:2: rule__XMemberFeatureCall__Group_1_1_3__2__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__2__Impl_in_rule__XMemberFeatureCall__Group_1_1_3__212833);\n rule__XMemberFeatureCall__Group_1_1_3__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public java.lang.String[] getGroupMembersAll() {\n return groupMembersAll;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9333:1: ( rule__XMemberFeatureCall__Group_1_1_1__2__Impl rule__XMemberFeatureCall__Group_1_1_1__3 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9334:2: rule__XMemberFeatureCall__Group_1_1_1__2__Impl rule__XMemberFeatureCall__Group_1_1_1__3\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__2__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__219212);\r\n rule__XMemberFeatureCall__Group_1_1_1__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__3_in_rule__XMemberFeatureCall__Group_1_1_1__219215);\r\n rule__XMemberFeatureCall__Group_1_1_1__3();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_1__3() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9362:1: ( rule__XMemberFeatureCall__Group_1_1_1__3__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9363:2: rule__XMemberFeatureCall__Group_1_1_1__3__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__3__Impl_in_rule__XMemberFeatureCall__Group_1_1_1__319273);\r\n rule__XMemberFeatureCall__Group_1_1_1__3__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Override\n\tpublic String getGroup() {\n\t\treturn \"Group_\"+SliceName(stdClass);\n\t}", "public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {\n if (metadataBuilder_ != null) {\n return metadataBuilder_.getMessageOrBuilder();\n } else {\n return metadata_ == null ?\n com.google.protobuf.Struct.getDefaultInstance() : metadata_;\n }\n }", "public final void rule__XMemberFeatureCall__Group_1_0_0_0__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8199:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl rule__XMemberFeatureCall__Group_1_0_0_0__2 )\r\n // InternalDroneScript.g:8200:2: rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl rule__XMemberFeatureCall__Group_1_0_0_0__2\r\n {\r\n pushFollow(FOLLOW_29);\r\n rule__XMemberFeatureCall__Group_1_0_0_0__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_0_0_0__2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_0__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8820:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8821:1: ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8821:1: ( ( rule__XMemberFeatureCall__Group_1_0_0__0 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8822:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8823:1: ( rule__XMemberFeatureCall__Group_1_0_0__0 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:8823:2: rule__XMemberFeatureCall__Group_1_0_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0__0_in_rule__XMemberFeatureCall__Group_1_0__0__Impl18202);\r\n rule__XMemberFeatureCall__Group_1_0_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1__0__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9038:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9039:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9039:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9040:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9041:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9041:2: rule__XMemberFeatureCall__Group_1_1_0__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0_in_rule__XMemberFeatureCall__Group_1_1__0__Impl18629);\r\n rule__XMemberFeatureCall__Group_1_1_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public String getGroup() {\n return groupName;\n }", "public final void rule__XMemberFeatureCall__Group_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8280:1: ( rule__XMemberFeatureCall__Group_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1__1 )\r\n // InternalDroneScript.g:8281:2: rule__XMemberFeatureCall__Group_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1__1\r\n {\r\n pushFollow(FOLLOW_59);\r\n rule__XMemberFeatureCall__Group_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3_1_1__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:8739:1: ( rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1__1 )\r\n // InternalDroneScript.g:8740:2: rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1_3_1_1__1\r\n {\r\n pushFollow(FOLLOW_9);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__XMemberFeatureCall__Group_1_1_3_1_1__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__AstMemberAccess__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21921:1: ( ( '.' ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21922:1: ( '.' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21922:1: ( '.' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21923:1: '.'\n {\n before(grammarAccess.getAstMemberAccessAccess().getFullStopKeyword_0()); \n match(input,55,FOLLOW_55_in_rule__AstMemberAccess__Group__0__Impl43922); \n after(grammarAccess.getAstMemberAccessAccess().getFullStopKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "com.google.ads.googleads.v6.resources.AdGroupAdLabelOrBuilder getAdGroupAdLabelOrBuilder();", "@Override\r\n\tpublic ArrayList<Person> getAllGroupMembers(int id) throws IllegalArgumentException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tGroup g = new Group();\r\n\t\tg.setId(id);\r\n\t\tArrayList<Person> members = this.personMapper.findAllGroupMembers(g);\r\n\t\tfor (Person p : members) {\r\n\t\t\tPerson person = personMapper.findById(p.getId());\r\n\t\t\tp.setName(person.getName());\r\n\t\t}\r\n\t\treturn members;\r\n\t}", "public GroupResponse(){\n\t\t\n\t}", "public final void rule__XMemberFeatureCall__Group_1_0_0__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5675:1: ( ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5676:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5676:1: ( ( rule__XMemberFeatureCall__Group_1_0_0_0__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5677:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5678:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5678:2: rule__XMemberFeatureCall__Group_1_0_0_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__0_in_rule__XMemberFeatureCall__Group_1_0_0__0__Impl11632);\n rule__XMemberFeatureCall__Group_1_0_0_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_0_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5833:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5834:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5834:1: ( ( rule__XMemberFeatureCall__Group_1_1_0__0 ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5835:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5836:1: ( rule__XMemberFeatureCall__Group_1_1_0__0 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5836:2: rule__XMemberFeatureCall__Group_1_1_0__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0__0_in_rule__XMemberFeatureCall__Group_1_1__0__Impl11941);\n rule__XMemberFeatureCall__Group_1_1_0__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1_0_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6005:1: ( rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:6006:2: rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl_in_rule__XMemberFeatureCall__Group_1_1_0_0__112278);\n rule__XMemberFeatureCall__Group_1_1_0_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstMemberAccess__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21940:1: ( rule__AstMemberAccess__Group__1__Impl rule__AstMemberAccess__Group__2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21941:2: rule__AstMemberAccess__Group__1__Impl rule__AstMemberAccess__Group__2\n {\n pushFollow(FOLLOW_rule__AstMemberAccess__Group__1__Impl_in_rule__AstMemberAccess__Group__143953);\n rule__AstMemberAccess__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstMemberAccess__Group__2_in_rule__AstMemberAccess__Group__143956);\n rule__AstMemberAccess__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1__3__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9125:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_3__0 )? ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9126:1: ( ( rule__XMemberFeatureCall__Group_1_1_3__0 )? )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9126:1: ( ( rule__XMemberFeatureCall__Group_1_1_3__0 )? )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9127:1: ( rule__XMemberFeatureCall__Group_1_1_3__0 )?\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9128:1: ( rule__XMemberFeatureCall__Group_1_1_3__0 )?\r\n int alt59=2;\r\n alt59 = dfa59.predict(input);\r\n switch (alt59) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9128:2: rule__XMemberFeatureCall__Group_1_1_3__0\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__0_in_rule__XMemberFeatureCall__Group_1_1__3__Impl18810);\r\n rule__XMemberFeatureCall__Group_1_1_3__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1_3__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9521:1: ( rule__XMemberFeatureCall__Group_1_1_3__2__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:9522:2: rule__XMemberFeatureCall__Group_1_1_3__2__Impl\r\n {\r\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_3__2__Impl_in_rule__XMemberFeatureCall__Group_1_1_3__219584);\r\n rule__XMemberFeatureCall__Group_1_1_3__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__XMemberFeatureCall__Group_1_1__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5908:1: ( rule__XMemberFeatureCall__Group_1_1__3__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5909:2: rule__XMemberFeatureCall__Group_1_1__3__Impl\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__3__Impl_in_rule__XMemberFeatureCall__Group_1_1__312092);\n rule__XMemberFeatureCall__Group_1_1__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstMemberAccess__Group_2__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22034:1: ( rule__AstMemberAccess__Group_2__1__Impl rule__AstMemberAccess__Group_2__2 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:22035:2: rule__AstMemberAccess__Group_2__1__Impl rule__AstMemberAccess__Group_2__2\n {\n pushFollow(FOLLOW_rule__AstMemberAccess__Group_2__1__Impl_in_rule__AstMemberAccess__Group_2__144139);\n rule__AstMemberAccess__Group_2__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstMemberAccess__Group_2__2_in_rule__AstMemberAccess__Group_2__144142);\n rule__AstMemberAccess__Group_2__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_0_0_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5756:1: ( rule__XMemberFeatureCall__Group_1_0_0_0__2__Impl rule__XMemberFeatureCall__Group_1_0_0_0__3 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5757:2: rule__XMemberFeatureCall__Group_1_0_0_0__2__Impl rule__XMemberFeatureCall__Group_1_0_0_0__3\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__2__Impl_in_rule__XMemberFeatureCall__Group_1_0_0_0__211787);\n rule__XMemberFeatureCall__Group_1_0_0_0__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_0_0_0__3_in_rule__XMemberFeatureCall__Group_1_0_0_0__211790);\n rule__XMemberFeatureCall__Group_1_0_0_0__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void showMetadataGroup(String group)\n\t\t{\n\t\t\tm_metadataGroupsShowing.add(group);\n\t\t}", "public final void rule__XMemberFeatureCall__Group_1_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5821:1: ( rule__XMemberFeatureCall__Group_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1__1 )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5822:2: rule__XMemberFeatureCall__Group_1_1__0__Impl rule__XMemberFeatureCall__Group_1_1__1\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__0__Impl_in_rule__XMemberFeatureCall__Group_1_1__011911);\n rule__XMemberFeatureCall__Group_1_1__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1__1_in_rule__XMemberFeatureCall__Group_1_1__011914);\n rule__XMemberFeatureCall__Group_1_1__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstMemberAccess__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21969:1: ( rule__AstMemberAccess__Group__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21970:2: rule__AstMemberAccess__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__AstMemberAccess__Group__2__Impl_in_rule__AstMemberAccess__Group__244013);\n rule__AstMemberAccess__Group__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__XMemberFeatureCall__Group_1_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5862:1: ( ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? ) )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5863:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5863:1: ( ( rule__XMemberFeatureCall__Group_1_1_1__0 )? )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5864:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \n }\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5865:1: ( rule__XMemberFeatureCall__Group_1_1_1__0 )?\n int alt39=2;\n int LA39_0 = input.LA(1);\n\n if ( (LA39_0==20) ) {\n alt39=1;\n }\n switch (alt39) {\n case 1 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:5865:2: rule__XMemberFeatureCall__Group_1_1_1__0\n {\n pushFollow(FOLLOW_rule__XMemberFeatureCall__Group_1_1_1__0_in_rule__XMemberFeatureCall__Group_1_1__1__Impl12001);\n rule__XMemberFeatureCall__Group_1_1_1__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getXMemberFeatureCallAccess().getGroup_1_1_1()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@java.lang.Override\n public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {\n return getMetadata();\n }" ]
[ "0.5502591", "0.54318887", "0.53426754", "0.5334999", "0.527632", "0.52704954", "0.5251858", "0.5239086", "0.5203757", "0.5198238", "0.51652205", "0.51495135", "0.51230586", "0.50806296", "0.506883", "0.506484", "0.50481415", "0.50481415", "0.50448924", "0.50443274", "0.50404453", "0.5037851", "0.50308615", "0.5028025", "0.5024262", "0.50071186", "0.4990505", "0.49663526", "0.4963413", "0.4962463", "0.49587935", "0.4956583", "0.49559057", "0.4955475", "0.49546316", "0.4948484", "0.49479908", "0.49345562", "0.49327564", "0.49319023", "0.4930415", "0.49237922", "0.49168703", "0.49152896", "0.49136475", "0.4909847", "0.48960942", "0.48870966", "0.48854676", "0.48803052", "0.4879421", "0.48761666", "0.48756164", "0.48755175", "0.48727456", "0.48674703", "0.4863687", "0.48631728", "0.48590645", "0.48588383", "0.4858709", "0.4858415", "0.48558903", "0.48512182", "0.4847691", "0.48449957", "0.484451", "0.48426235", "0.48396197", "0.48317802", "0.48307475", "0.48257217", "0.48253116", "0.48243546", "0.48202994", "0.4818461", "0.48142686", "0.4810687", "0.48101753", "0.48100424", "0.48098588", "0.4808388", "0.48037755", "0.48035663", "0.4796548", "0.47959483", "0.4790966", "0.47909355", "0.47906864", "0.47896266", "0.4785267", "0.47846073", "0.47844478", "0.4762068", "0.47521803", "0.47510424", "0.47500333", "0.4743946", "0.4743003", "0.4741766" ]
0.8427374
0
Unit test designed to test the generation of monochromatic palettes with one total color.
@Test public void testMonochromaticPalettesOne() { this.runAnalogousPalette(RGB_RESULTS_ONE, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testMonochromaticPalettesThree() {\n this.runAnalogousPalette(RGB_RESULTS_THREE, 3);\n }", "@Test\r\n public void testSingleColor(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n }", "@Test\n public void testMonochromaticPalettesTwo() {\n this.runAnalogousPalette(RGB_RESULTS_TWO, 2);\n }", "@Test\r\n public void testTrivialReplacement(){\r\n List<Tone> palette = Arrays.asList(new Tone(new Color(200,10,10)),\r\n new Tone(new Color(10,200,10)),\r\n new Tone(new Color(10,10,200)));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/redBlueQuarter.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(2, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n assertEquals(palette.get(2), analysis.byCount().get(1).getTone());\r\n }", "@Test\r\n public void testConfigurableConstructor(){\r\n ColorDistanceFunction distanceFunction = mock(ColorDistanceFunction.class);\r\n when(distanceFunction.getDistance(not(eq(new Tone(Color.BLUE))), any())).thenReturn(99.9);\r\n when(distanceFunction.getDistance(eq(new Tone(Color.BLUE)), any())).thenReturn(0.0);\r\n\r\n List<Tone> palette = Arrays.asList(new Tone(Color.RED), new Tone(Color.BLUE));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer(distanceFunction);\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertContainsColor(Color.BLUE, analysis);\r\n }", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "public void createTestPattern()\n {\n int i;\n int j;\n RGBPixel p = new RGBPixel();\n\n for ( i = 0; i < getXSize(); i++ ) {\n for ( j = 0; j < getYSize(); j++ ) {\n if ( ((i % 2 != 0) && (j % 2 == 0)) || \n ((j % 2 != 0) && (i % 2 == 0)) ) {\n p.r = (byte)255;\n p.g = (byte)255;\n p.b = (byte)255;\n }\n else {\n p.r = 0;\n p.g = 0;\n p.b = 0;\n }\n if ( j == getYSize()/2 ) {\n p.r = (byte)255;\n p.g = 0;\n p.b = 0;\n }\n if ( i == getXSize()/2) {\n p.r = 0;\n p.g = (byte)255;\n p.b = 0;\n }\n putPixelRgb(i, j, p);\n }\n }\n }", "@Test\r\n public void testSameSize(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n assertDimensions(result, 2, 4);\r\n }", "@Test\n public void testSetPixelColor() {\n System.out.println(\"setPixelColor\");\n int numLEDs = 150;\n Color color = new Color(63, 123, 255);\n DotStar instance = new MockDotStar(numLEDs);\n for (int i = 0; i < numLEDs; i++) {\n instance.setPixelColor(i, color);\n }\n\n for (int i = 0; i < numLEDs; i++) {\n assertEquals((byte) 0xFF, instance.data[4 * i]);\n assertEquals((byte) color.getBlue(), instance.data[(4 * i) + 1]);\n assertEquals((byte) color.getGreen(), instance.data[(4 * i) + 2]);\n assertEquals((byte) color.getRed(), instance.data[(4 * i) + 3]);\n }\n }", "@LargeTest\n public void testColorCube() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE);\n runTest(ta, TestName.COLOR_CUBE.name());\n }", "@LargeTest\n public void testColorMatrix() {\n TestAction ta = new TestAction(TestName.COLOR_MATRIX);\n runTest(ta, TestName.COLOR_MATRIX.name());\n }", "@Test\n public void testGetColor() {\n assertEquals(r1.getColor(), new Color(255, 0, 0));\n assertEquals(r2.getColor(), new Color(255, 255, 255));\n assertEquals(r3.getColor(), new Color(255, 255, 0));\n assertEquals(r4.getColor(), new Color(200, 150, 133));\n }", "@Test\n public void metalAndColorsTest() {\n JdiSite.homePage.openNewPageByHeaderMenu(HeaderMenuItem.METALS_AND_COLORS);\n JdiSite.metalAndColorsPage.checkOpened();\n // !TODO - I decided to remove the method from MetalAndColorsForm and make it easier\n JdiSite.metalAndColorsPage.fillAndSubmitMetalAndColorsForm(DefaultsData.DEFAULT_DATA);\n JdiSite.metalAndColorsPage.checkResults(DefaultsData.DEFAULT_DATA);\n }", "@Test\n public void getColorTest() {\n assertTrue(red_piece.getColor() == Piece.Color.RED);\n assertTrue(white_piece.getColor() == Piece.Color.WHITE);\n }", "void testRandColor(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.randColor(), Color.ORANGE);\r\n t.checkExpect(this.game3.randColor(), Color.RED);\r\n t.checkExpect(this.game5.randColor(), Color.PINK);\r\n }", "@Test\n\tpublic void testNewPaintPixelTest() {\n\t\tPixel[][] greenParray = new Pixel[5][5];\n\t\tfor (int x = 0; x < 5; x++) {\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tgreenParray[x][y] = green;\n\t\t\t}\n\t\t}\n\t\t\n\t\tPixel[][] blueParray = new Pixel[5][5];\n\t\tfor (int x = 0; x < 5; x++) {\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tblueParray[x][y] = blue;\n\t\t\t}\n\t\t}\n\t}", "@Then(\"^Pobranie koloru$\")\n public void Pobranie_koloru() throws Throwable {\n\n WebDriverWait wait = new WebDriverWait(driver, 15);\n WebElement c9 = wait.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\"30373\\\"]/div/div/div/div/div/div/div/p[3]/a\")));\n\n String color = driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[6]/div/div/div[1]/div/ul/li\")).getCssValue(\"color\");\n String[] hexValue = color.replace(\"rgba(\", \"\").replace(\")\", \"\").split(\",\");\n\n int hexValue1=Integer.parseInt(hexValue[0]);\n hexValue[1] = hexValue[1].trim();\n int hexValue2=Integer.parseInt(hexValue[1]);\n hexValue[2] = hexValue[2].trim();\n int hexValue3=Integer.parseInt(hexValue[2]);\n String kolorZeStrony = String.format(\"#%02x%02x%02x\", hexValue1, hexValue2, hexValue3);\n\n Assert.assertEquals(\"#333333\", kolorZeStrony);\n\n }", "private void runAnalogousPalette(int[][][] RGB_RESULTS, int amount) {\n RGBColor monochromatic;\n String err;\n int[] coords;\n int[] monoCoords;\n for(int index = 0; index < RGB_INPUTS.length; index++) {\n coords = RGB_INPUTS[index];\n\n this.paletteOne = new MonoChromaticPalette(new RGBColor(coords[0], coords[1], coords[2]), amount);\n\n for(int index2 = 0; index2 < this.paletteOne.getColors().size(); index2++) {\n monochromatic = Color.getRGBColor(this.paletteOne.getColor(index2));\n monoCoords = RGB_RESULTS[index][index2];\n\n err = String.format(\"Monochromatic color %s was given instead of %s!\\n\",\n monochromatic, Arrays.toString(monoCoords));\n assertEquals(err, monoCoords[0], monochromatic.getRed(), 2);\n assertEquals(err, monoCoords[1], monochromatic.getGreen(), 2);\n assertEquals(err, monoCoords[2], monochromatic.getBlue(), 2);\n }\n }\n }", "@Test\n public void testPenExport(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecCommandStack.push(VecCommandFactory.GetColorCommand(VecCommandType.PEN, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"PEN #0000ff\\n\", print);\n }", "@Test\n\tpublic void testGetProcessorForColorProcessor() {\n\t\tfinal PlanarImg< ARGBType, IntArray > argbs = PlanarImgs.argbs( 1, 1, 1 );\n\t\targbs.randomAccess().get().set( 0xff010203 );\n\t\tfinal VirtualStack stack = PlanarImgToVirtualStack.wrap( argbs );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t\tstack.getProcessor( 1 );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t}", "public void testColorSensing()\n {\n // SmartDashboard.putData(\"Color Wheel Spinning\", new ControlPanelSpinFour());\n }", "@Test\n public void getColorReturnsTheRightColor() {\n assertEquals(0xaa00ff, Tetromino.T.getColor());\n }", "public PlasmaSelectionTester() {\r\n\t}", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test\r\n public void testPlayer_selectNewColor_dumb() {\r\n player2 = new Player(\"\", true);\r\n player2.setStrategy(Player.STRATEGY_DUMB);\r\n player2.setHand(strategyHand.getAllCards());\r\n player2.setLastPlayedCard(wild);\r\n String firstRandomColor = player2.selectNewColor();\r\n boolean differentColorFound = false;\r\n for(int i = 0; i < 25; i++) {\r\n String nextRandomColor = player2.selectNewColor();\r\n if(!nextRandomColor.equalsIgnoreCase(firstRandomColor)) {\r\n differentColorFound = true;\r\n }\r\n }\r\n assertTrue(differentColorFound);\r\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setSkyColor(1411);\n assertEquals(1411, homeEnvironment0.getSkyColor());\n }", "@Test(dataProvider = \"metalsColorsProvider\")\n public void metalColorsTest(MetalsColorsData metalsColorsData) {\n JdiSite.homePage.headerMenu.clickOn(\"METALS & COLORS\");\n\n //3 Fill form Metals & Colors by data\n //4 Submit form Metals & Colors\n JdiSite.metalsColorsPage.metalsColorsForm.submit(metalsColorsData);\n\n //5 Result sections should contains data below:\n JdiSite.metalsColorsPage.checkResults(metalsColorsData);\n\n }", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"DT.,X\", (Content) null, 1, 1.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(1, homeTexture0, 1, homeTexture0, 1, 0.0F);\n homeEnvironment0.getGroundTexture();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(1, homeEnvironment0.getGroundColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(1, homeEnvironment0.getLightColor());\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-826), 0.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-3047), homeTexture0, 949, homeTexture0, (-3047), 949);\n assertEquals((-3047), homeEnvironment0.getLightColor());\n \n homeEnvironment0.setLightColor(949);\n assertEquals(949, homeEnvironment0.getLightColor());\n }", "public void makeRandColor(){}", "@Test\n public void testRGBOn() {\n byte[] dataBytes = new byte[4];\n dataBytes[0] = (byte) 0x11; // 17 Red (0 .. 255)\n dataBytes[1] = (byte) 0x86; // 134 Green (0 .. 255)\n dataBytes[2] = (byte) 0xAD; // 173 Blue (0 .. 255)\n dataBytes[3] = (byte) 0x2B; // 00101011\n // Servcie Mode: Normal Mode\n // Operation hours flag: not available\n // Error State: internal Error\n // Learn Bit: Data Telegram\n // Parameter Mode: RGB\n // Status: 1 ON\n \n Map<EnoceanParameterAddress, Value> values = createBasicPacket(dataBytes);\n \n Color color = (Color) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.COLOR));\n assertEquals(17, color.getRed());\n assertEquals(134, color.getGreen());\n assertEquals(173, color.getBlue());\n \n OnOffState status = (OnOffState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.POWER));\n assertEquals(OnOffState.ON, status);\n \n ExtendedLightingStatus.ErrorState errorState = (ExtendedLightingStatus.ErrorState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.ERROR_STATE));\n assertEquals(ExtendedLightingStatus.ErrorState.INTERNAL_FAILURE, errorState);\n }", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor(17);\n assertEquals(17, homeEnvironment0.getGroundColor());\n }", "@LargeTest\n public void testGreyscale() {\n TestAction ta = new TestAction(TestName.GREYSCALE);\n runTest(ta, TestName.GREYSCALE.name());\n }", "@Test\n public void testGetColorModel(){\n IndexColorModel indexColorModel = imageData.getColorModel();\n Assert.assertNotNull(indexColorModel );\n Assert.assertEquals(ColorTable.getColorModel(0), indexColorModel);\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor((-187));\n int int0 = homeEnvironment0.getGroundColor();\n assertEquals((-187), int0);\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-375), (HomeTexture) null, (-375), (HomeTexture) null, (-375), (-375));\n homeEnvironment0.setGroundColor(0);\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "@Test @IdeGuiTest\n public void testColorPickerAlpha() throws IOException {\n myProjectFrame = importSimpleApplication();\n ThemeEditorFixture themeEditor = ThemeEditorTestUtils.openThemeEditor(myProjectFrame);\n ThemeEditorTableFixture themeEditorTable = themeEditor.getPropertiesTable();\n\n TableCell cell = row(1).column(0);\n\n JTableCellFixture colorCell = themeEditorTable.cell(cell);\n ResourceComponentFixture resourceComponent = new ResourceComponentFixture(myRobot, (ResourceComponent)colorCell.editor());\n colorCell.startEditing();\n resourceComponent.getSwatchButton().click();\n\n ChooseResourceDialogFixture dialog = ChooseResourceDialogFixture.find(myRobot);\n ColorPickerFixture colorPicker = dialog.getColorPicker();\n Color color = new Color(200, 0, 0, 200);\n colorPicker.setFormat(\"ARGB\");\n colorPicker.setColorWithIntegers(color);\n JTextComponentFixture alphaLabel = colorPicker.getLabel(\"A:\");\n SlideFixture alphaSlide = colorPicker.getAlphaSlide();\n alphaLabel.requireVisible();\n alphaSlide.requireVisible();\n colorPicker.setFormat(\"RGB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n colorPicker.setFormat(\"HSB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n\n dialog.clickOK();\n colorCell.stopEditing();\n }", "@Test\n public void testColorStaticMethods() {\n assertEquals(1, Color.RED.r(), 0.0);\n assertEquals(0, Color.RED.g(), 0.0);\n assertEquals(0, Color.RED.b(), 0.0);\n //Test Green r, g et b\n assertEquals(0, Color.GREEN.r(), 0.0);\n assertEquals(1, Color.GREEN.g(), 0.0);\n assertEquals(0, Color.GREEN.b(), 0.0);\n //Test BLUE r, g et b\n assertEquals(0, Color.BLUE.r(), 0.0);\n assertEquals(0, Color.BLUE.g(), 0.0);\n assertEquals(1, Color.BLUE.b(), 0.0);\n //Test BLACK r, g et b\n assertEquals(0, Color.BLACK.r(), 0.0);\n assertEquals(0, Color.BLACK.g(), 0.0);\n assertEquals(0, Color.BLACK.b(), 0.0);\n //Test WHITE r, g et b\n assertEquals(1, Color.WHITE.r(), 0.0);\n assertEquals(1, Color.WHITE.g(), 0.0);\n assertEquals(1, Color.WHITE.b(), 0.0);\n }", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setSkyColor((-2146412091));\n assertEquals((-2146412091), homeEnvironment0.getSkyColor());\n }", "public void _BackgroundColor() {\n testProperty(\"BackgroundColor\", new PropertyTester() {\n protected Object getNewValue(String prop, Object old) {\n return utils.isVoid(old) ? new Integer(6543) : null ;\n }\n }) ;\n }", "@LargeTest\n public void testIntrinsicsColorMatrix() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX.name());\n }", "public static void testPixellateThreeArgs(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(18, 60, 40);\n\t caterpillar.explore();\n }", "private void createTestImage()\n {\n initialImage = new byte[3 * size / 2];\n for (int i = 0; i < size; i++)\n {\n initialImage[i] = (byte) (40 + i % 199);\n }\n\n for (int i = size; i < 3 * size / 2; i += 2)\n {\n initialImage[i] = (byte) (40 + i % 200);\n initialImage[i + 1] = (byte) (40 + (i + 99) % 200);\n }\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2374, (HomeTexture) null, 2374, (HomeTexture) null, 2374, 2374);\n homeEnvironment0.setCeillingLightColor(2146573311);\n assertEquals(2146573311, homeEnvironment0.getCeillingLightColor());\n }", "public boolean testColourcomponents(EIfcpixeltexture type) throws SdaiException;", "@LargeTest\n public void testIntrinsicsColorMatrixGrey() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX_GREY);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX_GREY.name());\n }", "private PaletteFactory() {\n }", "@Test\n public void testFillOnExport(){\n VecCommandStack.push(VecCommandFactory.GetColorCommand(FILL, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"FILL #0000ff\\n\", print);\n }", "@Before\n public void testFixture() {\n rectangle = new Rectangle(\"r\", 3, 4, 0, 1, 0,1,new Color(255,0,0));\n colorChangeAnimation = new AnimationColorChange(rectangle, 0, 10,\n new Color(1,1,1));\n }", "@Test\n public void testVictoryBlue(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "public ColourTest(String name)\n\t{\n\t\tsuper(name);\n\t}", "public static void main(String[] args) {\n\t\t//Setting up some objects to test.\n\t\tColour[] four = new Colour[4];\n\t\tColour[] five = new Colour[5];\n\t\tColour[] six = new Colour[6];\n\t\t\n\t\tColour white = new Colour(\"#FFFFFF\");\n\t\tfour[0] = white;\n\t\tfive[0] = white;\n\t\tsix[0] = white;\n\t\tColour black = new Colour(\"#000000\");\n\t\tfour[1] = black;\n\t\tfive[1] = black;\n\t\tsix[1] = black;\n\t\tColour red = new Colour(\"#FF0000\");\n\t\tfour[2] = red;\n\t\tfive[2] = red;\n\t\tsix[2] = red;\n\t\tColour green = new Colour(\"#00FF00\");\n\t\tfour[3] = green;\n\t\tfive[3] = green;\n\t\tsix[3] = green;\n\t\tColour blue = new Colour(\"#0000FF\");\n\t\tfive[4] = blue;\n\t\tsix[4] = blue;\n\t\tColour bluegreen = new Colour(\"#00FFFF\");\n\t\tsix[5] = bluegreen;\n\t\t\n\t\t//Test that <5 objects can be added.\n\t\tCustomColourMap fourcolours = new CustomColourMap(four, \"Four\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that =5 objects can be added.\n\t\tCustomColourMap fivecolours = new CustomColourMap(five, \"Five\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that if >5 objects are added, it is acceptable.\n\t\tCustomColourMap sixcolours = new CustomColourMap(six, \"Six\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF\");\n\t\tSystem.out.println();\n\t\t\n\t\tfor (int i=0; i<sixcolours.GetMapSize(); i++) {\n\t\t\tSystem.out.print(sixcolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\n\t\t\t\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF #00FFFF\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the setColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tfivecolours.SetColour(i, new Colour(\"#FFFFFF\"));\n\t\t}\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #FFFFFF #FFFFFF #FFFFFF #FFFFFF \");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getMapSize method.\n\t\tSystem.out.println(fivecolours.getMapSize());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetMapSize());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getNumber method.\n\t\tSystem.out.println(fivecolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\n\t\n\t}", "public void onGenerated(Palette palette) {\n }", "public static void testPixellateOneArg(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(40);\n\t caterpillar.explore();\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(0, int0);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "static void convert_palette(char []palette,UBytePtr color_prom)\n\t{\n\t\tint i;\n\t\n int p_inc=0;\n\t\tfor (i = 0;i < 1024;i++)\n\t\t{\n\t\t\tint bit0,bit1,bit2,bit3;\n\t\n\t\n\t\t\tbit0 = (color_prom.read(0) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(0) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(0) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(0) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(2*1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(2*1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(2*1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(2*1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\n\t\t\tcolor_prom.inc();\n\t\t}\n\t\n\t\t/* reserve the last color for the transparent pen (none of the game colors has */\n\t\t/* these RGB components) */\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t}", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals(329, homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(329, homeEnvironment0.getSkyColor());\n assertEquals(0, int0);\n assertEquals(76, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(329.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"\", (Content) null, (-826), 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2140976121, homeTexture0, 949, homeTexture0, (-3047), 949);\n homeEnvironment0.getGroundTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(949.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(949, homeEnvironment0.getSkyColor());\n assertEquals((-3047), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(2140976121, homeEnvironment0.getGroundColor());\n }", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "public void testGetBackground()\n {\n assertNotNull( map.getBackground() );\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture((String) null, (Content) null, 2688.5F, 2688.5F, false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(300, homeTexture0, 1025, homeTexture0, 1025, 300);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(1025, homeEnvironment0.getLightColor());\n assertEquals(1025, int0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(300.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(300, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "void testColorChecker(Tester t) {\r\n initData();\r\n Cell topLeft = (Cell) this.game7.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game7.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game7.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game7.indexHelp(1, 1);\r\n t.checkExpect(topLeft.flooded, true);\r\n t.checkExpect(topRight.flooded, false);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(botRight.flooded, false);\r\n\r\n topRight.colorChecker(topLeft.color);\r\n t.checkExpect(topRight.flooded, true);\r\n t.checkExpect(botRight.flooded, true);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(topLeft.flooded, true);\r\n }", "private HepRepColor() {\n }", "public static void main(String[] args) {\n assert Arrays.equals(hsvToRgb(0, 0, 0), new int[] {0, 0, 0});\n assert Arrays.equals(hsvToRgb(0, 0, 1), new int[] {255, 255, 255});\n assert Arrays.equals(hsvToRgb(0, 1, 1), new int[] {255, 0, 0});\n assert Arrays.equals(hsvToRgb(60, 1, 1), new int[] {255, 255, 0});\n assert Arrays.equals(hsvToRgb(120, 1, 1), new int[] {0, 255, 0});\n assert Arrays.equals(hsvToRgb(240, 1, 1), new int[] {0, 0, 255});\n assert Arrays.equals(hsvToRgb(300, 1, 1), new int[] {255, 0, 255});\n assert Arrays.equals(hsvToRgb(180, 0.5, 0.5), new int[] {64, 128, 128});\n assert Arrays.equals(hsvToRgb(234, 0.14, 0.88), new int[] {193, 196, 224});\n assert Arrays.equals(hsvToRgb(330, 0.75, 0.5), new int[] {128, 32, 80});\n\n // Test rgbToHsv-method\n // approximate-assertions needed because of small deviations due to converting between\n // int-values and double-values.\n assert approximatelyEqualHsv(rgbToHsv(0, 0, 0), new double[] {0, 0, 0});\n assert approximatelyEqualHsv(rgbToHsv(255, 255, 255), new double[] {0, 0, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 0, 0), new double[] {0, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 255, 0), new double[] {60, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(0, 255, 0), new double[] {120, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(0, 0, 255), new double[] {240, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 0, 255), new double[] {300, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(64, 128, 128), new double[] {180, 0.5, 0.5});\n assert approximatelyEqualHsv(rgbToHsv(193, 196, 224), new double[] {234, 0.14, 0.88});\n assert approximatelyEqualHsv(rgbToHsv(128, 32, 80), new double[] {330, 0.75, 0.5});\n }", "public static void populateColors() {\n colors.put(0,Color.rgb(238, 228, 218, 0.35)); //empty tile\n colors.put(2, Color.rgb(238, 228, 218));\n colors.put(4, Color.rgb(237, 224, 200));\n colors.put(8,Color.rgb(242, 177, 121));\n colors.put(16, Color.rgb(245, 149, 99));\n colors.put(32,Color.rgb(246, 124, 95));\n colors.put(64,Color.rgb(246, 94, 59));\n colors.put(128,Color.rgb(237, 207, 114));\n colors.put(256,Color.rgb(237, 204, 97));\n colors.put(512,Color.rgb(237, 200, 80));\n colors.put(1024,Color.rgb(237, 197, 63));\n colors.put(2048,Color.rgb(237, 194, 46));\n colors.put(4096,Color.rgb(237, 194, 46));\n colors.put(8192,Color.rgb(237, 194, 46));\n\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2358, (HomeTexture) null, 2358, (HomeTexture) null, 2358, 2358);\n homeEnvironment0.setCeillingLightColor(2358);\n homeEnvironment0.setCeillingLightColor(2358);\n assertEquals(2358, homeEnvironment0.getCeillingLightColor());\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getGroundColor();\n assertEquals(11053224, int0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test\n public void testVictoryRed(){\n for (Cell c: modelTest.grid) {\n if (c.getX() == 6)\n c.setColor(Color.RED);\n }\n\n modelTest.researchVictory(1,0);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.RED);\n }", "public void testCOLOUR3() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 122, \"vert\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@org.junit.Test\r\n public void testPaint() {\r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n \r\n node.invertColor();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.invertColor();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n }", "public RandomColorProvider() {\n\t\tcurrentColorValue = 0;\n\t}", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0, int0);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.setVideoFrameRate(25);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.GROUND_COLOR;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"Super class isn't cloneable\", propertyChangeListener0);\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244786), (HomeTexture) null, (-2146244786), (HomeTexture) null, (-2146244786), (-2146244786));\n homeEnvironment0.setCeillingLightColor((-2146244786));\n int int0 = homeEnvironment0.getCeillingLightColor();\n assertEquals((-2146244786), int0);\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundTexture((HomeTexture) null);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"X`o#v\", (Content) null, 19, 19);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(19, homeTexture0, 19, homeTexture0, 19, 19);\n homeEnvironment0.setDrawingMode((HomeEnvironment.DrawingMode) null);\n assertEquals(19, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(19, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(19, homeEnvironment0.getLightColor());\n assertEquals(19.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test\n public void testGetColorWhite() {\n System.out.println(\"getColorWhite\");\n\n Player instance = new Player(PlayerColor.WHITE, \"\");\n PlayerColor expResult = PlayerColor.WHITE;\n\n PlayerColor result = instance.getColor();\n\n assertEquals(expResult, result);\n\n }", "@Test\n public void testGetColorID() throws FitsException, IOException{\n ImageData imageData = new ImageData(frArray, IMAGE_TYPE,COLROID, rangeValues, 0,0, 100, 100, true );\n Assert.assertEquals(0, imageData.getColorTableId());\n }", "public void testCOLOUR5() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 124, \"purpure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(8244, (HomeTexture) null, 8244, (HomeTexture) null, 8244, 8244);\n homeEnvironment0.setLightColor((-130));\n assertEquals((-130), homeEnvironment0.getLightColor());\n }", "private void initPieceColors(){\n\t\tfor(Piece p : this.pieces)\n\t\t\tpieceColors.put(p, Utils.randomColor());\n\t}", "@Test\n public void getColor() {\n // Testing for Color Rectangle that mutates its Color and see the Color matches.\n assertEquals(defaultColor1, defaultShape1.getColor());\n Color newRectangleColor = new Color(33, 33, 33);\n defaultShape1 = new Rectangle(newRectangleColor, defaultPosition1, defaultSize1);\n assertEquals(newRectangleColor, defaultShape1.getColor());\n assertNotEquals(defaultColor1, defaultShape1.getColor());\n // Testing for OvalShape that mutates and see it matches.\n assertEquals(defaultColor2, defaultShape2.getColor());\n Color newOvalColor = new Color(15, 15, 15);\n defaultShape2 = new Oval(newOvalColor, defaultPosition2, defaultSize2);\n assertEquals(newOvalColor, defaultShape2.getColor());\n assertNotEquals(defaultColor2, defaultShape2.getColor());\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, int0);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "@Test\n\tpublic void testSetColor() {\n\n\t\tproc = new ByteProcessor(1,3,new byte[] {1,2,3},new IndexColorModel(8,1,new byte[]{1},new byte[]{2},new byte[]{3}));\n\n\t\tif (IJInfo.RUN_ENHANCED_TESTS)\n\t\t{\n\t\t\t// this test crashes with a null ptr exception\n\t\t\tip = new ImagePlus(\"MyChemicalRomance\", proc);\n\t\t\tip.setColor(null);\n\t\t}\n\n\t\t// try to set color of ImagePlus with no processor\n\t\t// ... should do nothing\n\t\tip = new ImagePlus();\n\t\t// can't rely on as packages may change : assertNull(ip.ip);\n\t\tip.setColor(Color.yellow);\n\t\t// can't do due to access: assertEquals(ip.ip.drawingColor,Color.black);\n\n\t\t// try to set color of processor when it exists\n\t\t// ... should set something lower -> defers to ImageProcessor.setColor() -> test there\n\t\tip = new ImagePlus(\"MyChemicalRomance\", proc);\n\t\t// can't rely on as packages may change : assertEquals(proc,ip.ip);\n\t\tip.setColor(Color.magenta);\n\t\t// can't do due to access: assertEquals(ip.ip.drawingColor,Color.magenta);\n\t}", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(false);\n homeEnvironment0.setPhotoQuality(2377);\n homeEnvironment0.getSkyColor();\n homeEnvironment0.getSubpartSizeUnderLight();\n homeEnvironment0.setSkyColor(2377);\n assertEquals(2377, homeEnvironment0.getPhotoQuality());\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n URL uRL0 = MockURL.getFileExample();\n URLContent uRLContent0 = new URLContent(uRL0);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", uRLContent0, 0.0F, 2.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-12), homeTexture0, 235, homeTexture0, 3682, 3682);\n homeEnvironment0.getGroundTexture();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(3682.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(235, homeEnvironment0.getSkyColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-12), homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(3682, homeEnvironment0.getLightColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n homeEnvironment0.getSkyTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "@Test\n public void test56() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n Color color0 = (Color)combinedRangeCategoryPlot0.getRangeGridlinePaint();\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", \"FILL\", (Content) null, 30.0F, 30.0F, \"FILL\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(189, homeTexture0, 1, homeTexture0, 8, 1713.4752F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n \n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(8, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(1713.4752F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(189, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "@Test\n public void testTwoIndexedSameNoData() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage splitVertical = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n Graphics2D gr = splitVertical.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // same as above, but split horizontally (blue on top, red bottom)\n BufferedImage splitHorizontal = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n gr = splitHorizontal.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.RED);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // mosaic them, with palette expansion\n Range noDataBlue = RangeFactory.create((byte) 0, (byte) 0);\n RenderedOp mosaic = MosaicDescriptor.create(\n new RenderedImage[] { splitVertical, splitHorizontal },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n null, new Range[] { noDataBlue, noDataBlue }, null);\n\n // it has been expanded\n assertByteIndexed(mosaic);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be blue (it's blue in both)\n int[] pixel = new int[1];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 0 }, pixel);\n // check top right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom left quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n\n }", "public ColorSet()\n {\n }", "@BeforeEach\n public void setup() {\n red_piece = new Piece(Piece.Color.RED);\n white_piece = new Piece(Piece.Color.WHITE);\n }", "public void testCOLOUR1() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 120, \"gules\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test\n public void basicRenderTwoColorTest() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(Point3D.zero, new Vector(0, -1, 0), new Vector(0, 0, 1)));\n scene.setDistance(100);\n scene.setBackground(new Color(75, 127, 90));\n scene.setAmbientLight(new AmbientLight(new java.awt.Color(255, 191, 191), 1));\n\n scene.addGeometries(new Sphere(50, new Point3D(0, 0, 100)));\n\n scene.addGeometries(\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, 100, 100), new Point3D(100, 100, 100)),\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, -100, 100), new Point3D(100, -100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, 100, 100), new Point3D(-100, 100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, -100, 100), new Point3D(-100, -100, 100)));\n\n ImageWriter imageWriter = new ImageWriter(\"new render test\", 500, 500, 500, 500);\n Render render = new Render(scene , imageWriter);\n\n render.renderImage();\n render.printGrid(50, java.awt.Color.YELLOW);\n render.writeToImage();\n }", "public Piezas(String color) {\r\n this.color = color;\r\n }", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244858), (HomeTexture) null, (-2146244858), (HomeTexture) null, (-2146244858), (-2146244858));\n homeEnvironment0.setCeillingLightColor((-2146244858));\n homeEnvironment0.clone();\n assertEquals((-2146244858), homeEnvironment0.getCeillingLightColor());\n }" ]
[ "0.7919856", "0.7709736", "0.7556153", "0.69638497", "0.682794", "0.6718985", "0.634665", "0.62984544", "0.61961013", "0.61945564", "0.6151421", "0.5972833", "0.59545624", "0.5915486", "0.58732486", "0.57971114", "0.5788441", "0.5776528", "0.57583827", "0.57454103", "0.57159454", "0.5700454", "0.5677392", "0.5664606", "0.5662195", "0.565223", "0.5645346", "0.56302255", "0.5627373", "0.56194067", "0.5612146", "0.560493", "0.55796725", "0.5573833", "0.5569936", "0.55629814", "0.5545288", "0.5542258", "0.5537724", "0.5536753", "0.5529119", "0.55165786", "0.551023", "0.5508429", "0.5496226", "0.5490794", "0.5483277", "0.5460114", "0.54591453", "0.5453907", "0.5447874", "0.54442835", "0.54407656", "0.5428609", "0.5425418", "0.54224086", "0.5420984", "0.54135835", "0.54095143", "0.5397294", "0.5396313", "0.5392283", "0.5388309", "0.5360327", "0.53549826", "0.53524846", "0.53513145", "0.53441423", "0.5340907", "0.53308225", "0.53304356", "0.53268826", "0.5326653", "0.532443", "0.5324027", "0.53207105", "0.52982557", "0.5290696", "0.5283199", "0.5282973", "0.52787316", "0.52721554", "0.52701956", "0.52687454", "0.52622366", "0.5261831", "0.5258067", "0.5258021", "0.5257091", "0.5241284", "0.52369183", "0.52366906", "0.5209634", "0.5201833", "0.5198306", "0.5198144", "0.51940477", "0.519087", "0.51877606", "0.5178415" ]
0.8257104
0
Unit test designed to test the generation of monochromatic palettes with two total colors.
@Test public void testMonochromaticPalettesTwo() { this.runAnalogousPalette(RGB_RESULTS_TWO, 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testMonochromaticPalettesOne() {\n this.runAnalogousPalette(RGB_RESULTS_ONE, 1);\n }", "@Test\n public void testMonochromaticPalettesThree() {\n this.runAnalogousPalette(RGB_RESULTS_THREE, 3);\n }", "@Test\r\n public void testSingleColor(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n }", "@Test\r\n public void testTrivialReplacement(){\r\n List<Tone> palette = Arrays.asList(new Tone(new Color(200,10,10)),\r\n new Tone(new Color(10,200,10)),\r\n new Tone(new Color(10,10,200)));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/redBlueQuarter.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(2, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n assertEquals(palette.get(2), analysis.byCount().get(1).getTone());\r\n }", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "@Test\r\n public void testConfigurableConstructor(){\r\n ColorDistanceFunction distanceFunction = mock(ColorDistanceFunction.class);\r\n when(distanceFunction.getDistance(not(eq(new Tone(Color.BLUE))), any())).thenReturn(99.9);\r\n when(distanceFunction.getDistance(eq(new Tone(Color.BLUE)), any())).thenReturn(0.0);\r\n\r\n List<Tone> palette = Arrays.asList(new Tone(Color.RED), new Tone(Color.BLUE));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer(distanceFunction);\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertContainsColor(Color.BLUE, analysis);\r\n }", "public void createTestPattern()\n {\n int i;\n int j;\n RGBPixel p = new RGBPixel();\n\n for ( i = 0; i < getXSize(); i++ ) {\n for ( j = 0; j < getYSize(); j++ ) {\n if ( ((i % 2 != 0) && (j % 2 == 0)) || \n ((j % 2 != 0) && (i % 2 == 0)) ) {\n p.r = (byte)255;\n p.g = (byte)255;\n p.b = (byte)255;\n }\n else {\n p.r = 0;\n p.g = 0;\n p.b = 0;\n }\n if ( j == getYSize()/2 ) {\n p.r = (byte)255;\n p.g = 0;\n p.b = 0;\n }\n if ( i == getXSize()/2) {\n p.r = 0;\n p.g = (byte)255;\n p.b = 0;\n }\n putPixelRgb(i, j, p);\n }\n }\n }", "@Test\r\n public void testSameSize(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n assertDimensions(result, 2, 4);\r\n }", "@LargeTest\n public void testColorMatrix() {\n TestAction ta = new TestAction(TestName.COLOR_MATRIX);\n runTest(ta, TestName.COLOR_MATRIX.name());\n }", "@LargeTest\n public void testColorCube() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE);\n runTest(ta, TestName.COLOR_CUBE.name());\n }", "@Test\n public void metalAndColorsTest() {\n JdiSite.homePage.openNewPageByHeaderMenu(HeaderMenuItem.METALS_AND_COLORS);\n JdiSite.metalAndColorsPage.checkOpened();\n // !TODO - I decided to remove the method from MetalAndColorsForm and make it easier\n JdiSite.metalAndColorsPage.fillAndSubmitMetalAndColorsForm(DefaultsData.DEFAULT_DATA);\n JdiSite.metalAndColorsPage.checkResults(DefaultsData.DEFAULT_DATA);\n }", "@Test\n public void testGetColor() {\n assertEquals(r1.getColor(), new Color(255, 0, 0));\n assertEquals(r2.getColor(), new Color(255, 255, 255));\n assertEquals(r3.getColor(), new Color(255, 255, 0));\n assertEquals(r4.getColor(), new Color(200, 150, 133));\n }", "@Test\n public void testSetPixelColor() {\n System.out.println(\"setPixelColor\");\n int numLEDs = 150;\n Color color = new Color(63, 123, 255);\n DotStar instance = new MockDotStar(numLEDs);\n for (int i = 0; i < numLEDs; i++) {\n instance.setPixelColor(i, color);\n }\n\n for (int i = 0; i < numLEDs; i++) {\n assertEquals((byte) 0xFF, instance.data[4 * i]);\n assertEquals((byte) color.getBlue(), instance.data[(4 * i) + 1]);\n assertEquals((byte) color.getGreen(), instance.data[(4 * i) + 2]);\n assertEquals((byte) color.getRed(), instance.data[(4 * i) + 3]);\n }\n }", "@Test\n\tpublic void testNewPaintPixelTest() {\n\t\tPixel[][] greenParray = new Pixel[5][5];\n\t\tfor (int x = 0; x < 5; x++) {\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tgreenParray[x][y] = green;\n\t\t\t}\n\t\t}\n\t\t\n\t\tPixel[][] blueParray = new Pixel[5][5];\n\t\tfor (int x = 0; x < 5; x++) {\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tblueParray[x][y] = blue;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void getColorTest() {\n assertTrue(red_piece.getColor() == Piece.Color.RED);\n assertTrue(white_piece.getColor() == Piece.Color.WHITE);\n }", "void testRandColor(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.randColor(), Color.ORANGE);\r\n t.checkExpect(this.game3.randColor(), Color.RED);\r\n t.checkExpect(this.game5.randColor(), Color.PINK);\r\n }", "public static void main(String[] args) {\n assert Arrays.equals(hsvToRgb(0, 0, 0), new int[] {0, 0, 0});\n assert Arrays.equals(hsvToRgb(0, 0, 1), new int[] {255, 255, 255});\n assert Arrays.equals(hsvToRgb(0, 1, 1), new int[] {255, 0, 0});\n assert Arrays.equals(hsvToRgb(60, 1, 1), new int[] {255, 255, 0});\n assert Arrays.equals(hsvToRgb(120, 1, 1), new int[] {0, 255, 0});\n assert Arrays.equals(hsvToRgb(240, 1, 1), new int[] {0, 0, 255});\n assert Arrays.equals(hsvToRgb(300, 1, 1), new int[] {255, 0, 255});\n assert Arrays.equals(hsvToRgb(180, 0.5, 0.5), new int[] {64, 128, 128});\n assert Arrays.equals(hsvToRgb(234, 0.14, 0.88), new int[] {193, 196, 224});\n assert Arrays.equals(hsvToRgb(330, 0.75, 0.5), new int[] {128, 32, 80});\n\n // Test rgbToHsv-method\n // approximate-assertions needed because of small deviations due to converting between\n // int-values and double-values.\n assert approximatelyEqualHsv(rgbToHsv(0, 0, 0), new double[] {0, 0, 0});\n assert approximatelyEqualHsv(rgbToHsv(255, 255, 255), new double[] {0, 0, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 0, 0), new double[] {0, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 255, 0), new double[] {60, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(0, 255, 0), new double[] {120, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(0, 0, 255), new double[] {240, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 0, 255), new double[] {300, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(64, 128, 128), new double[] {180, 0.5, 0.5});\n assert approximatelyEqualHsv(rgbToHsv(193, 196, 224), new double[] {234, 0.14, 0.88});\n assert approximatelyEqualHsv(rgbToHsv(128, 32, 80), new double[] {330, 0.75, 0.5});\n }", "@Test\r\n public void testPlayer_selectNewColor_dumb() {\r\n player2 = new Player(\"\", true);\r\n player2.setStrategy(Player.STRATEGY_DUMB);\r\n player2.setHand(strategyHand.getAllCards());\r\n player2.setLastPlayedCard(wild);\r\n String firstRandomColor = player2.selectNewColor();\r\n boolean differentColorFound = false;\r\n for(int i = 0; i < 25; i++) {\r\n String nextRandomColor = player2.selectNewColor();\r\n if(!nextRandomColor.equalsIgnoreCase(firstRandomColor)) {\r\n differentColorFound = true;\r\n }\r\n }\r\n assertTrue(differentColorFound);\r\n }", "public static void testPixellateThreeArgs(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(18, 60, 40);\n\t caterpillar.explore();\n }", "@Test\n public void getColorReturnsTheRightColor() {\n assertEquals(0xaa00ff, Tetromino.T.getColor());\n }", "private void runAnalogousPalette(int[][][] RGB_RESULTS, int amount) {\n RGBColor monochromatic;\n String err;\n int[] coords;\n int[] monoCoords;\n for(int index = 0; index < RGB_INPUTS.length; index++) {\n coords = RGB_INPUTS[index];\n\n this.paletteOne = new MonoChromaticPalette(new RGBColor(coords[0], coords[1], coords[2]), amount);\n\n for(int index2 = 0; index2 < this.paletteOne.getColors().size(); index2++) {\n monochromatic = Color.getRGBColor(this.paletteOne.getColor(index2));\n monoCoords = RGB_RESULTS[index][index2];\n\n err = String.format(\"Monochromatic color %s was given instead of %s!\\n\",\n monochromatic, Arrays.toString(monoCoords));\n assertEquals(err, monoCoords[0], monochromatic.getRed(), 2);\n assertEquals(err, monoCoords[1], monochromatic.getGreen(), 2);\n assertEquals(err, monoCoords[2], monochromatic.getBlue(), 2);\n }\n }\n }", "@Then(\"^Pobranie koloru$\")\n public void Pobranie_koloru() throws Throwable {\n\n WebDriverWait wait = new WebDriverWait(driver, 15);\n WebElement c9 = wait.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\"30373\\\"]/div/div/div/div/div/div/div/p[3]/a\")));\n\n String color = driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[6]/div/div/div[1]/div/ul/li\")).getCssValue(\"color\");\n String[] hexValue = color.replace(\"rgba(\", \"\").replace(\")\", \"\").split(\",\");\n\n int hexValue1=Integer.parseInt(hexValue[0]);\n hexValue[1] = hexValue[1].trim();\n int hexValue2=Integer.parseInt(hexValue[1]);\n hexValue[2] = hexValue[2].trim();\n int hexValue3=Integer.parseInt(hexValue[2]);\n String kolorZeStrony = String.format(\"#%02x%02x%02x\", hexValue1, hexValue2, hexValue3);\n\n Assert.assertEquals(\"#333333\", kolorZeStrony);\n\n }", "@Test\n public void testPenExport(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecCommandStack.push(VecCommandFactory.GetColorCommand(VecCommandType.PEN, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"PEN #0000ff\\n\", print);\n }", "private void createTestImage()\n {\n initialImage = new byte[3 * size / 2];\n for (int i = 0; i < size; i++)\n {\n initialImage[i] = (byte) (40 + i % 199);\n }\n\n for (int i = size; i < 3 * size / 2; i += 2)\n {\n initialImage[i] = (byte) (40 + i % 200);\n initialImage[i + 1] = (byte) (40 + (i + 99) % 200);\n }\n }", "public void testColorSensing()\n {\n // SmartDashboard.putData(\"Color Wheel Spinning\", new ControlPanelSpinFour());\n }", "@Test\n public void testColorStaticMethods() {\n assertEquals(1, Color.RED.r(), 0.0);\n assertEquals(0, Color.RED.g(), 0.0);\n assertEquals(0, Color.RED.b(), 0.0);\n //Test Green r, g et b\n assertEquals(0, Color.GREEN.r(), 0.0);\n assertEquals(1, Color.GREEN.g(), 0.0);\n assertEquals(0, Color.GREEN.b(), 0.0);\n //Test BLUE r, g et b\n assertEquals(0, Color.BLUE.r(), 0.0);\n assertEquals(0, Color.BLUE.g(), 0.0);\n assertEquals(1, Color.BLUE.b(), 0.0);\n //Test BLACK r, g et b\n assertEquals(0, Color.BLACK.r(), 0.0);\n assertEquals(0, Color.BLACK.g(), 0.0);\n assertEquals(0, Color.BLACK.b(), 0.0);\n //Test WHITE r, g et b\n assertEquals(1, Color.WHITE.r(), 0.0);\n assertEquals(1, Color.WHITE.g(), 0.0);\n assertEquals(1, Color.WHITE.b(), 0.0);\n }", "public static void main(String[] args) {\n\t\t//Setting up some objects to test.\n\t\tColour[] four = new Colour[4];\n\t\tColour[] five = new Colour[5];\n\t\tColour[] six = new Colour[6];\n\t\t\n\t\tColour white = new Colour(\"#FFFFFF\");\n\t\tfour[0] = white;\n\t\tfive[0] = white;\n\t\tsix[0] = white;\n\t\tColour black = new Colour(\"#000000\");\n\t\tfour[1] = black;\n\t\tfive[1] = black;\n\t\tsix[1] = black;\n\t\tColour red = new Colour(\"#FF0000\");\n\t\tfour[2] = red;\n\t\tfive[2] = red;\n\t\tsix[2] = red;\n\t\tColour green = new Colour(\"#00FF00\");\n\t\tfour[3] = green;\n\t\tfive[3] = green;\n\t\tsix[3] = green;\n\t\tColour blue = new Colour(\"#0000FF\");\n\t\tfive[4] = blue;\n\t\tsix[4] = blue;\n\t\tColour bluegreen = new Colour(\"#00FFFF\");\n\t\tsix[5] = bluegreen;\n\t\t\n\t\t//Test that <5 objects can be added.\n\t\tCustomColourMap fourcolours = new CustomColourMap(four, \"Four\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that =5 objects can be added.\n\t\tCustomColourMap fivecolours = new CustomColourMap(five, \"Five\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that if >5 objects are added, it is acceptable.\n\t\tCustomColourMap sixcolours = new CustomColourMap(six, \"Six\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF\");\n\t\tSystem.out.println();\n\t\t\n\t\tfor (int i=0; i<sixcolours.GetMapSize(); i++) {\n\t\t\tSystem.out.print(sixcolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\n\t\t\t\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF #00FFFF\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the setColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tfivecolours.SetColour(i, new Colour(\"#FFFFFF\"));\n\t\t}\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #FFFFFF #FFFFFF #FFFFFF #FFFFFF \");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getMapSize method.\n\t\tSystem.out.println(fivecolours.getMapSize());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetMapSize());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getNumber method.\n\t\tSystem.out.println(fivecolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\n\t\n\t}", "@LargeTest\n public void testGreyscale() {\n TestAction ta = new TestAction(TestName.GREYSCALE);\n runTest(ta, TestName.GREYSCALE.name());\n }", "public void makeRandColor(){}", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setSkyColor(1411);\n assertEquals(1411, homeEnvironment0.getSkyColor());\n }", "@Test\n public void testTwoIndexedSameNoData() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage splitVertical = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n Graphics2D gr = splitVertical.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // same as above, but split horizontally (blue on top, red bottom)\n BufferedImage splitHorizontal = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n gr = splitHorizontal.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.RED);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // mosaic them, with palette expansion\n Range noDataBlue = RangeFactory.create((byte) 0, (byte) 0);\n RenderedOp mosaic = MosaicDescriptor.create(\n new RenderedImage[] { splitVertical, splitHorizontal },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n null, new Range[] { noDataBlue, noDataBlue }, null);\n\n // it has been expanded\n assertByteIndexed(mosaic);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be blue (it's blue in both)\n int[] pixel = new int[1];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 0 }, pixel);\n // check top right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom left quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n // check bottom right quadrant, should be red, one is red, and blue is nodata\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 1 }, pixel);\n\n }", "@Test\n public void testVictoryBlue(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "@Test\n public void testRGBOn() {\n byte[] dataBytes = new byte[4];\n dataBytes[0] = (byte) 0x11; // 17 Red (0 .. 255)\n dataBytes[1] = (byte) 0x86; // 134 Green (0 .. 255)\n dataBytes[2] = (byte) 0xAD; // 173 Blue (0 .. 255)\n dataBytes[3] = (byte) 0x2B; // 00101011\n // Servcie Mode: Normal Mode\n // Operation hours flag: not available\n // Error State: internal Error\n // Learn Bit: Data Telegram\n // Parameter Mode: RGB\n // Status: 1 ON\n \n Map<EnoceanParameterAddress, Value> values = createBasicPacket(dataBytes);\n \n Color color = (Color) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.COLOR));\n assertEquals(17, color.getRed());\n assertEquals(134, color.getGreen());\n assertEquals(173, color.getBlue());\n \n OnOffState status = (OnOffState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.POWER));\n assertEquals(OnOffState.ON, status);\n \n ExtendedLightingStatus.ErrorState errorState = (ExtendedLightingStatus.ErrorState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.ERROR_STATE));\n assertEquals(ExtendedLightingStatus.ErrorState.INTERNAL_FAILURE, errorState);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n URL uRL0 = MockURL.getHttpExample();\n ResourceURLContent resourceURLContent0 = new ResourceURLContent(uRL0, false);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"1Zucc:+\", \"1Zucc:+\", resourceURLContent0, 0, (-1114.1877F), \"1Zucc:+\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.getVideoWidth();\n homeEnvironment0.getCeillingLightColor();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n AspectRatio aspectRatio0 = AspectRatio.FREE_RATIO;\n homeEnvironment1.setPhotoAspectRatio(aspectRatio0);\n homeEnvironment0.getVideoWidth();\n homeEnvironment0.setPhotoAspectRatio(aspectRatio0);\n homeEnvironment0.getGroundColor();\n homeEnvironment1.setVideoFrameRate(0);\n int int0 = homeEnvironment0.getPhotoHeight();\n assertEquals(AspectRatio.FREE_RATIO, homeEnvironment0.getPhotoAspectRatio());\n assertEquals(300, int0);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-826), 0.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-3047), homeTexture0, 949, homeTexture0, (-3047), 949);\n assertEquals((-3047), homeEnvironment0.getLightColor());\n \n homeEnvironment0.setLightColor(949);\n assertEquals(949, homeEnvironment0.getLightColor());\n }", "@Test\n\tpublic void testGetProcessorForColorProcessor() {\n\t\tfinal PlanarImg< ARGBType, IntArray > argbs = PlanarImgs.argbs( 1, 1, 1 );\n\t\targbs.randomAccess().get().set( 0xff010203 );\n\t\tfinal VirtualStack stack = PlanarImgToVirtualStack.wrap( argbs );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t\tstack.getProcessor( 1 );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t}", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "@Test(dataProvider = \"metalsColorsProvider\")\n public void metalColorsTest(MetalsColorsData metalsColorsData) {\n JdiSite.homePage.headerMenu.clickOn(\"METALS & COLORS\");\n\n //3 Fill form Metals & Colors by data\n //4 Submit form Metals & Colors\n JdiSite.metalsColorsPage.metalsColorsForm.submit(metalsColorsData);\n\n //5 Result sections should contains data below:\n JdiSite.metalsColorsPage.checkResults(metalsColorsData);\n\n }", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"DT.,X\", (Content) null, 1, 1.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(1, homeTexture0, 1, homeTexture0, 1, 0.0F);\n homeEnvironment0.getGroundTexture();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(1, homeEnvironment0.getGroundColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(1, homeEnvironment0.getLightColor());\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "public boolean testColourcomponents(EIfcpixeltexture type) throws SdaiException;", "private PaletteFactory() {\n }", "static void convert_palette(char []palette,UBytePtr color_prom)\n\t{\n\t\tint i;\n\t\n int p_inc=0;\n\t\tfor (i = 0;i < 1024;i++)\n\t\t{\n\t\t\tint bit0,bit1,bit2,bit3;\n\t\n\t\n\t\t\tbit0 = (color_prom.read(0) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(0) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(0) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(0) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(2*1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(2*1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(2*1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(2*1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\n\t\t\tcolor_prom.inc();\n\t\t}\n\t\n\t\t/* reserve the last color for the transparent pen (none of the game colors has */\n\t\t/* these RGB components) */\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t}", "@LargeTest\n public void testIntrinsicsColorMatrixGrey() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX_GREY);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX_GREY.name());\n }", "public PlasmaSelectionTester() {\r\n\t}", "@Test\n public void testTwoIndexedNoSameNoData() {\n IndexColorModel icm = buildIndexColorModel(Color.BLUE, Color.RED);\n BufferedImage splitVertical = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n Graphics2D gr = splitVertical.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 50, 100);\n gr.setColor(Color.RED);\n gr.fillRect(50, 0, 50, 100);\n gr.dispose();\n\n // same as above, but split horizontally (blue on top, red bottom)\n BufferedImage splitHorizontal = new BufferedImage(100, 100, BufferedImage.TYPE_BYTE_INDEXED,\n icm);\n gr = splitHorizontal.createGraphics();\n gr.setColor(Color.BLUE);\n gr.fillRect(0, 0, 100, 50);\n gr.setColor(Color.RED);\n gr.fillRect(0, 50, 100, 50);\n gr.dispose();\n\n // mosaic them, the different nodata will force a palette expansion\n Range noDataBlue = RangeFactory.create((byte) 0, (byte) 0);\n Range noDataRed = RangeFactory.create((byte) 1, (byte) 1);\n RenderedOp mosaic = MosaicDescriptor.create(\n new RenderedImage[] { splitVertical, splitHorizontal },\n javax.media.jai.operator.MosaicDescriptor.MOSAIC_TYPE_OVERLAY, null, null, null,\n new double[] { 0, 0, 0 }, new Range[] { noDataBlue, noDataRed }, null);\n\n // it has been expanded\n assertRGB(mosaic, false);\n\n // RenderedImageBrowser.showChain(mosaic);\n\n // check top left quadrant, should be blue (it's blue in both)\n int[] pixel = new int[3];\n mosaic.getData().getPixel(10, 10, pixel);\n assertArrayEquals(new int[] { 0, 0, 255 }, pixel);\n // check top right quadrant, should be red (red is data in the first image)\n mosaic.getData().getPixel(75, 10, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n // check bottom left quadrant, should be black, it's no data in both\n mosaic.getData().getPixel(25, 75, pixel);\n assertArrayEquals(new int[] { 0, 0, 0 }, pixel);\n // check bottom right quadrant, should be red, it's red in the first image\n mosaic.getData().getPixel(75, 75, pixel);\n assertArrayEquals(new int[] { 255, 0, 0 }, pixel);\n }", "@org.junit.Test\r\n public void testPaint() {\r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n \r\n node.invertColor();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.invertColor();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n }", "@LargeTest\n public void testIntrinsicsColorMatrix() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX.name());\n }", "public static void populateColors() {\n colors.put(0,Color.rgb(238, 228, 218, 0.35)); //empty tile\n colors.put(2, Color.rgb(238, 228, 218));\n colors.put(4, Color.rgb(237, 224, 200));\n colors.put(8,Color.rgb(242, 177, 121));\n colors.put(16, Color.rgb(245, 149, 99));\n colors.put(32,Color.rgb(246, 124, 95));\n colors.put(64,Color.rgb(246, 94, 59));\n colors.put(128,Color.rgb(237, 207, 114));\n colors.put(256,Color.rgb(237, 204, 97));\n colors.put(512,Color.rgb(237, 200, 80));\n colors.put(1024,Color.rgb(237, 197, 63));\n colors.put(2048,Color.rgb(237, 194, 46));\n colors.put(4096,Color.rgb(237, 194, 46));\n colors.put(8192,Color.rgb(237, 194, 46));\n\n }", "public void testCOLOUR3() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 122, \"vert\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test\n public void basicRenderTwoColorTest() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(Point3D.zero, new Vector(0, -1, 0), new Vector(0, 0, 1)));\n scene.setDistance(100);\n scene.setBackground(new Color(75, 127, 90));\n scene.setAmbientLight(new AmbientLight(new java.awt.Color(255, 191, 191), 1));\n\n scene.addGeometries(new Sphere(50, new Point3D(0, 0, 100)));\n\n scene.addGeometries(\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, 100, 100), new Point3D(100, 100, 100)),\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, -100, 100), new Point3D(100, -100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, 100, 100), new Point3D(-100, 100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, -100, 100), new Point3D(-100, -100, 100)));\n\n ImageWriter imageWriter = new ImageWriter(\"new render test\", 500, 500, 500, 500);\n Render render = new Render(scene , imageWriter);\n\n render.renderImage();\n render.printGrid(50, java.awt.Color.YELLOW);\n render.writeToImage();\n }", "void testColorChecker(Tester t) {\r\n initData();\r\n Cell topLeft = (Cell) this.game7.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game7.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game7.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game7.indexHelp(1, 1);\r\n t.checkExpect(topLeft.flooded, true);\r\n t.checkExpect(topRight.flooded, false);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(botRight.flooded, false);\r\n\r\n topRight.colorChecker(topLeft.color);\r\n t.checkExpect(topRight.flooded, true);\r\n t.checkExpect(botRight.flooded, true);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(topLeft.flooded, true);\r\n }", "@Test\n public void getColor() {\n // Testing for Color Rectangle that mutates its Color and see the Color matches.\n assertEquals(defaultColor1, defaultShape1.getColor());\n Color newRectangleColor = new Color(33, 33, 33);\n defaultShape1 = new Rectangle(newRectangleColor, defaultPosition1, defaultSize1);\n assertEquals(newRectangleColor, defaultShape1.getColor());\n assertNotEquals(defaultColor1, defaultShape1.getColor());\n // Testing for OvalShape that mutates and see it matches.\n assertEquals(defaultColor2, defaultShape2.getColor());\n Color newOvalColor = new Color(15, 15, 15);\n defaultShape2 = new Oval(newOvalColor, defaultPosition2, defaultSize2);\n assertEquals(newOvalColor, defaultShape2.getColor());\n assertNotEquals(defaultColor2, defaultShape2.getColor());\n }", "@Test\n public void brewTest(){\n try{\n cmTest.brew(2.5,15);\n cmTest.brew(2.4,14.5);\n cmTest.brew(2.6,14.5);\n } catch (Exception e) {\n fail();\n }\n\n }", "public static void testPixellateOneArg(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(40);\n\t caterpillar.explore();\n }", "@Before\n public void testFixture() {\n rectangle = new Rectangle(\"r\", 3, 4, 0, 1, 0,1,new Color(255,0,0));\n colorChangeAnimation = new AnimationColorChange(rectangle, 0, 10,\n new Color(1,1,1));\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setSkyColor((-2146412091));\n assertEquals((-2146412091), homeEnvironment0.getSkyColor());\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor((-187));\n int int0 = homeEnvironment0.getGroundColor();\n assertEquals((-187), int0);\n }", "public void onGenerated(Palette palette) {\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture((String) null, (Content) null, 2688.5F, 2688.5F, false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(300, homeTexture0, 1025, homeTexture0, 1025, 300);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(1025, homeEnvironment0.getLightColor());\n assertEquals(1025, int0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(300.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(300, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "public void testCOLOUR2() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 121, \"sable\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public void testCheckForTripleMultiColor()\n {\n // Note that fromString calls the reset method internally.\n\n // An empty board\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // A single filled cell\n b1.reset();\n b1.fromString(\"REEEEBEEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Some partially filled rows\n b1.fromString(\"RREEBBEEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"BEBEEERER\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"RRB\"+\"BEB\"+\"RER\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Some partially filled columns;\n b1.fromString(\"RBERBEEEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"EBREEEEBR\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"RBR\"+\"REB\"+\"EBR\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Partial Diagonals\n b1.fromString(\"REE\"+\"ERE\"+\"EEB\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"REB\"+\"EEE\"+\"BER\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"RER\"+\"ERE\"+\"EEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Filled columns\n b1.fromString(\"RBBREERBB\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"BBRBBREER\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"RBRRBRRER\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n\n // Filled Rows\n b1.fromString(\"RRREEBBBE\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"EEBBBERRR\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"RRRBBERRR\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n\n // Filled Diagonals\n b1.fromString(\"REB\"+\"ERE\"+\"BER\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"BBR\"+\"ERE\"+\"RBB\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"RBR\"+\"BRB\"+\"RBR\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n\n }", "@Test\n public void testFillOnExport(){\n VecCommandStack.push(VecCommandFactory.GetColorCommand(FILL, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"FILL #0000ff\\n\", print);\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-375), (HomeTexture) null, (-375), (HomeTexture) null, (-375), (-375));\n homeEnvironment0.setGroundColor(0);\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "@Test @IdeGuiTest\n public void testColorPickerAlpha() throws IOException {\n myProjectFrame = importSimpleApplication();\n ThemeEditorFixture themeEditor = ThemeEditorTestUtils.openThemeEditor(myProjectFrame);\n ThemeEditorTableFixture themeEditorTable = themeEditor.getPropertiesTable();\n\n TableCell cell = row(1).column(0);\n\n JTableCellFixture colorCell = themeEditorTable.cell(cell);\n ResourceComponentFixture resourceComponent = new ResourceComponentFixture(myRobot, (ResourceComponent)colorCell.editor());\n colorCell.startEditing();\n resourceComponent.getSwatchButton().click();\n\n ChooseResourceDialogFixture dialog = ChooseResourceDialogFixture.find(myRobot);\n ColorPickerFixture colorPicker = dialog.getColorPicker();\n Color color = new Color(200, 0, 0, 200);\n colorPicker.setFormat(\"ARGB\");\n colorPicker.setColorWithIntegers(color);\n JTextComponentFixture alphaLabel = colorPicker.getLabel(\"A:\");\n SlideFixture alphaSlide = colorPicker.getAlphaSlide();\n alphaLabel.requireVisible();\n alphaSlide.requireVisible();\n colorPicker.setFormat(\"RGB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n colorPicker.setFormat(\"HSB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n\n dialog.clickOK();\n colorCell.stopEditing();\n }", "private HepRepColor() {\n }", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor(17);\n assertEquals(17, homeEnvironment0.getGroundColor());\n }", "@Test(expected = IllegalArgumentException.class)\n public void testChangeColorTwiceSameTime() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addAction(new ChangeColorAction(\"R\", 10, 100,\n new Color(0, 0, 0), new Color(10, 10, 10)));\n model1.addAction(new ChangeColorAction(\"R\", 50, 120,\n new Color(0, 0, 0), new Color(10, 10, 10)));\n }", "@Test\n\tpublic void testIllegalMapWrongColorsTest2() {\n\t\ttry {\n\t\t\tmapFactory.initializeGameState(\"./src/Mapfiles/NightlyTests/IllegalMapWrongColorsTest2\", 1, rng, gs);\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Expected IllegalArgumentException\");\n\t\t} catch (IllegalArgumentException e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfail(\"Expected IllegalArgumentException\");\n\t}", "@Test\n\t\tpublic void testPictureSample() {\n\t\t\tPixel[][] red = new Pixel[15][10];\n\t\t\tfor(int x =0; x < 15; x++) {\n\t\t\t\tfor(int y =0; y<10; y++) {\n\t\t\t\t\tif(x%2 == 0) {\n\t\t\t\t\t\tred[x][y] = new ColorPixel(1, 0, 0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tred[x][y] = new GrayPixel(.5);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tPicture redAndGray = new MutablePixelArrayPicture(red, \"redAndGray\");\n\t\t\tIterator<Pixel> sample = redAndGray.sample(2,3, 3, 4);\n\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(2, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(5, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(8, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(11, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(14, 3));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(2, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(5, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(8, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(11, 7));\n\t\t\tcheck_for_component_equality(sample.next(), redAndGray.getPixel(14, 7));\n\t\t\tassertFalse(sample.hasNext());\n\t\t}", "@Test\n public void testGetColorModel(){\n IndexColorModel indexColorModel = imageData.getColorModel();\n Assert.assertNotNull(indexColorModel );\n Assert.assertEquals(ColorTable.getColorModel(0), indexColorModel);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals(329, homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(329, homeEnvironment0.getSkyColor());\n assertEquals(0, int0);\n assertEquals(76, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(329.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test\n public void testVictoryRed(){\n for (Cell c: modelTest.grid) {\n if (c.getX() == 6)\n c.setColor(Color.RED);\n }\n\n modelTest.researchVictory(1,0);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.RED);\n }", "@Before\n public void setUp() {\n defaultColor1 = new Color(10, 10, 10);\n defaultPosition1 = new Position(0, 100);\n defaultSize1 = new Size(20, 20);\n defaultShape1 = new Rectangle(defaultColor1, defaultPosition1, defaultSize1);\n defaultColor2 = new Color(100, 100, 100);\n defaultPosition2 = new Position(50, 50);\n defaultSize2 = new Size(25, 25);\n defaultShape2 = new Oval(defaultColor2, defaultPosition2, defaultSize2);\n }", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0, int0);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "public ColourTest(String name)\n\t{\n\t\tsuper(name);\n\t}", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"\", (Content) null, (-826), 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2140976121, homeTexture0, 949, homeTexture0, (-3047), 949);\n homeEnvironment0.getGroundTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(949.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(949, homeEnvironment0.getSkyColor());\n assertEquals((-3047), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(2140976121, homeEnvironment0.getGroundColor());\n }", "@Test\n public void test56() throws Throwable {\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot();\n Color color0 = (Color)combinedRangeCategoryPlot0.getRangeGridlinePaint();\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(0, int0);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "public static void testZeroBlue()\n {\n Picture beach = new Picture(\"beach.jpg\");\n beach.explore();\n beach.zeroBlue();\n beach.explore();\n }", "public static void multiRunTest(){\n /* Input resources.\n * For each String:\n * - the first character is the name of the first image.\n * - the second character is the name of the second image.\n */\n String[] inputs = new String[]{\n \"ab\",\n \"cd\",\n \"ef\",\n \"gh\",\n \"il\",\n \"mn\"\n };\n \n BlueRand random = new BlueRand();\n random.setOutputFile(\"sample/output/multiRuns_output.txt\");\n random.setOutputImage(\"sample/output/multiRuns_output.bmp\");\n random.overwriteOutputFile(false); \n //random.deleteInputFiles(true);\n try {\n\t for (String s : inputs){\n\t random.setInputImages(\"sample/input/\"+s.charAt(0)+\".jpg\",\n\t \"sample/input/\"+s.charAt(1)+\".jpg\"); \n\t ArrayList<Byte> output = random.generateRandom();\n\t System.out.println(\"run finished... Bytes generated: \" + output.size());\n\t }\n } catch (BlueRandException e){\n \tSystem.out.println(e.getMessage());\n }\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2374, (HomeTexture) null, 2374, (HomeTexture) null, 2374, 2374);\n homeEnvironment0.setCeillingLightColor(2146573311);\n assertEquals(2146573311, homeEnvironment0.getCeillingLightColor());\n }", "@Test\n public void test100True() {\n long start = System.currentTimeMillis();\n for (int i = 0; i < 100; i++) {\n RandomGUID myGUID = new RandomGUID(true);\n System.out.println(\"Seeding String=\" + myGUID.valueBeforeMD5);\n System.out.println(\"rawGUID=\" + myGUID.valueAfterMD5);\n System.out.println(\"RandomGUID=\" + myGUID.toString());\n }\n System.out.println(Ansi.ansi().eraseScreen().render(String.format(\"100 条@|blue 耗时 |@@|yellow %s |@@|blue 毫秒|@\", System.currentTimeMillis() - start)));\n }", "public void testCOLOUR5() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 124, \"purpure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.setVideoFrameRate(25);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "public void testCOLOUR1() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 120, \"gules\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test\n\tpublic void testIllegalMapWrongColorsTest1() {\n\t\ttry {\n\t\t\tmapFactory.initializeGameState(\"./src/Mapfiles/NightlyTests/IllegalMapWrongColorsTest1\", 1, rng, gs);\n\t\t} catch (IOException e) {\n\t\t\tfail(\"Expected IllegalArgumentException\");\n\t\t} catch (IllegalArgumentException e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfail(\"Expected IllegalArgumentException\");\n\t}", "private Pair<Integer, Integer> getRandomColor(int level) {\n int red = (int)(Math.random() * 255);\n int green = (int)(Math.random() * 255);\n int blue = (int)(Math.random() * 255);\n\n // TODO: Improve the formula for alphas\n int alpha1 = 200 + (int)(Math.random() * 55);\n int delta = (10 - level) * 2;\n int alpha2 = alpha1 + delta * (alpha1 > 227 ? -1 : 1);\n\n int color1 = Color.argb(alpha1, red, green, blue);\n int color2 = Color.argb(alpha2, red, green, blue);\n\n return new Pair(color1, color2);\n }", "double greenPercentage();", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "private void initPieceColors(){\n\t\tfor(Piece p : this.pieces)\n\t\t\tpieceColors.put(p, Utils.randomColor());\n\t}", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n homeEnvironment0.setSubpartSizeUnderLight(0.0F);\n AspectRatio aspectRatio0 = AspectRatio.SQUARE_RATIO;\n homeEnvironment1.setVideoQuality(9);\n homeEnvironment1.setVideoAspectRatio(aspectRatio0);\n homeEnvironment0.setGroundColor((-1071));\n homeEnvironment0.setObserverCameraElevationAdjusted(false);\n homeEnvironment0.setLightColor((-1071));\n homeEnvironment0.getWallsAlpha();\n homeEnvironment1.getSkyTexture();\n homeEnvironment1.setLightColor((-646));\n homeEnvironment1.getGroundTexture();\n homeEnvironment0.isObserverCameraElevationAdjusted();\n homeEnvironment0.setLightColor((-1071));\n homeEnvironment0.setWallsAlpha(0.0F);\n homeEnvironment0.setVideoQuality((-1071));\n homeEnvironment0.getDrawingMode();\n homeEnvironment0.setSubpartSizeUnderLight((-1071));\n homeEnvironment0.setSkyColor((-1071));\n assertEquals((-1071), homeEnvironment0.getSkyColor());\n }", "void mosaic(int seed);", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2358, (HomeTexture) null, 2358, (HomeTexture) null, 2358, 2358);\n homeEnvironment0.setCeillingLightColor(2358);\n homeEnvironment0.setCeillingLightColor(2358);\n assertEquals(2358, homeEnvironment0.getCeillingLightColor());\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getGroundColor();\n assertEquals(11053224, int0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n homeEnvironment0.getSkyTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "private static Color newColor(int red, int green, int blue) {\n return new Color(red / 255.0, green / 255.0, blue / 255.0);\n }", "@Test \n\t@DisplayName(\"introducir un color en cualquiera de las dos combinaciones que no corresponda a la dificultad = fácil\")\n\tvoid colorEquivocadoDificultadFacilTest(){ \n\t\tCombinacion combinacionFacil = new Combinacion(dificultadFacil);\n\t\tCombinacion combinacionSecretaFacil = new Combinacion(dificultadFacil);\n\t\tCombinacion combinacionGanaFacil = new Combinacion(dificultadFacil);\n\t\t\n\t\tcombinacionFacil.anadirCasilla(new Casilla(Color.FONDO_ROJOCLARO));\n\t\tcombinacionFacil.anadirCasilla(new Casilla(Color.FONDO_AZUL));\n\t\tcombinacionFacil.anadirCasilla(new Casilla(Color.FONDO_VERDE));\n\t\tcombinacionFacil.anadirCasilla(new Casilla(Color.FONDO_GRISOSCURO));\n\t\t\n\t\tcombinacionSecretaFacil.anadirCasilla(new Casilla(Color.FONDO_ROJOCLARO));\n\t\tcombinacionSecretaFacil.anadirCasilla(new Casilla(Color.FONDO_AMARILLOCLARO));\n\t\tcombinacionSecretaFacil.anadirCasilla(new Casilla(Color.FONDO_MORADOCLARO));\n\t\tcombinacionSecretaFacil.anadirCasilla(new Casilla(Color.FONDO_GRISOSCURO));\n\t\n\t\tcombinacionGanaFacil.anadirCasilla(new Casilla(Color.FONDO_ROJOCLARO));\n\t\tcombinacionGanaFacil.anadirCasilla(new Casilla(Color.FONDO_ROJOCLARO));\n\t\tcombinacionGanaFacil.anadirCasilla(new Casilla(Color.FONDO_NEGRO));\n\t\tcombinacionGanaFacil.anadirCasilla(new Casilla(Color.FONDO_NEGRO));\n\t\t\n\t\tAssert.assertEquals(combinacionGanaFacil, combinacionFacil.calcularResultado(combinacionSecretaFacil));\n\t}" ]
[ "0.80633074", "0.7914652", "0.7320044", "0.6935866", "0.6828584", "0.6620877", "0.6565902", "0.6336578", "0.59438956", "0.59390193", "0.5890483", "0.5870592", "0.58481073", "0.57906175", "0.5784868", "0.5772018", "0.5730552", "0.5728896", "0.56513923", "0.5635327", "0.56214195", "0.5593426", "0.5589272", "0.55746615", "0.55339414", "0.5520454", "0.5501642", "0.54904675", "0.5485793", "0.5478971", "0.54758364", "0.5468311", "0.54619735", "0.5449189", "0.54420483", "0.54413724", "0.54251343", "0.5400256", "0.54002494", "0.5396677", "0.5394142", "0.53715456", "0.5365632", "0.5360108", "0.5356985", "0.53429914", "0.533873", "0.5322839", "0.5310216", "0.5305246", "0.5297995", "0.5294468", "0.5286799", "0.5285637", "0.52850634", "0.5278229", "0.52750736", "0.5274053", "0.52584666", "0.5250915", "0.5247936", "0.5226563", "0.5224371", "0.52241683", "0.52127814", "0.5212744", "0.521059", "0.5204835", "0.5196817", "0.51910776", "0.51889503", "0.5182043", "0.5178208", "0.5167084", "0.5166489", "0.5154201", "0.5154068", "0.514634", "0.5143547", "0.51416767", "0.5135457", "0.5123443", "0.51220715", "0.51111007", "0.5108783", "0.5105694", "0.50997174", "0.5099518", "0.5098969", "0.5098352", "0.50970316", "0.5090245", "0.5087171", "0.5084672", "0.5058817", "0.50583816", "0.5052118", "0.50500476", "0.5049611", "0.50449765" ]
0.8217433
0
Unit test designed to test the generation of monochromatic palettes with three total colors.
@Test public void testMonochromaticPalettesThree() { this.runAnalogousPalette(RGB_RESULTS_THREE, 3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testMonochromaticPalettesOne() {\n this.runAnalogousPalette(RGB_RESULTS_ONE, 1);\n }", "@Test\n public void testMonochromaticPalettesTwo() {\n this.runAnalogousPalette(RGB_RESULTS_TWO, 2);\n }", "@Test\r\n public void testSingleColor(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n }", "@Test\r\n public void testTrivialReplacement(){\r\n List<Tone> palette = Arrays.asList(new Tone(new Color(200,10,10)),\r\n new Tone(new Color(10,200,10)),\r\n new Tone(new Color(10,10,200)));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/redBlueQuarter.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(2, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n assertEquals(palette.get(2), analysis.byCount().get(1).getTone());\r\n }", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "@Test\r\n public void testConfigurableConstructor(){\r\n ColorDistanceFunction distanceFunction = mock(ColorDistanceFunction.class);\r\n when(distanceFunction.getDistance(not(eq(new Tone(Color.BLUE))), any())).thenReturn(99.9);\r\n when(distanceFunction.getDistance(eq(new Tone(Color.BLUE)), any())).thenReturn(0.0);\r\n\r\n List<Tone> palette = Arrays.asList(new Tone(Color.RED), new Tone(Color.BLUE));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer(distanceFunction);\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertContainsColor(Color.BLUE, analysis);\r\n }", "public void createTestPattern()\n {\n int i;\n int j;\n RGBPixel p = new RGBPixel();\n\n for ( i = 0; i < getXSize(); i++ ) {\n for ( j = 0; j < getYSize(); j++ ) {\n if ( ((i % 2 != 0) && (j % 2 == 0)) || \n ((j % 2 != 0) && (i % 2 == 0)) ) {\n p.r = (byte)255;\n p.g = (byte)255;\n p.b = (byte)255;\n }\n else {\n p.r = 0;\n p.g = 0;\n p.b = 0;\n }\n if ( j == getYSize()/2 ) {\n p.r = (byte)255;\n p.g = 0;\n p.b = 0;\n }\n if ( i == getXSize()/2) {\n p.r = 0;\n p.g = (byte)255;\n p.b = 0;\n }\n putPixelRgb(i, j, p);\n }\n }\n }", "@LargeTest\n public void testColorCube() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE);\n runTest(ta, TestName.COLOR_CUBE.name());\n }", "@Test\r\n public void testSameSize(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n assertDimensions(result, 2, 4);\r\n }", "void testRandColor(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.randColor(), Color.ORANGE);\r\n t.checkExpect(this.game3.randColor(), Color.RED);\r\n t.checkExpect(this.game5.randColor(), Color.PINK);\r\n }", "@Test\n public void testGetColor() {\n assertEquals(r1.getColor(), new Color(255, 0, 0));\n assertEquals(r2.getColor(), new Color(255, 255, 255));\n assertEquals(r3.getColor(), new Color(255, 255, 0));\n assertEquals(r4.getColor(), new Color(200, 150, 133));\n }", "@Test\n public void metalAndColorsTest() {\n JdiSite.homePage.openNewPageByHeaderMenu(HeaderMenuItem.METALS_AND_COLORS);\n JdiSite.metalAndColorsPage.checkOpened();\n // !TODO - I decided to remove the method from MetalAndColorsForm and make it easier\n JdiSite.metalAndColorsPage.fillAndSubmitMetalAndColorsForm(DefaultsData.DEFAULT_DATA);\n JdiSite.metalAndColorsPage.checkResults(DefaultsData.DEFAULT_DATA);\n }", "@LargeTest\n public void testColorMatrix() {\n TestAction ta = new TestAction(TestName.COLOR_MATRIX);\n runTest(ta, TestName.COLOR_MATRIX.name());\n }", "@Test\n public void testSetPixelColor() {\n System.out.println(\"setPixelColor\");\n int numLEDs = 150;\n Color color = new Color(63, 123, 255);\n DotStar instance = new MockDotStar(numLEDs);\n for (int i = 0; i < numLEDs; i++) {\n instance.setPixelColor(i, color);\n }\n\n for (int i = 0; i < numLEDs; i++) {\n assertEquals((byte) 0xFF, instance.data[4 * i]);\n assertEquals((byte) color.getBlue(), instance.data[(4 * i) + 1]);\n assertEquals((byte) color.getGreen(), instance.data[(4 * i) + 2]);\n assertEquals((byte) color.getRed(), instance.data[(4 * i) + 3]);\n }\n }", "@Test\n public void getColorTest() {\n assertTrue(red_piece.getColor() == Piece.Color.RED);\n assertTrue(white_piece.getColor() == Piece.Color.WHITE);\n }", "public void testCOLOUR3() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 122, \"vert\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "public static void testPixellateThreeArgs(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(18, 60, 40);\n\t caterpillar.explore();\n }", "@Test(dataProvider = \"metalsColorsProvider\")\n public void metalColorsTest(MetalsColorsData metalsColorsData) {\n JdiSite.homePage.headerMenu.clickOn(\"METALS & COLORS\");\n\n //3 Fill form Metals & Colors by data\n //4 Submit form Metals & Colors\n JdiSite.metalsColorsPage.metalsColorsForm.submit(metalsColorsData);\n\n //5 Result sections should contains data below:\n JdiSite.metalsColorsPage.checkResults(metalsColorsData);\n\n }", "@Then(\"^Pobranie koloru$\")\n public void Pobranie_koloru() throws Throwable {\n\n WebDriverWait wait = new WebDriverWait(driver, 15);\n WebElement c9 = wait.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\"30373\\\"]/div/div/div/div/div/div/div/p[3]/a\")));\n\n String color = driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[6]/div/div/div[1]/div/ul/li\")).getCssValue(\"color\");\n String[] hexValue = color.replace(\"rgba(\", \"\").replace(\")\", \"\").split(\",\");\n\n int hexValue1=Integer.parseInt(hexValue[0]);\n hexValue[1] = hexValue[1].trim();\n int hexValue2=Integer.parseInt(hexValue[1]);\n hexValue[2] = hexValue[2].trim();\n int hexValue3=Integer.parseInt(hexValue[2]);\n String kolorZeStrony = String.format(\"#%02x%02x%02x\", hexValue1, hexValue2, hexValue3);\n\n Assert.assertEquals(\"#333333\", kolorZeStrony);\n\n }", "public static void main(String[] args) {\n\t\t//Setting up some objects to test.\n\t\tColour[] four = new Colour[4];\n\t\tColour[] five = new Colour[5];\n\t\tColour[] six = new Colour[6];\n\t\t\n\t\tColour white = new Colour(\"#FFFFFF\");\n\t\tfour[0] = white;\n\t\tfive[0] = white;\n\t\tsix[0] = white;\n\t\tColour black = new Colour(\"#000000\");\n\t\tfour[1] = black;\n\t\tfive[1] = black;\n\t\tsix[1] = black;\n\t\tColour red = new Colour(\"#FF0000\");\n\t\tfour[2] = red;\n\t\tfive[2] = red;\n\t\tsix[2] = red;\n\t\tColour green = new Colour(\"#00FF00\");\n\t\tfour[3] = green;\n\t\tfive[3] = green;\n\t\tsix[3] = green;\n\t\tColour blue = new Colour(\"#0000FF\");\n\t\tfive[4] = blue;\n\t\tsix[4] = blue;\n\t\tColour bluegreen = new Colour(\"#00FFFF\");\n\t\tsix[5] = bluegreen;\n\t\t\n\t\t//Test that <5 objects can be added.\n\t\tCustomColourMap fourcolours = new CustomColourMap(four, \"Four\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that =5 objects can be added.\n\t\tCustomColourMap fivecolours = new CustomColourMap(five, \"Five\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test that if >5 objects are added, it is acceptable.\n\t\tCustomColourMap sixcolours = new CustomColourMap(six, \"Six\");\n\t\tSystem.out.println(\"Expected: No output.\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF\");\n\t\tSystem.out.println();\n\t\t\n\t\tfor (int i=0; i<sixcolours.GetMapSize(); i++) {\n\t\t\tSystem.out.print(sixcolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\n\t\t\t\"Expected: #FFFFFF #000000 #FF0000 #00FF00 #0000FF #00FFFF\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the setColour method.\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tfivecolours.SetColour(i, new Colour(\"#FFFFFF\"));\n\t\t}\n\t\tfor (int i=0; i<fivecolours.getMapSize(); i++) {\n\t\t\tSystem.out.print(fivecolours.GetColour(i).GetHex() + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expected: #FFFFFF #FFFFFF #FFFFFF #FFFFFF #FFFFFF \");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getMapSize method.\n\t\tSystem.out.println(fivecolours.getMapSize());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetMapSize());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\t\n\t\t//Test the getNumber method.\n\t\tSystem.out.println(fivecolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Five\");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(sixcolours.GetNumber());\n\t\tSystem.out.println(\"Expected: Six\");\n\t\tSystem.out.println();\n\t\n\t\n\t}", "public void initColors() {\n\n int i;\n float j;\n\n int start;\n int numShades = 5;\n float shadeInc = 1 / (float) numShades;\n\n\n aColors = new Color[glb.MAXCOLORS]; /* set array size */\n\n\n /* White to Black */\n start = 0;\n for (i = start, j = 1; i < start + 6; j -= shadeInc, i++) {\n aColors[i] = new Color(j, j, j);\n }\n\n start = 6;\n /* Red to almost Magenta */\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 1, (float) 0, j);\n }\n\n\n /* Magenta to almost Blue */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color(j, (float) 0, (float) 1);\n }\n\n\n /* Blue to almost Cyan */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color((float) 0, j, (float) 1);\n }\n\n /* Cyan to almost Green */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 0, (float) 1, j);\n }\n\n\n\n /* Green to almost Yellow */\n start += 5;\n for (i = start, j = 0; i < start + 5; j += shadeInc, i++) {\n aColors[i] = new Color(j, (float) 1, (float) 0);\n }\n\n /* Yellow to almost Red */\n start += 5;\n for (i = start, j = 1; i < start + 5; j -= shadeInc, i++) {\n aColors[i] = new Color((float) 1, j, (float) 0);\n }\n\n }", "public static void populateColors() {\n colors.put(0,Color.rgb(238, 228, 218, 0.35)); //empty tile\n colors.put(2, Color.rgb(238, 228, 218));\n colors.put(4, Color.rgb(237, 224, 200));\n colors.put(8,Color.rgb(242, 177, 121));\n colors.put(16, Color.rgb(245, 149, 99));\n colors.put(32,Color.rgb(246, 124, 95));\n colors.put(64,Color.rgb(246, 94, 59));\n colors.put(128,Color.rgb(237, 207, 114));\n colors.put(256,Color.rgb(237, 204, 97));\n colors.put(512,Color.rgb(237, 200, 80));\n colors.put(1024,Color.rgb(237, 197, 63));\n colors.put(2048,Color.rgb(237, 194, 46));\n colors.put(4096,Color.rgb(237, 194, 46));\n colors.put(8192,Color.rgb(237, 194, 46));\n\n }", "@Test\n\tpublic void testNewPaintPixelTest() {\n\t\tPixel[][] greenParray = new Pixel[5][5];\n\t\tfor (int x = 0; x < 5; x++) {\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tgreenParray[x][y] = green;\n\t\t\t}\n\t\t}\n\t\t\n\t\tPixel[][] blueParray = new Pixel[5][5];\n\t\tfor (int x = 0; x < 5; x++) {\n\t\t\tfor (int y = 0; y < 5; y++) {\n\t\t\t\tblueParray[x][y] = blue;\n\t\t\t}\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"DT.,X\", (Content) null, 1, 1.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(1, homeTexture0, 1, homeTexture0, 1, 0.0F);\n homeEnvironment0.getGroundTexture();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(1, homeEnvironment0.getGroundColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(1, homeEnvironment0.getLightColor());\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setSkyColor(1411);\n assertEquals(1411, homeEnvironment0.getSkyColor());\n }", "private void runAnalogousPalette(int[][][] RGB_RESULTS, int amount) {\n RGBColor monochromatic;\n String err;\n int[] coords;\n int[] monoCoords;\n for(int index = 0; index < RGB_INPUTS.length; index++) {\n coords = RGB_INPUTS[index];\n\n this.paletteOne = new MonoChromaticPalette(new RGBColor(coords[0], coords[1], coords[2]), amount);\n\n for(int index2 = 0; index2 < this.paletteOne.getColors().size(); index2++) {\n monochromatic = Color.getRGBColor(this.paletteOne.getColor(index2));\n monoCoords = RGB_RESULTS[index][index2];\n\n err = String.format(\"Monochromatic color %s was given instead of %s!\\n\",\n monochromatic, Arrays.toString(monoCoords));\n assertEquals(err, monoCoords[0], monochromatic.getRed(), 2);\n assertEquals(err, monoCoords[1], monochromatic.getGreen(), 2);\n assertEquals(err, monoCoords[2], monochromatic.getBlue(), 2);\n }\n }\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "public static void main(String[] args) {\n assert Arrays.equals(hsvToRgb(0, 0, 0), new int[] {0, 0, 0});\n assert Arrays.equals(hsvToRgb(0, 0, 1), new int[] {255, 255, 255});\n assert Arrays.equals(hsvToRgb(0, 1, 1), new int[] {255, 0, 0});\n assert Arrays.equals(hsvToRgb(60, 1, 1), new int[] {255, 255, 0});\n assert Arrays.equals(hsvToRgb(120, 1, 1), new int[] {0, 255, 0});\n assert Arrays.equals(hsvToRgb(240, 1, 1), new int[] {0, 0, 255});\n assert Arrays.equals(hsvToRgb(300, 1, 1), new int[] {255, 0, 255});\n assert Arrays.equals(hsvToRgb(180, 0.5, 0.5), new int[] {64, 128, 128});\n assert Arrays.equals(hsvToRgb(234, 0.14, 0.88), new int[] {193, 196, 224});\n assert Arrays.equals(hsvToRgb(330, 0.75, 0.5), new int[] {128, 32, 80});\n\n // Test rgbToHsv-method\n // approximate-assertions needed because of small deviations due to converting between\n // int-values and double-values.\n assert approximatelyEqualHsv(rgbToHsv(0, 0, 0), new double[] {0, 0, 0});\n assert approximatelyEqualHsv(rgbToHsv(255, 255, 255), new double[] {0, 0, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 0, 0), new double[] {0, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 255, 0), new double[] {60, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(0, 255, 0), new double[] {120, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(0, 0, 255), new double[] {240, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(255, 0, 255), new double[] {300, 1, 1});\n assert approximatelyEqualHsv(rgbToHsv(64, 128, 128), new double[] {180, 0.5, 0.5});\n assert approximatelyEqualHsv(rgbToHsv(193, 196, 224), new double[] {234, 0.14, 0.88});\n assert approximatelyEqualHsv(rgbToHsv(128, 32, 80), new double[] {330, 0.75, 0.5});\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals(329, homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(329, homeEnvironment0.getSkyColor());\n assertEquals(0, int0);\n assertEquals(76, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(329.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "private void createTestImage()\n {\n initialImage = new byte[3 * size / 2];\n for (int i = 0; i < size; i++)\n {\n initialImage[i] = (byte) (40 + i % 199);\n }\n\n for (int i = size; i < 3 * size / 2; i += 2)\n {\n initialImage[i] = (byte) (40 + i % 200);\n initialImage[i + 1] = (byte) (40 + (i + 99) % 200);\n }\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-826), 0.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-3047), homeTexture0, 949, homeTexture0, (-3047), 949);\n assertEquals((-3047), homeEnvironment0.getLightColor());\n \n homeEnvironment0.setLightColor(949);\n assertEquals(949, homeEnvironment0.getLightColor());\n }", "@Test\r\n public void testPlayer_selectNewColor_dumb() {\r\n player2 = new Player(\"\", true);\r\n player2.setStrategy(Player.STRATEGY_DUMB);\r\n player2.setHand(strategyHand.getAllCards());\r\n player2.setLastPlayedCard(wild);\r\n String firstRandomColor = player2.selectNewColor();\r\n boolean differentColorFound = false;\r\n for(int i = 0; i < 25; i++) {\r\n String nextRandomColor = player2.selectNewColor();\r\n if(!nextRandomColor.equalsIgnoreCase(firstRandomColor)) {\r\n differentColorFound = true;\r\n }\r\n }\r\n assertTrue(differentColorFound);\r\n }", "@Test\n public void testColorStaticMethods() {\n assertEquals(1, Color.RED.r(), 0.0);\n assertEquals(0, Color.RED.g(), 0.0);\n assertEquals(0, Color.RED.b(), 0.0);\n //Test Green r, g et b\n assertEquals(0, Color.GREEN.r(), 0.0);\n assertEquals(1, Color.GREEN.g(), 0.0);\n assertEquals(0, Color.GREEN.b(), 0.0);\n //Test BLUE r, g et b\n assertEquals(0, Color.BLUE.r(), 0.0);\n assertEquals(0, Color.BLUE.g(), 0.0);\n assertEquals(1, Color.BLUE.b(), 0.0);\n //Test BLACK r, g et b\n assertEquals(0, Color.BLACK.r(), 0.0);\n assertEquals(0, Color.BLACK.g(), 0.0);\n assertEquals(0, Color.BLACK.b(), 0.0);\n //Test WHITE r, g et b\n assertEquals(1, Color.WHITE.r(), 0.0);\n assertEquals(1, Color.WHITE.g(), 0.0);\n assertEquals(1, Color.WHITE.b(), 0.0);\n }", "@LargeTest\n public void testColorCube3DIntrinsic() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE_3D_INTRINSIC);\n runTest(ta, TestName.COLOR_CUBE_3D_INTRINSIC.name());\n }", "public void testColorSensing()\n {\n // SmartDashboard.putData(\"Color Wheel Spinning\", new ControlPanelSpinFour());\n }", "public void makeRandColor(){}", "public PlasmaSelectionTester() {\r\n\t}", "@Test\n public void testPenExport(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecCommandStack.push(VecCommandFactory.GetColorCommand(VecCommandType.PEN, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"PEN #0000ff\\n\", print);\n }", "@Before\n public void testFixture() {\n rectangle = new Rectangle(\"r\", 3, 4, 0, 1, 0,1,new Color(255,0,0));\n colorChangeAnimation = new AnimationColorChange(rectangle, 0, 10,\n new Color(1,1,1));\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setSkyColor((-2146412091));\n assertEquals((-2146412091), homeEnvironment0.getSkyColor());\n }", "@Test\n public void getColorReturnsTheRightColor() {\n assertEquals(0xaa00ff, Tetromino.T.getColor());\n }", "@Test\n public void testVictoryBlue(){\n for (Cell c: modelTest.grid) {\n if (c.getY() == 5)\n c.setColor(Color.BLUE);\n }\n\n modelTest.researchVictory(0,1);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.BLUE);\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture((String) null, (Content) null, 2688.5F, 2688.5F, false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(300, homeTexture0, 1025, homeTexture0, 1025, 300);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(1025, homeEnvironment0.getLightColor());\n assertEquals(1025, int0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(300.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(300, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "private void initPieceColors(){\n\t\tfor(Piece p : this.pieces)\n\t\t\tpieceColors.put(p, Utils.randomColor());\n\t}", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor((-187));\n int int0 = homeEnvironment0.getGroundColor();\n assertEquals((-187), int0);\n }", "@Test\n public void testRGBOn() {\n byte[] dataBytes = new byte[4];\n dataBytes[0] = (byte) 0x11; // 17 Red (0 .. 255)\n dataBytes[1] = (byte) 0x86; // 134 Green (0 .. 255)\n dataBytes[2] = (byte) 0xAD; // 173 Blue (0 .. 255)\n dataBytes[3] = (byte) 0x2B; // 00101011\n // Servcie Mode: Normal Mode\n // Operation hours flag: not available\n // Error State: internal Error\n // Learn Bit: Data Telegram\n // Parameter Mode: RGB\n // Status: 1 ON\n \n Map<EnoceanParameterAddress, Value> values = createBasicPacket(dataBytes);\n \n Color color = (Color) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.COLOR));\n assertEquals(17, color.getRed());\n assertEquals(134, color.getGreen());\n assertEquals(173, color.getBlue());\n \n OnOffState status = (OnOffState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.POWER));\n assertEquals(OnOffState.ON, status);\n \n ExtendedLightingStatus.ErrorState errorState = (ExtendedLightingStatus.ErrorState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.ERROR_STATE));\n assertEquals(ExtendedLightingStatus.ErrorState.INTERNAL_FAILURE, errorState);\n }", "@Test(timeout = 4000)\n public void test004() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2374, (HomeTexture) null, 2374, (HomeTexture) null, 2374, 2374);\n homeEnvironment0.setCeillingLightColor(2146573311);\n assertEquals(2146573311, homeEnvironment0.getCeillingLightColor());\n }", "public boolean testColourcomponents(EIfcpixeltexture type) throws SdaiException;", "public void testCOLOUR4() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 123, \"azure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test\n\tpublic void testGetProcessorForColorProcessor() {\n\t\tfinal PlanarImg< ARGBType, IntArray > argbs = PlanarImgs.argbs( 1, 1, 1 );\n\t\targbs.randomAccess().get().set( 0xff010203 );\n\t\tfinal VirtualStack stack = PlanarImgToVirtualStack.wrap( argbs );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t\tstack.getProcessor( 1 );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t}", "static void convert_palette(char []palette,UBytePtr color_prom)\n\t{\n\t\tint i;\n\t\n int p_inc=0;\n\t\tfor (i = 0;i < 1024;i++)\n\t\t{\n\t\t\tint bit0,bit1,bit2,bit3;\n\t\n\t\n\t\t\tbit0 = (color_prom.read(0) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(0) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(0) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(0) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(2*1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(2*1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(2*1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(2*1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\n\t\t\tcolor_prom.inc();\n\t\t}\n\t\n\t\t/* reserve the last color for the transparent pen (none of the game colors has */\n\t\t/* these RGB components) */\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t}", "@Test(timeout = 4000)\n public void test100() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0, int0);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "@Test @IdeGuiTest\n public void testColorPickerAlpha() throws IOException {\n myProjectFrame = importSimpleApplication();\n ThemeEditorFixture themeEditor = ThemeEditorTestUtils.openThemeEditor(myProjectFrame);\n ThemeEditorTableFixture themeEditorTable = themeEditor.getPropertiesTable();\n\n TableCell cell = row(1).column(0);\n\n JTableCellFixture colorCell = themeEditorTable.cell(cell);\n ResourceComponentFixture resourceComponent = new ResourceComponentFixture(myRobot, (ResourceComponent)colorCell.editor());\n colorCell.startEditing();\n resourceComponent.getSwatchButton().click();\n\n ChooseResourceDialogFixture dialog = ChooseResourceDialogFixture.find(myRobot);\n ColorPickerFixture colorPicker = dialog.getColorPicker();\n Color color = new Color(200, 0, 0, 200);\n colorPicker.setFormat(\"ARGB\");\n colorPicker.setColorWithIntegers(color);\n JTextComponentFixture alphaLabel = colorPicker.getLabel(\"A:\");\n SlideFixture alphaSlide = colorPicker.getAlphaSlide();\n alphaLabel.requireVisible();\n alphaSlide.requireVisible();\n colorPicker.setFormat(\"RGB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n colorPicker.setFormat(\"HSB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n\n dialog.clickOK();\n colorCell.stopEditing();\n }", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundColor(17);\n assertEquals(17, homeEnvironment0.getGroundColor());\n }", "@Test(timeout = 4000)\n public void test058() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-375), (HomeTexture) null, (-375), (HomeTexture) null, (-375), (-375));\n homeEnvironment0.setGroundColor(0);\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n URL uRL0 = MockURL.getFileExample();\n URLContent uRLContent0 = new URLContent(uRL0);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", uRLContent0, 0.0F, 2.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-12), homeTexture0, 235, homeTexture0, 3682, 3682);\n homeEnvironment0.getGroundTexture();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(3682.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(235, homeEnvironment0.getSkyColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-12), homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(3682, homeEnvironment0.getLightColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"\", (Content) null, (-826), 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2140976121, homeTexture0, 949, homeTexture0, (-3047), 949);\n homeEnvironment0.getGroundTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(949.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(949, homeEnvironment0.getSkyColor());\n assertEquals((-3047), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(2140976121, homeEnvironment0.getGroundColor());\n }", "@LargeTest\n public void testIntrinsicsColorMatrix() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX.name());\n }", "@LargeTest\n public void testGreyscale() {\n TestAction ta = new TestAction(TestName.GREYSCALE);\n runTest(ta, TestName.GREYSCALE.name());\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(0, int0);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "public void testCheckForTripleMultiColor()\n {\n // Note that fromString calls the reset method internally.\n\n // An empty board\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // A single filled cell\n b1.reset();\n b1.fromString(\"REEEEBEEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Some partially filled rows\n b1.fromString(\"RREEBBEEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"BEBEEERER\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"RRB\"+\"BEB\"+\"RER\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Some partially filled columns;\n b1.fromString(\"RBERBEEEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"EBREEEEBR\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"RBR\"+\"REB\"+\"EBR\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Partial Diagonals\n b1.fromString(\"REE\"+\"ERE\"+\"EEB\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"REB\"+\"EEE\"+\"BER\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n b1.fromString(\"RER\"+\"ERE\"+\"EEE\");\n assertEquals(b1.checkForTriple(), Cell.EMPTY);\n\n // Filled columns\n b1.fromString(\"RBBREERBB\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"BBRBBREER\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"RBRRBRRER\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n\n // Filled Rows\n b1.fromString(\"RRREEBBBE\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"EEBBBERRR\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"RRRBBERRR\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n\n // Filled Diagonals\n b1.fromString(\"REB\"+\"ERE\"+\"BER\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"BBR\"+\"ERE\"+\"RBB\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n b1.fromString(\"RBR\"+\"BRB\"+\"RBR\");\n assertEquals(b1.checkForTriple(), Cell.RED1);\n\n }", "public void testCOLOUR5() throws Exception {\n\t\tObject retval = execLexer(\"COLOUR\", 124, \"purpure\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"COLOUR\", expecting, actual);\n\t}", "@Test\n public void testVictoryRed(){\n for (Cell c: modelTest.grid) {\n if (c.getX() == 6)\n c.setColor(Color.RED);\n }\n\n modelTest.researchVictory(1,0);\n Color winnerTest = modelTest.getWinner();\n\n Assert.assertEquals(winnerTest,Color.RED);\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.setVideoFrameRate(25);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "void testColorChecker(Tester t) {\r\n initData();\r\n Cell topLeft = (Cell) this.game7.indexHelp(0, 0);\r\n Cell topRight = (Cell) this.game7.indexHelp(1, 0);\r\n Cell botLeft = (Cell) this.game7.indexHelp(0, 1);\r\n Cell botRight = (Cell) this.game7.indexHelp(1, 1);\r\n t.checkExpect(topLeft.flooded, true);\r\n t.checkExpect(topRight.flooded, false);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(botRight.flooded, false);\r\n\r\n topRight.colorChecker(topLeft.color);\r\n t.checkExpect(topRight.flooded, true);\r\n t.checkExpect(botRight.flooded, true);\r\n t.checkExpect(botLeft.flooded, false);\r\n t.checkExpect(topLeft.flooded, true);\r\n }", "@BeforeEach\n public void setup() {\n red_piece = new Piece(Piece.Color.RED);\n white_piece = new Piece(Piece.Color.WHITE);\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(false);\n homeEnvironment0.setPhotoQuality(2377);\n homeEnvironment0.getSkyColor();\n homeEnvironment0.getSubpartSizeUnderLight();\n homeEnvironment0.setSkyColor(2377);\n assertEquals(2377, homeEnvironment0.getPhotoQuality());\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@LargeTest\n public void testIntrinsicsColorMatrixGrey() {\n TestAction ta = new TestAction(TestName.INTRINSICS_COLOR_MATRIX_GREY);\n runTest(ta, TestName.INTRINSICS_COLOR_MATRIX_GREY.name());\n }", "private PaletteFactory() {\n }", "@Test\n public void testGetColorModel(){\n IndexColorModel indexColorModel = imageData.getColorModel();\n Assert.assertNotNull(indexColorModel );\n Assert.assertEquals(ColorTable.getColorModel(0), indexColorModel);\n }", "public void init_colors(Color c1,Color c2,Color c3,Color c4){\n\t\tcolors = new Color [100];\n\t\tfor (int i = 0; i < 33; i++){\n\t\t\tdouble f = ((double)i) / 32;\n\t\t\tcolors[i] = new Color(\n\t\t\t\tclamp((int)( c1.getRed() + (f * (c2.getRed() - c1.getRed())) )),\n\t\t\t\tclamp((int)( c1.getGreen() + (f * (c2.getGreen() - c1.getGreen())) )),\n\t\t\t\tclamp((int)( c1.getBlue() + (f * (c2.getBlue() - c1.getBlue())) ))\n\t\t\t);\n\t\t}\n\t\tfor (int i = 33; i < 66; i++){\n\t\t\tdouble f = ((double)(i - 33)) / 32;\n\t\t\tcolors[i] = new Color(\n\t\t\t\tclamp((int)( c2.getRed() + (f * (c3.getRed() - c2.getRed())) )),\n\t\t\t\tclamp((int)( c2.getGreen() + (f * (c3.getGreen() - c2.getGreen())) )),\n\t\t\t\tclamp((int)( c2.getBlue() + (f * (c3.getBlue() - c2.getBlue())) ))\n\t\t\t);\n\t\t}\n\t\tfor (int i = 66; i < 100; i++){\n\t\t\tdouble f = ((double)(i - 66)) / 32;\n\t\t\tcolors[i] = new Color(\n\t\t\t\tclamp((int)( c3.getRed() + (f * (c4.getRed() - c3.getRed())) )),\n\t\t\t\tclamp((int)( c3.getGreen() + (f * (c4.getGreen() - c3.getGreen())) )),\n\t\t\t\tclamp((int)( c3.getBlue() + (f * (c4.getBlue() - c3.getBlue())) ))\n\t\t\t);\n\t\t}\n\t}", "public void onGenerated(Palette palette) {\n }", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n URL uRL0 = MockURL.getHttpExample();\n URLContent uRLContent0 = new URLContent(uRL0);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"+Z)]_\", \"+Z)]_\", uRLContent0, 3273, 828.053F, \"com.eteks.sweethome3d.model.TexturesCategory\", true);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(3273, homeTexture0, (-3467), homeTexture0, (-3467), 1.0F);\n int int0 = homeEnvironment0.getLightColor();\n assertEquals((-3467), homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals((-3467), int0);\n assertEquals(3273, homeEnvironment0.getGroundColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(1.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "public randomColorGenerator(Color[] colors){\n colorChoices = colors;\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"X`o#v\", (Content) null, 19, 19);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(19, homeTexture0, 19, homeTexture0, 19, 19);\n homeEnvironment0.setDrawingMode((HomeEnvironment.DrawingMode) null);\n assertEquals(19, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(19, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(19, homeEnvironment0.getLightColor());\n assertEquals(19.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "public static float[] createColors() {\n float[] data = new float[4 * 3];\n data[0] = 1f;\n data[1] = 0f;\n data[2] = 0f;\n data[3] = 1f;\n\n data[4] = 0f;\n data[5] = 1f;\n data[6] = 0f;\n data[7] = 1f;\n\n data[8] = 0f;\n data[9] = 0f;\n data[10] = 1f;\n data[11] = 1f;\n return data;\n }", "@Before\n public void setUp() {\n defaultColor1 = new Color(10, 10, 10);\n defaultPosition1 = new Position(0, 100);\n defaultSize1 = new Size(20, 20);\n defaultShape1 = new Rectangle(defaultColor1, defaultPosition1, defaultSize1);\n defaultColor2 = new Color(100, 100, 100);\n defaultPosition2 = new Position(50, 50);\n defaultSize2 = new Size(25, 25);\n defaultShape2 = new Oval(defaultColor2, defaultPosition2, defaultSize2);\n }", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getGroundColor();\n assertEquals(11053224, int0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "public void deleteExperimentColors();", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2358, (HomeTexture) null, 2358, (HomeTexture) null, 2358, 2358);\n homeEnvironment0.setCeillingLightColor(2358);\n homeEnvironment0.setCeillingLightColor(2358);\n assertEquals(2358, homeEnvironment0.getCeillingLightColor());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 1624, 0, 1624);\n homeEnvironment0.getWallsAlpha();\n homeEnvironment0.getVideoFrameRate();\n homeEnvironment0.setVideoFrameRate(25);\n homeEnvironment0.setPhotoHeight(1624);\n AspectRatio aspectRatio0 = homeEnvironment0.getPhotoAspectRatio();\n homeEnvironment0.setSubpartSizeUnderLight(0.0F);\n homeEnvironment0.getVideoAspectRatio();\n homeEnvironment0.setWallsAlpha(0.0F);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n catalogTexture0.getCategory();\n catalogTexture0.setCategory((TexturesCategory) null);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n homeEnvironment0.getVideoAspectRatio();\n homeEnvironment0.getLightColor();\n // Undeclared exception!\n try { \n homeEnvironment0.setVideoAspectRatio(aspectRatio0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Unsupported aspect ratio VIEW_3D_RATIO\n //\n verifyException(\"com.eteks.sweethome3d.model.HomeEnvironment\", e);\n }\n }", "@Test\n public void testFillOnExport(){\n VecCommandStack.push(VecCommandFactory.GetColorCommand(FILL, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"FILL #0000ff\\n\", print);\n }", "@Test\n public void brewTest(){\n try{\n cmTest.brew(2.5,15);\n cmTest.brew(2.4,14.5);\n cmTest.brew(2.6,14.5);\n } catch (Exception e) {\n fail();\n }\n\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244786), (HomeTexture) null, (-2146244786), (HomeTexture) null, (-2146244786), (-2146244786));\n homeEnvironment0.setCeillingLightColor((-2146244786));\n int int0 = homeEnvironment0.getCeillingLightColor();\n assertEquals((-2146244786), int0);\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, int0);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n URL uRL0 = MockURL.getHttpExample();\n URLContent uRLContent0 = new URLContent(uRL0);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"+Z)]_\", \"+Z)]_\", uRLContent0, 3273, 828.053F, \"com.eteks.sweethome3d.model.TexturesCategory\", true);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(3273, homeTexture0, (-3467), homeTexture0, (-3467), 1.0F);\n int int0 = homeEnvironment0.getPhotoWidth();\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, int0);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(3273, homeEnvironment0.getGroundColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(1.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals((-3467), homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-3467), homeEnvironment0.getLightColor());\n }", "@Test\n public void basicRenderTwoColorTest() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(Point3D.zero, new Vector(0, -1, 0), new Vector(0, 0, 1)));\n scene.setDistance(100);\n scene.setBackground(new Color(75, 127, 90));\n scene.setAmbientLight(new AmbientLight(new java.awt.Color(255, 191, 191), 1));\n\n scene.addGeometries(new Sphere(50, new Point3D(0, 0, 100)));\n\n scene.addGeometries(\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, 100, 100), new Point3D(100, 100, 100)),\n new Triangle(new Point3D(100, 0, 100), new Point3D(0, -100, 100), new Point3D(100, -100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, 100, 100), new Point3D(-100, 100, 100)),\n new Triangle(new Point3D(-100, 0, 100), new Point3D(0, -100, 100), new Point3D(-100, -100, 100)));\n\n ImageWriter imageWriter = new ImageWriter(\"new render test\", 500, 500, 500, 500);\n Render render = new Render(scene , imageWriter);\n\n render.renderImage();\n render.printGrid(50, java.awt.Color.YELLOW);\n render.writeToImage();\n }", "public static void multiRunTest(){\n /* Input resources.\n * For each String:\n * - the first character is the name of the first image.\n * - the second character is the name of the second image.\n */\n String[] inputs = new String[]{\n \"ab\",\n \"cd\",\n \"ef\",\n \"gh\",\n \"il\",\n \"mn\"\n };\n \n BlueRand random = new BlueRand();\n random.setOutputFile(\"sample/output/multiRuns_output.txt\");\n random.setOutputImage(\"sample/output/multiRuns_output.bmp\");\n random.overwriteOutputFile(false); \n //random.deleteInputFiles(true);\n try {\n\t for (String s : inputs){\n\t random.setInputImages(\"sample/input/\"+s.charAt(0)+\".jpg\",\n\t \"sample/input/\"+s.charAt(1)+\".jpg\"); \n\t ArrayList<Byte> output = random.generateRandom();\n\t System.out.println(\"run finished... Bytes generated: \" + output.size());\n\t }\n } catch (BlueRandException e){\n \tSystem.out.println(e.getMessage());\n }\n }", "public void randomizeColor() {\r\n\t\tArrayList<Integer> possibleColors = new ArrayList<Integer>();\r\n\t\tfor(int i = 1; i<=4; i++) {\r\n\t\t\tif(i!=colorType) { \r\n\t\t\t\tpossibleColors.add(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcolorType = possibleColors.get((int) (Math.random()*3));\r\n\t\t\r\n\t}", "@Test\n public void test100True() {\n long start = System.currentTimeMillis();\n for (int i = 0; i < 100; i++) {\n RandomGUID myGUID = new RandomGUID(true);\n System.out.println(\"Seeding String=\" + myGUID.valueBeforeMD5);\n System.out.println(\"rawGUID=\" + myGUID.valueAfterMD5);\n System.out.println(\"RandomGUID=\" + myGUID.toString());\n }\n System.out.println(Ansi.ansi().eraseScreen().render(String.format(\"100 条@|blue 耗时 |@@|yellow %s |@@|blue 毫秒|@\", System.currentTimeMillis() - start)));\n }", "private void generateColors(){\n\t\tRandom r = new Random();\n\t\tcurrentIndex = 0;\n\t\tfor (int i = 0; i < colors.length; i++) {\n\t\t\tcolors[i] = COLORS_DEFAULT[r.nextInt(COLORS_DEFAULT.length)];\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundTexture((HomeTexture) null);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "@Test(timeout = 4000)\n public void test009() throws Throwable {\n URL uRL0 = MockURL.getFileExample();\n TemporaryURLContent temporaryURLContent0 = new TemporaryURLContent(uRL0);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"Pr%?N;9,nuN0VVr Il\", temporaryURLContent0, (-27.78F), (-1174.5889F), \"Pr%?N;9,nuN0VVr Il\", true);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(3, homeTexture0, 952, (-1120), (-3575.0F));\n float float0 = homeEnvironment0.getWallsAlpha();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(952, homeEnvironment0.getSkyColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals((-3575.0F), float0, 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(3, homeEnvironment0.getGroundColor());\n assertEquals((-1120), homeEnvironment0.getLightColor());\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n URL uRL0 = MockURL.getHttpExample();\n ResourceURLContent resourceURLContent0 = new ResourceURLContent(uRL0, false);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"1Zucc:+\", \"1Zucc:+\", resourceURLContent0, 0, (-1114.1877F), \"1Zucc:+\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.getVideoWidth();\n homeEnvironment0.getCeillingLightColor();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n AspectRatio aspectRatio0 = AspectRatio.FREE_RATIO;\n homeEnvironment1.setPhotoAspectRatio(aspectRatio0);\n homeEnvironment0.getVideoWidth();\n homeEnvironment0.setPhotoAspectRatio(aspectRatio0);\n homeEnvironment0.getGroundColor();\n homeEnvironment1.setVideoFrameRate(0);\n int int0 = homeEnvironment0.getPhotoHeight();\n assertEquals(AspectRatio.FREE_RATIO, homeEnvironment0.getPhotoAspectRatio());\n assertEquals(300, int0);\n }", "public static void main(String[] args) {\n Random r = new Random();\n int w = 50;\n int h = 40;\n int[][] a = new int[w][h];\n for (int i = 0; i < w; i++)\n {\n for (int j = h/2; j < h; j++)\n {\n a[i][j] = r.nextInt(GameView.colors.length);\n }\n }\n GameView tv = new GameView(a);\n new TestFrame(tv, \"Iulia Petria, 1601159\");\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", \"FILL\", (Content) null, 30.0F, 30.0F, \"FILL\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(189, homeTexture0, 1, homeTexture0, 8, 1713.4752F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n \n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(8, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(1713.4752F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(189, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "@org.junit.Test\r\n public void testPaint() {\r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintBlack();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.paintRed();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n \r\n node.invertColor();\r\n assert(!node.isRed());\r\n assert(node.isBlack());\r\n \r\n node.invertColor();\r\n assert(node.isRed());\r\n assert(!node.isBlack()); \r\n }", "void mosaic(int seed);" ]
[ "0.79449755", "0.75722283", "0.7324062", "0.67629963", "0.64909905", "0.64357394", "0.62936777", "0.61953783", "0.6081073", "0.59889793", "0.59740037", "0.59492123", "0.59473336", "0.5846121", "0.5788331", "0.5766783", "0.57024324", "0.5683587", "0.56832266", "0.56772834", "0.5663734", "0.5641021", "0.5612923", "0.559136", "0.55885005", "0.55841035", "0.556891", "0.55648166", "0.5544926", "0.55379343", "0.5530098", "0.55250734", "0.55206966", "0.5520293", "0.55124223", "0.5472002", "0.5437201", "0.5419989", "0.541784", "0.5411659", "0.5409243", "0.5384766", "0.538379", "0.53822595", "0.53790796", "0.5377756", "0.5352476", "0.5350427", "0.5346699", "0.5338285", "0.5337088", "0.5332777", "0.5330739", "0.5326171", "0.5314248", "0.53033537", "0.5299079", "0.5296347", "0.528916", "0.5281154", "0.5267438", "0.5247463", "0.52454287", "0.52438587", "0.5229917", "0.5223326", "0.521107", "0.52049065", "0.52042955", "0.5201232", "0.5188887", "0.5183091", "0.51825595", "0.51818305", "0.51791155", "0.5177498", "0.5175109", "0.51699895", "0.5168258", "0.5167198", "0.5167157", "0.5164798", "0.5160378", "0.51600116", "0.51579535", "0.5157141", "0.51509076", "0.51462996", "0.51434404", "0.51361173", "0.51285607", "0.5127986", "0.51255435", "0.5119661", "0.51116014", "0.5110533", "0.510906", "0.5108355", "0.51076514", "0.5106598" ]
0.84522545
0
Helper method used to test monochromatic palettes.
private void runAnalogousPalette(int[][][] RGB_RESULTS, int amount) { RGBColor monochromatic; String err; int[] coords; int[] monoCoords; for(int index = 0; index < RGB_INPUTS.length; index++) { coords = RGB_INPUTS[index]; this.paletteOne = new MonoChromaticPalette(new RGBColor(coords[0], coords[1], coords[2]), amount); for(int index2 = 0; index2 < this.paletteOne.getColors().size(); index2++) { monochromatic = Color.getRGBColor(this.paletteOne.getColor(index2)); monoCoords = RGB_RESULTS[index][index2]; err = String.format("Monochromatic color %s was given instead of %s!\n", monochromatic, Arrays.toString(monoCoords)); assertEquals(err, monoCoords[0], monochromatic.getRed(), 2); assertEquals(err, monoCoords[1], monochromatic.getGreen(), 2); assertEquals(err, monoCoords[2], monochromatic.getBlue(), 2); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testMonochromaticPalettesOne() {\n this.runAnalogousPalette(RGB_RESULTS_ONE, 1);\n }", "@Test\n public void testMonochromaticPalettesThree() {\n this.runAnalogousPalette(RGB_RESULTS_THREE, 3);\n }", "@Test\n public void testMonochromaticPalettesTwo() {\n this.runAnalogousPalette(RGB_RESULTS_TWO, 2);\n }", "@Test\r\n public void testSingleColor(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n }", "@Test\r\n public void testComplex(){\r\n List<Tone> palette = StandardPalettes.PWG_STANDARD;\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/complex/rooves.jpg\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n BufferedImage target = ImageFileUtils.loadImageResource(\"/resultImages/paletteReplacer/pwgRooves.png\");\r\n\r\n assertPixelsMatch(target, result);\r\n }", "@Test\r\n public void testTrivialReplacement(){\r\n List<Tone> palette = Arrays.asList(new Tone(new Color(200,10,10)),\r\n new Tone(new Color(10,200,10)),\r\n new Tone(new Color(10,10,200)));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/geometric/redBlueQuarter.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(2, analysis.byCount().size());\r\n assertEquals(palette.get(0), analysis.byCount().get(0).getTone());\r\n assertEquals(palette.get(2), analysis.byCount().get(1).getTone());\r\n }", "@Test\r\n public void testSameSize(){\r\n List<Tone> palette = Arrays.asList(new Tone(Color.red));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer();\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n assertDimensions(result, 2, 4);\r\n }", "@Test\r\n public void testConfigurableConstructor(){\r\n ColorDistanceFunction distanceFunction = mock(ColorDistanceFunction.class);\r\n when(distanceFunction.getDistance(not(eq(new Tone(Color.BLUE))), any())).thenReturn(99.9);\r\n when(distanceFunction.getDistance(eq(new Tone(Color.BLUE)), any())).thenReturn(0.0);\r\n\r\n List<Tone> palette = Arrays.asList(new Tone(Color.RED), new Tone(Color.BLUE));\r\n\r\n BufferedImage image = ImageFileUtils.loadImageResource(\"/sampleImages/dimensions/2x4.png\");\r\n\r\n PaletteReplacer replacer = new PaletteReplacer(distanceFunction);\r\n\r\n BufferedImage result = replacer.replace(image, palette);\r\n\r\n PaletteDistribution analysis = new Palettester().analyseAllColors(result);\r\n\r\n assertEquals(1, analysis.byCount().size());\r\n assertContainsColor(Color.BLUE, analysis);\r\n }", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.getVideoAspectRatio();\n homeEnvironment0.setWallsAlpha(3308.328F);\n homeEnvironment0.setVideoQuality(11053224);\n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n homeEnvironment0.getDrawingMode();\n assertEquals(3308.328F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test(timeout = 4000)\n public void test097() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test\n public void metalAndColorsTest() {\n JdiSite.homePage.openNewPageByHeaderMenu(HeaderMenuItem.METALS_AND_COLORS);\n JdiSite.metalAndColorsPage.checkOpened();\n // !TODO - I decided to remove the method from MetalAndColorsForm and make it easier\n JdiSite.metalAndColorsPage.fillAndSubmitMetalAndColorsForm(DefaultsData.DEFAULT_DATA);\n JdiSite.metalAndColorsPage.checkResults(DefaultsData.DEFAULT_DATA);\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-564), (HomeTexture) null, (-564), (HomeTexture) null, (-346), (-346));\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.VIDEO_QUALITY;\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-564), homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals((-346.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-346), homeEnvironment0.getLightColor());\n assertEquals((-564), homeEnvironment0.getSkyColor());\n }", "public PlasmaSelectionTester() {\r\n\t}", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setAllLevelsVisible(false);\n homeEnvironment0.setPhotoQuality(2377);\n homeEnvironment0.getSkyColor();\n homeEnvironment0.getSubpartSizeUnderLight();\n homeEnvironment0.setSkyColor(2377);\n assertEquals(2377, homeEnvironment0.getPhotoQuality());\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setPhotoQuality(0);\n AspectRatio aspectRatio0 = AspectRatio.RATIO_16_9;\n homeEnvironment0.setVideoAspectRatio(aspectRatio0);\n homeEnvironment0.getVideoWidth();\n homeEnvironment0.getPhotoWidth();\n homeEnvironment0.getVideoCameraPath();\n homeEnvironment0.getLightColor();\n homeEnvironment0.getVideoAspectRatio();\n assertEquals(AspectRatio.RATIO_16_9, homeEnvironment0.getVideoAspectRatio());\n }", "@LargeTest\n public void testGreyscale() {\n TestAction ta = new TestAction(TestName.GREYSCALE);\n runTest(ta, TestName.GREYSCALE.name());\n }", "@Test\n public void mvtFromStyleTest() {\n try {\n JavaResources.copyFileFromResources(main, \"rob.json\", null, \"/\");\n } catch (IOException e) {\n fail(e.getMessage());\n }\n Preferences prefs = new Preferences(main);\n LayerUtils.removeImageryLayers(main);\n main.getMap().setPrefs(main, prefs);\n assertTrue(TestUtils.clickResource(device, true, device.getCurrentPackageName() + \":id/layers\", true));\n assertTrue(TestUtils.clickResource(device, true, device.getCurrentPackageName() + \":id/add\", true));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.layer_add_layer_from_mvt_style), false));\n TestUtils.selectFile(device, main, null, \"rob.json\", true);\n assertTrue(TestUtils.findText(device, false, \"postcodes-source\", 10000));\n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setVideoQuality(76);\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals(76, int0);\n }", "@Test(timeout = 4000)\n public void test027() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setPhotoQuality((-2107));\n int int0 = homeEnvironment0.getPhotoQuality();\n assertEquals((-2107), int0);\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(0, int0);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals(329, homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(329, homeEnvironment0.getSkyColor());\n assertEquals(0, int0);\n assertEquals(76, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(329.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test\n @MediumTest\n @Feature({\"PaintPreview\"})\n public void testPreNativePreviewExists() throws Exception {\n mTemporaryFolder.newFile(\"2.zip\");\n mTemporaryFolder.newFile(\"3.zip\");\n mTemporaryFolder.newFile(\"6\");\n mTemporaryFolder.newFolder(\"10\");\n\n TestThreadUtils.runOnUiThreadBlocking(() -> {\n mPaintPreviewTabService = PaintPreviewTabServiceFactory.getServiceInstance();\n Assert.assertTrue(mPaintPreviewTabService.previewExistsPreNative(\n mTemporaryFolder.getRoot().getPath(), 2));\n Assert.assertTrue(mPaintPreviewTabService.previewExistsPreNative(\n mTemporaryFolder.getRoot().getPath(), 3));\n Assert.assertFalse(mPaintPreviewTabService.previewExistsPreNative(\n mTemporaryFolder.getRoot().getPath(), 6));\n Assert.assertFalse(mPaintPreviewTabService.previewExistsPreNative(\n mTemporaryFolder.getRoot().getPath(), 10));\n });\n }", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"DT.,X\", (Content) null, 1, 1.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(1, homeTexture0, 1, homeTexture0, 1, 0.0F);\n homeEnvironment0.getGroundTexture();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(1, homeEnvironment0.getGroundColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(1, homeEnvironment0.getLightColor());\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "public void testGetBackground()\n {\n assertNotNull( map.getBackground() );\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"\", (Content) null, (-826), 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2140976121, homeTexture0, 949, homeTexture0, (-3047), 949);\n homeEnvironment0.getGroundTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(949.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(949, homeEnvironment0.getSkyColor());\n assertEquals((-3047), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(2140976121, homeEnvironment0.getGroundColor());\n }", "@Test\n public void videoHorizontalTest() {\n // TODO: test videoHorizontal\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n homeEnvironment0.setSubpartSizeUnderLight(0.0F);\n AspectRatio aspectRatio0 = AspectRatio.SQUARE_RATIO;\n homeEnvironment1.setVideoQuality(9);\n homeEnvironment1.setVideoAspectRatio(aspectRatio0);\n homeEnvironment0.setGroundColor((-1071));\n homeEnvironment0.setObserverCameraElevationAdjusted(false);\n homeEnvironment0.setLightColor((-1071));\n homeEnvironment0.getWallsAlpha();\n homeEnvironment1.getSkyTexture();\n homeEnvironment1.setLightColor((-646));\n homeEnvironment1.getGroundTexture();\n homeEnvironment0.isObserverCameraElevationAdjusted();\n homeEnvironment0.setLightColor((-1071));\n homeEnvironment0.setWallsAlpha(0.0F);\n homeEnvironment0.setVideoQuality((-1071));\n homeEnvironment0.getDrawingMode();\n homeEnvironment0.setSubpartSizeUnderLight((-1071));\n homeEnvironment0.setSkyColor((-1071));\n assertEquals((-1071), homeEnvironment0.getSkyColor());\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n homeEnvironment0.clone();\n assertEquals(1260, homeEnvironment0.getPhotoQuality());\n }", "public static void testPixellateThreeArgs(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(18, 60, 40);\n\t caterpillar.explore();\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-826), 0.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-3047), homeTexture0, 949, homeTexture0, (-3047), 949);\n assertEquals((-3047), homeEnvironment0.getLightColor());\n \n homeEnvironment0.setLightColor(949);\n assertEquals(949, homeEnvironment0.getLightColor());\n }", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture((String) null, (Content) null, 2688.5F, 2688.5F, false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(300, homeTexture0, 1025, homeTexture0, 1025, 300);\n int int0 = homeEnvironment0.getSkyColor();\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(1025, homeEnvironment0.getLightColor());\n assertEquals(1025, int0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(300.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(300, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n homeEnvironment0.getSkyTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 1624, 0, 1624);\n homeEnvironment0.getWallsAlpha();\n homeEnvironment0.getVideoFrameRate();\n homeEnvironment0.setVideoFrameRate(25);\n homeEnvironment0.setPhotoHeight(1624);\n AspectRatio aspectRatio0 = homeEnvironment0.getPhotoAspectRatio();\n homeEnvironment0.setSubpartSizeUnderLight(0.0F);\n homeEnvironment0.getVideoAspectRatio();\n homeEnvironment0.setWallsAlpha(0.0F);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.LIGHT_COLOR;\n catalogTexture0.getCategory();\n catalogTexture0.setCategory((TexturesCategory) null);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, (PropertyChangeListener) null);\n homeEnvironment0.getVideoAspectRatio();\n homeEnvironment0.getLightColor();\n // Undeclared exception!\n try { \n homeEnvironment0.setVideoAspectRatio(aspectRatio0);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Unsupported aspect ratio VIEW_3D_RATIO\n //\n verifyException(\"com.eteks.sweethome3d.model.HomeEnvironment\", e);\n }\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n homeEnvironment0.setPhotoQuality(1260);\n int int0 = homeEnvironment0.getPhotoQuality();\n assertEquals(1260, int0);\n }", "@Test\n public void largePicTest() {\n // TODO: test largePic\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n homeEnvironment0.setPhotoQuality(5);\n HomeEnvironment.DrawingMode homeEnvironment_DrawingMode0 = HomeEnvironment.DrawingMode.FILL;\n homeEnvironment0.setDrawingMode(homeEnvironment_DrawingMode0);\n homeEnvironment0.setSubpartSizeUnderLight((-1.0F));\n homeEnvironment0.setGroundColor(5);\n homeEnvironment0.setGroundColor(0);\n homeEnvironment0.setVideoWidth(3);\n HomeEnvironment.Property.values();\n homeEnvironment0.getVideoCameraPath();\n homeEnvironment0.clone();\n assertEquals((-1.0F), homeEnvironment0.getSubpartSizeUnderLight(), 0.01F);\n }", "@Test\n\tpublic void testGetProcessorForColorProcessor() {\n\t\tfinal PlanarImg< ARGBType, IntArray > argbs = PlanarImgs.argbs( 1, 1, 1 );\n\t\targbs.randomAccess().get().set( 0xff010203 );\n\t\tfinal VirtualStack stack = PlanarImgToVirtualStack.wrap( argbs );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t\tstack.getProcessor( 1 );\n\t\tassertArrayEquals( new int[] { 0xff010203 }, (int[]) stack.getPixels( 1 ) );\n\t}", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n URL uRL0 = MockURL.getHttpExample();\n ResourceURLContent resourceURLContent0 = new ResourceURLContent(uRL0, false);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"1Zucc:+\", \"1Zucc:+\", resourceURLContent0, 0, (-1114.1877F), \"1Zucc:+\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.getVideoWidth();\n homeEnvironment0.getCeillingLightColor();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n AspectRatio aspectRatio0 = AspectRatio.FREE_RATIO;\n homeEnvironment1.setPhotoAspectRatio(aspectRatio0);\n homeEnvironment0.getVideoWidth();\n homeEnvironment0.setPhotoAspectRatio(aspectRatio0);\n homeEnvironment0.getGroundColor();\n homeEnvironment1.setVideoFrameRate(0);\n int int0 = homeEnvironment0.getPhotoHeight();\n assertEquals(AspectRatio.FREE_RATIO, homeEnvironment0.getPhotoAspectRatio());\n assertEquals(300, int0);\n }", "@Test(timeout = 4000)\n public void test076() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2082), (HomeTexture) null, (-2082), (HomeTexture) null, (-2082), (-2082));\n AspectRatio aspectRatio0 = AspectRatio.VIEW_3D_RATIO;\n homeEnvironment0.setPhotoAspectRatio(aspectRatio0);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-2082), homeEnvironment0.getLightColor());\n assertEquals((-2082), homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals((-2082), homeEnvironment0.getSkyColor());\n assertEquals((-2082.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test\n public void needPortraitTest() {\n // TODO: test needPortrait\n }", "@Test(timeout = 4000)\n public void test071() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244851), (HomeTexture) null, (-2146244851), (HomeTexture) null, (-2146244851), (-2146244851));\n AspectRatio aspectRatio0 = AspectRatio.RATIO_4_3;\n homeEnvironment0.setVideoAspectRatio(aspectRatio0);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals((-2146244851), homeEnvironment0.getSkyColor());\n assertEquals((-2.14624486E9F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals((-2146244851), homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-2146244851), homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n }", "public static void testPixellateOneArg(){\n\t Picture caterpillar = new Picture(\"caterpillar.jpg\");\n\t caterpillar.explore();\n\t caterpillar.pixellate(40);\n\t caterpillar.explore();\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n homeEnvironment0.setPhotoQuality(5);\n HomeEnvironment.DrawingMode homeEnvironment_DrawingMode0 = HomeEnvironment.DrawingMode.FILL;\n homeEnvironment0.setDrawingMode(homeEnvironment_DrawingMode0);\n homeEnvironment0.setSubpartSizeUnderLight((-1.0F));\n TemporaryURLContent temporaryURLContent0 = new TemporaryURLContent((URL) null);\n CatalogTexture catalogTexture0 = new CatalogTexture((String) null, temporaryURLContent0, 0, (-1.0F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n homeEnvironment0.setSkyTexture(homeTexture0);\n homeEnvironment0.getSkyTexture();\n homeEnvironment0.getGroundTexture();\n homeEnvironment0.isObserverCameraElevationAdjusted();\n homeEnvironment0.setLightColor(0);\n homeEnvironment0.setWallsAlpha((-1064.79F));\n homeEnvironment0.getDrawingMode();\n homeEnvironment0.setSubpartSizeUnderLight((-2745.2F));\n homeEnvironment0.setSkyColor(8);\n assertEquals((-1064.79F), homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test @IdeGuiTest\n public void testColorPickerAlpha() throws IOException {\n myProjectFrame = importSimpleApplication();\n ThemeEditorFixture themeEditor = ThemeEditorTestUtils.openThemeEditor(myProjectFrame);\n ThemeEditorTableFixture themeEditorTable = themeEditor.getPropertiesTable();\n\n TableCell cell = row(1).column(0);\n\n JTableCellFixture colorCell = themeEditorTable.cell(cell);\n ResourceComponentFixture resourceComponent = new ResourceComponentFixture(myRobot, (ResourceComponent)colorCell.editor());\n colorCell.startEditing();\n resourceComponent.getSwatchButton().click();\n\n ChooseResourceDialogFixture dialog = ChooseResourceDialogFixture.find(myRobot);\n ColorPickerFixture colorPicker = dialog.getColorPicker();\n Color color = new Color(200, 0, 0, 200);\n colorPicker.setFormat(\"ARGB\");\n colorPicker.setColorWithIntegers(color);\n JTextComponentFixture alphaLabel = colorPicker.getLabel(\"A:\");\n SlideFixture alphaSlide = colorPicker.getAlphaSlide();\n alphaLabel.requireVisible();\n alphaSlide.requireVisible();\n colorPicker.setFormat(\"RGB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n colorPicker.setFormat(\"HSB\");\n alphaLabel.requireNotVisible();\n alphaSlide.requireNotVisible();\n\n dialog.clickOK();\n colorCell.stopEditing();\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setGroundTexture((HomeTexture) null);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "@Test(timeout = 4000)\n public void test029() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getLightColor();\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, int0);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n }", "@Test(timeout = 4000)\n public void test099() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"PHOTO_QUALITY\", (Content) null, (-2146244858), (-2146244858));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1169), homeTexture0, 0, homeTexture0, (-1169), 0);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.GROUND_COLOR;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy(\"Super class isn't cloneable\", propertyChangeListener0);\n homeEnvironment0.removePropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals((-1169), homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-1169), homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", (String) null, (Content) null, (-826), (-826), \"\\\"^qTJc:g?\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(484, homeTexture0, 1371, homeTexture0, (-826), 756.9911F);\n HomeEnvironment.Property homeEnvironment_Property0 = HomeEnvironment.Property.VIDEO_FRAME_RATE;\n PropertyChangeListener propertyChangeListener0 = mock(PropertyChangeListener.class, new ViolatedAssumptionAnswer());\n PropertyChangeListenerProxy propertyChangeListenerProxy0 = new PropertyChangeListenerProxy((String) null, propertyChangeListener0);\n homeEnvironment0.addPropertyChangeListener(homeEnvironment_Property0, propertyChangeListenerProxy0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(1371, homeEnvironment0.getSkyColor());\n assertEquals(484, homeEnvironment0.getGroundColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(756.9911F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-826), homeEnvironment0.getLightColor());\n }", "@LargeTest\n public void testColorCube() {\n TestAction ta = new TestAction(TestName.COLOR_CUBE);\n runTest(ta, TestName.COLOR_CUBE.name());\n }", "@LargeTest\n public void testColorMatrix() {\n TestAction ta = new TestAction(TestName.COLOR_MATRIX);\n runTest(ta, TestName.COLOR_MATRIX.name());\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-3), (HomeTexture) null, (-3), (HomeTexture) null, (-3), (-3));\n homeEnvironment0.setWallsAlpha(0.0F);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Then(\"^Pobranie koloru$\")\n public void Pobranie_koloru() throws Throwable {\n\n WebDriverWait wait = new WebDriverWait(driver, 15);\n WebElement c9 = wait.until(ExpectedConditions.elementToBeClickable(By.xpath(\"//*[@id=\\\"30373\\\"]/div/div/div/div/div/div/div/p[3]/a\")));\n\n String color = driver.findElement(By.xpath(\"/html/body/div[1]/div[3]/div/div[6]/div/div/div[1]/div/ul/li\")).getCssValue(\"color\");\n String[] hexValue = color.replace(\"rgba(\", \"\").replace(\")\", \"\").split(\",\");\n\n int hexValue1=Integer.parseInt(hexValue[0]);\n hexValue[1] = hexValue[1].trim();\n int hexValue2=Integer.parseInt(hexValue[1]);\n hexValue[2] = hexValue[2].trim();\n int hexValue3=Integer.parseInt(hexValue[2]);\n String kolorZeStrony = String.format(\"#%02x%02x%02x\", hexValue1, hexValue2, hexValue3);\n\n Assert.assertEquals(\"#333333\", kolorZeStrony);\n\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", (Content) null, 12, 12, false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(12, homeTexture0, 12, homeTexture0, 12, 12);\n homeEnvironment0.getSkyTexture();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(12, homeEnvironment0.getLightColor());\n assertEquals(12, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(12, homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(12.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "public void createTestPattern()\n {\n int i;\n int j;\n RGBPixel p = new RGBPixel();\n\n for ( i = 0; i < getXSize(); i++ ) {\n for ( j = 0; j < getYSize(); j++ ) {\n if ( ((i % 2 != 0) && (j % 2 == 0)) || \n ((j % 2 != 0) && (i % 2 == 0)) ) {\n p.r = (byte)255;\n p.g = (byte)255;\n p.b = (byte)255;\n }\n else {\n p.r = 0;\n p.g = 0;\n p.b = 0;\n }\n if ( j == getYSize()/2 ) {\n p.r = (byte)255;\n p.g = 0;\n p.b = 0;\n }\n if ( i == getXSize()/2) {\n p.r = 0;\n p.g = (byte)255;\n p.b = 0;\n }\n putPixelRgb(i, j, p);\n }\n }\n }", "@Test(timeout = 4000)\n public void test105() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-175), (HomeTexture) null, (-175), (HomeTexture) null, (-175), (-175));\n homeEnvironment0.getPhotoAspectRatio();\n assertEquals((-175.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals((-175), homeEnvironment0.getGroundColor());\n assertEquals((-175), homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals((-175), homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test\n public void getColorReturnsTheRightColor() {\n assertEquals(0xaa00ff, Tetromino.T.getColor());\n }", "public static void testMirrorTemple()\n {\n Picture temple = new Picture(\"temple.jpg\");\n temple.explore();\n temple.mirrorTemple();\n temple.explore();\n }", "@Test(timeout = 4000)\n public void test066() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n homeEnvironment0.setVideoFrameRate(25);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "@Test\n public void pictureLargeTest() {\n // TODO: test pictureLarge\n }", "public boolean isPaletteApplicable() {\n \t\treturn true;\n \t}", "@Test(timeout = 4000)\n public void test111() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n int int0 = homeEnvironment0.getGroundColor();\n assertEquals(11053224, int0);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test060() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"X`o#v\", (Content) null, 19, 19);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(19, homeTexture0, 19, homeTexture0, 19, 19);\n homeEnvironment0.setDrawingMode((HomeEnvironment.DrawingMode) null);\n assertEquals(19, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(19, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(19, homeEnvironment0.getLightColor());\n assertEquals(19.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test\n public void getColorTest() {\n assertTrue(red_piece.getColor() == Piece.Color.RED);\n assertTrue(white_piece.getColor() == Piece.Color.WHITE);\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"FILL\", \"FILL\", (Content) null, 30.0F, 30.0F, \"FILL\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(189, homeTexture0, 1, homeTexture0, 8, 1713.4752F);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n \n homeEnvironment0.setObserverCameraElevationAdjusted(true);\n assertEquals(1, homeEnvironment0.getSkyColor());\n assertEquals(8, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(1713.4752F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(189, homeEnvironment0.getGroundColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n }", "@Test\n public void mvtMBTilesTest() {\n try {\n JavaResources.copyFileFromResources(main, LIECHTENSTEIN_MBTILES, null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty.json\", null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty-sprite.json\", null, \"mbtiles\");\n JavaResources.copyFileFromResources(main, \"osm-liberty-sprite.png\", null, \"mbtiles\");\n } catch (IOException e) {\n fail(e.getMessage());\n }\n Preferences prefs = new Preferences(main);\n LayerUtils.removeImageryLayers(main);\n main.getMap().setPrefs(main, prefs);\n monitor = instrumentation.addMonitor(PrefEditor.class.getName(), null, false);\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/menu_config\", true));\n instrumentation.waitForMonitorWithTimeout(monitor, 40000); // wait for main\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.config_customlayers_title), true, false));\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/add\", true));\n assertTrue(TestUtils.clickButton(device, device.getCurrentPackageName() + \":id/file_button\", true));\n TestUtils.selectFile(device, main, \"mbtiles\", LIECHTENSTEIN_MBTILES, true);\n assertTrue(TestUtils.findText(device, false, TILEMAKER));\n assertTrue(TestUtils.findText(device, false, \"47.271280\"));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.save_and_set), true, false));\n assertTrue(TestUtils.findText(device, false, TILEMAKER));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.done), true, false));\n assertTrue(TestUtils.clickHome(device, true));\n // go to somewhere in Vaduz\n Map map = App.getLogic().getMap();\n UiObject2 extentButton = TestUtils.getLayerButton(device, TILEMAKER, LayerDialogTest.EXTENT_BUTTON);\n extentButton.clickAndWait(Until.newWindow(), 2000);\n TestUtils.unlock(device);\n TestUtils.zoomToLevel(device, main, 20);\n TestUtils.clickAtCoordinates(device, map, 9.5104, 47.1561619);\n assertTrue(TestUtils.clickTextContains(device, false, \"housenumber\", true));\n assertTrue(TestUtils.findText(device, false, main.getString(R.string.vt_feature_information), 1000));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.Done), true));\n UiObject2 menuButton = TestUtils.getLayerButton(device, TILEMAKER, LayerDialogTest.MENU_BUTTON);\n menuButton.clickAndWait(Until.newWindow(), 2000);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.layer_change_style), true));\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.okay), true));\n menuButton.clickAndWait(Until.newWindow(), 2000);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.layer_load_style), true));\n TestUtils.selectFile(device, main, \"mbtiles\", \"osm-liberty.json\", true);\n assertTrue(TestUtils.clickText(device, false, main.getString(R.string.Done), true));\n // check that we actually loaded something\n de.blau.android.layer.mvt.MapOverlay layer = (MapOverlay) map.getLayer(LayerType.IMAGERY,\n \"TILEMAKERTOOPENMAPTILESSCHEMA\");\n assertNotNull(layer);\n Style style = layer.getStyle();\n assertNotNull(style);\n Layer taxiway = null;\n for (Layer l : style.getLayers()) {\n if (\"aeroway_taxiway\".equals(l.getId())) {\n taxiway = l;\n break;\n }\n }\n assertNotNull(taxiway);\n }", "@Test\n public void testNormalizeAndIsNormalized()\n throws InvalidPairOfCamerasException,\n com.irurueta.geometry.estimators.NotReadyException,\n NotAvailableException {\n final UniformRandomizer randomizer = new UniformRandomizer(new Random());\n final double alphaEuler1 = 0.0;\n final double betaEuler1 = 0.0;\n final double gammaEuler1 = 0.0;\n final double alphaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n final double betaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n final double gammaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n\n final double horizontalFocalLength1 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double verticalFocalLength1 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double horizontalFocalLength2 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double verticalFocalLength2 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n\n final double skewness1 = randomizer.nextDouble(MIN_SKEWNESS, MAX_SKEWNESS);\n final double skewness2 = randomizer.nextDouble(MIN_SKEWNESS, MAX_SKEWNESS);\n\n final double horizontalPrincipalPoint1 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double verticalPrincipalPoint1 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double horizontalPrincipalPoint2 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double verticalPrincipalPoint2 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n\n final double cameraSeparation = randomizer.nextDouble(MIN_CAMERA_SEPARATION,\n MAX_CAMERA_SEPARATION);\n\n final Point3D center1 = new InhomogeneousPoint3D(\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE),\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE),\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE));\n final Point3D center2 = new InhomogeneousPoint3D(\n center1.getInhomX() + cameraSeparation,\n center1.getInhomY() + cameraSeparation,\n center1.getInhomZ() + cameraSeparation);\n\n final Rotation3D rotation1 = new MatrixRotation3D(alphaEuler1, betaEuler1,\n gammaEuler1);\n final Rotation3D rotation2 = new MatrixRotation3D(alphaEuler2, betaEuler2,\n gammaEuler2);\n\n final PinholeCameraIntrinsicParameters intrinsic1 =\n new PinholeCameraIntrinsicParameters(horizontalFocalLength1,\n verticalFocalLength1, horizontalPrincipalPoint1,\n verticalPrincipalPoint1, skewness1);\n final PinholeCameraIntrinsicParameters intrinsic2 =\n new PinholeCameraIntrinsicParameters(horizontalFocalLength2,\n verticalFocalLength2, horizontalPrincipalPoint2,\n verticalPrincipalPoint2, skewness2);\n\n final PinholeCamera camera1 = new PinholeCamera(intrinsic1, rotation1,\n center1);\n final PinholeCamera camera2 = new PinholeCamera(intrinsic2, rotation2,\n center2);\n\n final FundamentalMatrix fundMatrix = new FundamentalMatrix(camera1, camera2);\n\n assertFalse(fundMatrix.isNormalized());\n\n // normalize\n fundMatrix.normalize();\n\n // check correctness\n assertTrue(fundMatrix.isNormalized());\n\n // check that internal matrix has Frobenius norm equal to 1\n final Matrix internalMatrix = fundMatrix.getInternalMatrix();\n\n assertEquals(Utils.normF(internalMatrix), 1.0, ABSOLUTE_ERROR);\n }", "@Test\n public void videoVerticalTest() {\n // TODO: test videoVertical\n }", "@Test\n public void testPenExport(){\n fakeCoord.add(new Point2D.Double(0.10,0.20));\n VecCommandStack.push(VecCommandFactory.GetColorCommand(VecCommandType.PEN, Color.BLUE));\n String print = VecCommandStack.peek().PrintToFile();\n assertEquals(\"PEN #0000ff\\n\", print);\n }", "@Test(timeout = 4000)\n public void test073() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setPhotoQuality((-2107));\n homeEnvironment0.clone();\n assertEquals((-2107), homeEnvironment0.getPhotoQuality());\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"c5!DqhIQ,!L'eP\", \"0dj!E;iRV]\", (Content) null, 0, 0, \"0dj!E;iRV]\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, homeTexture0, 0, 0, 0);\n int int0 = homeEnvironment0.getVideoFrameRate();\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(0, homeEnvironment0.getLightColor());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(25, int0);\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0, homeEnvironment0.getGroundColor());\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244858), (HomeTexture) null, (-2146244858), (HomeTexture) null, (-2146244858), (-2146244858));\n homeEnvironment0.setGroundColor((-2146244858));\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-2146244858), homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals((-2146244858), homeEnvironment0.getGroundColor());\n assertEquals((-2146244858), homeEnvironment0.getSkyColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-2.14624486E9F), homeEnvironment0.getWallsAlpha(), 0.01F);\n }", "@Test(timeout = 4000)\n public void test114() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"system protocol handler\", \"system protocol handler\", (Content) null, 0.0F, 0.0F, \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1970), homeTexture0, 3, homeTexture0, 11, (-1970));\n int int0 = homeEnvironment0.getVideoHeight();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals((-1970.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(11, homeEnvironment0.getLightColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals((-1970), homeEnvironment0.getGroundColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, int0);\n assertEquals(3, homeEnvironment0.getSkyColor());\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setVideoQuality(76);\n homeEnvironment0.clone();\n assertEquals(76, homeEnvironment0.getVideoQuality());\n }", "@LargeTest\n public void testShadows() {\n TestAction ta = new TestAction(TestName.SHADOWS);\n runTest(ta, TestName.SHADOWS.name());\n }", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(1895, (HomeTexture) null, 1895, (HomeTexture) null, 1895, 1895);\n homeEnvironment0.setPhotoWidth(1895);\n assertEquals(1895, homeEnvironment0.getPhotoWidth());\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244786), (HomeTexture) null, (-2146244786), (HomeTexture) null, (-2146244786), (-2146244786));\n homeEnvironment0.setCeillingLightColor((-2146244786));\n int int0 = homeEnvironment0.getCeillingLightColor();\n assertEquals((-2146244786), int0);\n }", "@Test(timeout = 4000)\n public void test005() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setSkyColor(1411);\n assertEquals(1411, homeEnvironment0.getSkyColor());\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.setSkyColor((-2146412091));\n assertEquals((-2146412091), homeEnvironment0.getSkyColor());\n }", "@Test\n public void thumbnailTest() {\n // TODO: test thumbnail\n }", "@Test\n public void picture3FixedTest() {\n // TODO: test picture3Fixed\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-5305), (-283.024F));\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(329, homeTexture0, 329, homeTexture0, 76, 329);\n homeEnvironment0.getVideoCameraPath();\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(329.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(76, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(329, homeEnvironment0.getSkyColor());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(329, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test public void volumeTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n Assert.assertEquals(28.67462334314945, pList.totalVolume(), 0.00001);\n Assert.assertEquals(9.558207781049816, pList.averageVolume(), 0.00001);\n \n PentagonalPyramidList2 pList2 = new PentagonalPyramidList2(\"ListName\", \n null, 0);\n Assert.assertEquals(0.0, pList2.averageVolume(), 0.00001);\n \n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoWidth(320);\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n int int0 = homeEnvironment0.getPhotoHeight();\n assertEquals(329, homeEnvironment0.getSkyColor());\n assertEquals(2870.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals((-1567), homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-1567), homeEnvironment0.getGroundColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, int0);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "@Test(timeout = 4000)\n public void test021() throws Throwable {\n URL uRL0 = MockURL.getFtpExample();\n ResourceURLContent resourceURLContent0 = new ResourceURLContent(uRL0, true);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"6=];vR`]y%YV(7Ma`Lv\", \"DRAWING_MODE\", resourceURLContent0, 1.3333334F, 0.0F, \">HYd+446`M2q`z*\", true);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2291), homeTexture0, (-1240), homeTexture0, (-2291), 5);\n homeEnvironment0.getSkyTexture();\n assertEquals((-1240), homeEnvironment0.getSkyColor());\n assertEquals((-2291), homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(5.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-2291), homeEnvironment0.getLightColor());\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, 1.0F, 2120);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2120, homeTexture0, 11053224, homeTexture0, 2120, 896.0079F);\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n HomeEnvironment homeEnvironment2 = new HomeEnvironment(2120, homeTexture0, 2120, 11053224, (-2542.22F));\n homeEnvironment2.setAllLevelsVisible(true);\n homeEnvironment2.setAllLevelsVisible(false);\n homeEnvironment1.setObserverCameraElevationAdjusted(false);\n HomeEnvironment.DrawingMode[] homeEnvironment_DrawingModeArray0 = HomeEnvironment.DrawingMode.values();\n assertEquals(3, homeEnvironment_DrawingModeArray0.length);\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n URL uRL0 = MockURL.getFtpExample();\n ResourceURLContent resourceURLContent0 = new ResourceURLContent(uRL0, false);\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", \"\", resourceURLContent0, (-1.0F), (-685), \"\");\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-685), homeTexture0, (-2209), homeTexture0, (-685), (-685));\n homeEnvironment0.getGroundTexture();\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals((-685), homeEnvironment0.getGroundColor());\n assertEquals((-2209), homeEnvironment0.getSkyColor());\n assertEquals((-685), homeEnvironment0.getLightColor());\n assertEquals((-685.0F), homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test042() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, (HomeTexture) null, 0, (HomeTexture) null, 0, 0);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n \n homeEnvironment0.setVideoFrameRate(0);\n homeEnvironment0.clone();\n assertEquals(0, homeEnvironment0.getVideoFrameRate());\n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(0, (HomeTexture) null, 0, (HomeTexture) null, 0, 0);\n homeEnvironment0.setLightColor(0);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(0, homeEnvironment0.getGroundColor());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, homeEnvironment0.getLightColor());\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"\", (Content) null, (-826), 0.0F);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-3047), homeTexture0, 949, homeTexture0, (-3047), 949);\n homeEnvironment0.getDrawingMode();\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(949.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n assertEquals((-3047), homeEnvironment0.getLightColor());\n assertEquals(949, homeEnvironment0.getSkyColor());\n assertEquals((-3047), homeEnvironment0.getGroundColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n }", "void createDummyPbufferSurface();", "@Test\n public void RiskPresets_TestA()\n {\n RiskPresets preset = new RiskPresets();\n Assert.assertEquals(true,preset.CustomRiskPreset(\"meduim\",1,2,3,4,0.05));\n }", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoQuality(0);\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(0, homeEnvironment0.getVideoQuality());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n }", "@Test\n public void singlePicTest() {\n // TODO: test singlePic\n }", "@Test\n public void brewTest(){\n try{\n cmTest.brew(2.5,15);\n cmTest.brew(2.4,14.5);\n cmTest.brew(2.6,14.5);\n } catch (Exception e) {\n fail();\n }\n\n }", "static void convert_palette(char []palette,UBytePtr color_prom)\n\t{\n\t\tint i;\n\t\n int p_inc=0;\n\t\tfor (i = 0;i < 1024;i++)\n\t\t{\n\t\t\tint bit0,bit1,bit2,bit3;\n\t\n\t\n\t\t\tbit0 = (color_prom.read(0) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(0) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(0) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(0) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\t\tbit0 = (color_prom.read(2*1024) >> 0) & 0x01;\n\t\t\tbit1 = (color_prom.read(2*1024) >> 1) & 0x01;\n\t\t\tbit2 = (color_prom.read(2*1024) >> 2) & 0x01;\n\t\t\tbit3 = (color_prom.read(2*1024) >> 3) & 0x01;\n\t\t\tpalette[p_inc++]=((char)(255 - (0x10 * bit0 + 0x21 * bit1 + 0x46 * bit2 + 0x88 * bit3)));\n\t\n\t\t\tcolor_prom.inc();\n\t\t}\n\t\n\t\t/* reserve the last color for the transparent pen (none of the game colors has */\n\t\t/* these RGB components) */\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t\tpalette[p_inc++]=((char)(240));\n\t}", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n homeEnvironment0.setVideoWidth(1411);\n assertEquals(1411, homeEnvironment0.getVideoWidth());\n }", "private ToneDetection() { }", "@Test(timeout = 4000)\n public void test108() throws Throwable {\n CatalogTexture catalogTexture0 = new CatalogTexture(\"=,`t\", \"\", (Content) null, 1392, 1714.44F, \"\", false);\n HomeTexture homeTexture0 = new HomeTexture(catalogTexture0);\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-1567), homeTexture0, 329, homeTexture0, (-1567), 2870.0F);\n int int0 = homeEnvironment0.getPhotoQuality();\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals((-1567), homeEnvironment0.getLightColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(0, int0);\n assertEquals(329, homeEnvironment0.getSkyColor());\n assertEquals(2870.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals((-1567), homeEnvironment0.getGroundColor());\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n float float0 = homeEnvironment0.getWallsAlpha();\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(0.0F, float0, 0.01F);\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n assertEquals(320, homeEnvironment0.getVideoWidth());\n }" ]
[ "0.8014698", "0.7619283", "0.73572975", "0.63924307", "0.6137443", "0.6001579", "0.5743821", "0.56664854", "0.5483085", "0.5466134", "0.54303837", "0.5276828", "0.5255165", "0.52508605", "0.5234928", "0.52322483", "0.519793", "0.51741576", "0.5156199", "0.51492685", "0.51324236", "0.51284266", "0.51208633", "0.51140606", "0.5106553", "0.5096586", "0.5094486", "0.50941837", "0.50869644", "0.5077868", "0.5065662", "0.5064871", "0.5059181", "0.50434124", "0.50419486", "0.5024009", "0.4997511", "0.49822167", "0.49812463", "0.49723807", "0.49558246", "0.49550724", "0.49462396", "0.49428824", "0.49284256", "0.49242786", "0.49241167", "0.49193603", "0.49034128", "0.48959365", "0.48922965", "0.48797223", "0.48775193", "0.48743632", "0.48734558", "0.48718035", "0.4869419", "0.48606646", "0.4858477", "0.48542666", "0.48490167", "0.48403138", "0.48401913", "0.48359624", "0.48319364", "0.4827362", "0.48263055", "0.48249522", "0.4822075", "0.4814649", "0.48135537", "0.48130533", "0.48114374", "0.48098612", "0.48076892", "0.4806031", "0.48048478", "0.4793972", "0.47865736", "0.47852212", "0.47831255", "0.47763088", "0.47748592", "0.47709766", "0.4765044", "0.47624883", "0.47572362", "0.47550884", "0.47474054", "0.47416905", "0.4740596", "0.47372103", "0.47347575", "0.47337455", "0.47299048", "0.4728175", "0.47279945", "0.47249284", "0.47189406", "0.4717064" ]
0.47927752
78
Encodes a tree to a single string.
public String serialize(TreeNode root) { if (root == null) { return "[]"; } List<String> list = new ArrayList<>(); Queue<TreeNode> queue = new LinkedList<>(); queue.offer(root); while (!queue.isEmpty()) { TreeNode node = queue.poll(); if (node == null) { list.add("null"); continue; } else { list.add("" + node.val); } if (node.left != null) { queue.offer(node.left); } else { queue.offer(null); } if (node.right != null) { queue.offer(node.right); } else { queue.offer(null); } } // 移除末尾的 null for (int i = list.size() - 1; i >= 0; i--) { if (list.get(i).equals("null")) { list.remove(i); } else { break; } } StringBuilder sb = new StringBuilder(); sb.append('['); for (int i = 0; i < list.size(); i++) { sb.append(list.get(i)); if (i == list.size() - 1) { sb.append("]"); } else { sb.append(","); } } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void encodeTree(){\n StringBuilder builder = new StringBuilder();\n encodeTreeHelper(root,builder);\n }", "public TreeNode encode(Node root) {\n return en(root);\n }", "public String toTreeString() {\n return toTreeString(overallRoot);\n }", "public String tree2Str(TreeNode t){\n\t\tif(t == null)\n\t\t\treturn \"\";\n\t\t\n\t\tStack<TreeNode> stack = new Stack<>();\n\t\tstack.push(t);\n\t\t\n\t\tSet<TreeNode> visited = new HashSet<>();\n\t\tStringBuilder s = new StringBuilder();\n\t\twhile(!stack.isEmpty()){\n\t\t\tt = stack.peek();\n\t\t\t\n\t\t\tif(visited.contains(t)){\n\t\t\t\tstack.pop();\n\t\t\t\ts.append(\")\");\n\t\t\t}else{\n\t\t\t\tvisited.add(t);\n\t\t\t\ts.append(\"(\" + t.data);\n\t\t\t\tif(t.left == null && t.right != null){\n\t\t\t\t\ts.append(\"()\");\n\t\t\t\t}\n\t\t\t\tif(t.right != null){\n\t\t\t\t\tstack.push(t.right);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(t.left != null){\n\t\t\t\t\tstack.push(t.left);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn s.substring(1, s.length()-1);\n\t}", "public String serialize(TreeNode root) {\n if(root == null)\n return \"N\";\n else\n return root.val + \" \"+ serialize(root.left) + \" \"+ serialize(root.right);\n \n }", "public String serialize(TreeNode root) {\n StringBuffer rst = preorderTraversal(root, new StringBuffer());\n return rst.toString();\n\n }", "public static String printTree()\r\n {\r\n String result = \"\";\r\n for (String s: tree.toArrayList())\r\n result = result + \" \" + s;\r\n return result;\r\n }", "public String toString() {\n return tree.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder ans = new StringBuilder();\n preorder(root, ans);\n return ans.toString();\n }", "public String serialize(TreeNode root) {\n if (root == null) return \"\";\n \n //BFS, level order\n StringBuilder sb = new StringBuilder();\n Queue<TreeNode> q = new LinkedList<>();\n q.offer(root);\n while(!q.isEmpty()) {\n root = q.poll();\n if (root == null) sb.append(\"null \");\n else {\n sb.append(root.val + \" \");\n q.offer(root.left);\n q.offer(root.right);\n }\n }\n \n return sb.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n TreeNode x = root;\n Deque<TreeNode> stack = new LinkedList<>();\n while (x != null || !stack.isEmpty()) {\n if (x != null) {\n sb.append(x.val);\n sb.append(' ');\n stack.push(x);\n x = x.left;\n } else {\n sb.append(\"null \");\n x = stack.pop();\n x = x.right;\n }\n }\n return sb.toString();\n }", "public static void main(String a[]) {\n TreeNode root = new TreeNode(1,\n new TreeNode(2,\n null,\n new TreeNode(4, null, null)),\n new TreeNode(3, null, null));\n StringBuffer sb = new StringBuffer();\n tree2str(root, sb);\n System.out.println(sb.toString());\n }", "public String serialize(TreeNode root) {\n \n \tif(root == null) {\n \t\treturn \"\";\n \t}\n \tif(root.left == null && root.right == null) {\n \t\treturn \"\" + root.val;\n \t}\n \tString s = serialize(root.left);\n \ts = \"(\" + s + \")\" + \"(\" + root.val + \")\";\n \ts += \"(\" + serialize(root.right) + \")\";\n \treturn s;\n \t\n }", "public String serialize(TreeNode root) {\n return preOrderToString(root);\n }", "private void encodeTree(BitOutputStore output, SymbolNode root) {\n output.appendBits(8, nLeafNodes - 1);\n SymbolNode[] path = new SymbolNode[256];\n int[] pathBranch = new int[256];\n path[0] = root;\n pathBranch[0] = 0;\n int depth = 1;\n while (depth > 0) {\n int index = depth - 1;\n SymbolNode pNode = path[index];\n int pBranch = pathBranch[index];\n // pBranch is set as follows:\n // 0 we've just arrived at the node and have not yet\n // identified whether it is a branch or a leaf.\n // we have not yet traversed any of its children\n //\n // 1 we traversed down the left branch and need to traverse\n // down the right\n //\n // 2 we have traversed both branches and are on our way up\n\n switch (pBranch) {\n case 0:\n // we've just pushed the node on the stack and have not yet\n // identified whether it is a leaf or a branch.\n if (pNode.isLeaf) {\n output.appendBit(1); // terminal\n output.appendBits(8, pNode.symbol);\n BitOutputStore bitpath = encodePath(depth, path);\n pNode.nBitsInCode = bitpath.getEncodedTextLength();\n pNode.code = bitpath.getEncodedText();\n // pop the stack\n depth--;\n index--;\n // pro-forma, clear the stack variables\n pathBranch[depth] = 0;\n path[depth] = null;\n\n } else {\n output.appendBit(0); // non-terminal\n pathBranch[index] = 1;\n pathBranch[depth] = 0;\n path[depth] = pNode.left;\n depth++;\n }\n break;\n case 1:\n pathBranch[index] = 2;\n pathBranch[depth] = 0;\n path[depth] = pNode.right;\n depth++;\n break;\n case 2:\n // we're on our way up\n pathBranch[index] = 0;\n path[index] = null;\n depth--;\n break;\n default:\n // error condition, won't happen\n throw new IllegalStateException(\"Internal error encoding tree\");\n }\n }\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n visit(root, sb);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n visit(root, sb);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n visit(root, sb);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder res = mySeri(root, new StringBuilder());\n return res.toString();\n }", "public String serialize(TreeNode root) {\n if (root == null) {\n return \"X\";\n }\n return \"(\" + serialize(root.left) + \")\" + root.val + \"(\" + serialize(root.right) + \")\";\n }", "public String serialize(TreeNode root) {\n StringBuilder builder = new StringBuilder();\n serialize(root, builder);\n return builder.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder stringBuilder = new StringBuilder();\n buildString(root, stringBuilder);\n return stringBuilder.toString();\n }", "public String serialize(TreeNode root) {\r\n StringBuilder sb = new StringBuilder();\r\n buildString(root, sb);\r\n return sb.toString();\r\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n buildString(root, sb);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n String res = \"\";\n return serializeCore(root,res);\n }", "public String serialize(TreeNode root) {\n if (root == null) return \"\";\n Queue<TreeNode> qu = new LinkedList<>();\n StringBuilder sb = new StringBuilder();\n qu.offer(root);\n sb.append(root.val);\n sb.append(' ');\n while (!qu.isEmpty()) {\n TreeNode x = qu.poll();\n if (x.left == null) sb.append(\"null \");\n else {\n qu.offer(x.left);\n sb.append(x.left.val);\n sb.append(' ');\n }\n if (x.right == null) sb.append(\"null \");\n else {\n qu.offer(x.right);\n sb.append(x.right.val);\n sb.append(' ');\n }\n }\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n buildTree(sb, root);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n if (root == null) {\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n serialize(root, sb);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n if (root == null) {\n \treturn \"#\";\n }\n \n return \"\" + root.val + \" \" + serialize(root.left) + \" \" + serialize(root.right);\n }", "public String serialize(TreeNode root) {\n if(root==null)\n return \"#\";\n return String.valueOf(root.val)+\"|\"+serialize(root.left)+\"|\"+serialize(root.right);\n }", "public TreeNode encode(Node root) {\n if (root == null) {\n return null;\n }\n TreeNode head = new TreeNode(root.val);\n head.left = en(root.children);\n return head;\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n serHelper(root, sb);\n return sb.toString().trim(); \n }", "public String serialize(TreeNode root) {\n ArrayList<Integer> buffer = new ArrayList<>();\n serialize(root, buffer);\n int[] ints = buffer.stream().mapToInt(i -> i).toArray();\n ByteBuffer byteBuf = ByteBuffer.allocate(ints.length * 4);\n IntBuffer intBuf = byteBuf.order(ByteOrder.BIG_ENDIAN).asIntBuffer();\n intBuf.put(ints);\n String result = Base64.getEncoder().encodeToString(byteBuf.array());\n //System.out.println(result);\n return result;\n }", "public String serialize(TreeNode root) {\n if (root == null) {\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n\n preOrderSerialize(root, sb);\n\n // remove last delimiter from output\n sb.setLength(sb.length() - 1);\n return sb.toString();\n }", "public static String printTree()\n {\n \tString tree = \"\";\n ArrayList<String> letters = converter.toArrayList();\n for(int i = 0; i < letters.size(); i++)\n {\n tree += letters.get(i);\n if(i + 1 < letters.size())\n \t tree += \" \";\n }\n \n return tree;\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n serialize(root,sb);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\r\n\r\n // **** initialization ****\r\n StringBuilder sb = new StringBuilder();\r\n\r\n // **** recursive call (implements DFS) ****\r\n serialize(root, sb);\r\n\r\n // **** return trimmed string ****\r\n return sb.toString().trim();\r\n }", "public TreeNode encode(Node root) {\n\t\t\tif (root == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tTreeNode head = new TreeNode(root.val);\n\t\t\thead.left = en(root.children);\n\t\t\treturn head;\n\t\t}", "public String toString() {\n if (size == 0) {\n return \"Empty tree\";\n }\n\n\n StringBuilder sb = new StringBuilder();\n Node<T> right = root.getRight();\n Node<T> left = root.getLeft();\n\n if (right != null) {\n right.buildBranch(true, \"\", sb);\n }\n\n sb.append(root.getData() + \"\\n\");\n\n if (left != null)\n left.buildBranch(false, \"\", sb);\n\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n if (root==null){\n return \"\";\n }\n StringBuilder str = new StringBuilder();\n serializeRec(str,root);\n str.deleteCharAt(str.length()-1);\n return str.toString();\n }", "public String serialize(TreeNode root) {\n // write your code here\n StringBuilder sb = new StringBuilder();\n ArrayList<TreeNode> queue = new ArrayList<TreeNode>();\n if (root == null) {\n sb.append(\"{}\");\n return sb.toString();\n }\n queue.add(root);\n TreeNode node;\n for(int i = 0; i < queue.size(); i++){\n \tnode = queue.get(i);\n \tif(node != null){\n \t\tqueue.add(node.left);\n \t\tqueue.add(node.right);\n \t}\n }\n while (queue.get(queue.size() - 1) == null) {\n queue.remove(queue.size() - 1);\n }\n\n sb.append(\"{\");\n sb.append(queue.get(0).val);\n for(int i = 1; i < queue.size(); i++){\n \tif (queue.get(i) == null) {\n \t\tsb.append(\",#\");\n \t} else {\n \t\tsb.append(\",\" + queue.get(i).val);\n \t}\n }\n sb.append(\"}\");\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n build_string(root, sb);\n return String.format(\"[%s]\", sb.substring(0, sb.length() - 1).toString());\n }", "public String serialize(TreeNode root) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tpreOrderSerialization(root, sb);\n\t\treturn sb.toString();\n\t}", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n if (root==null) return \"#\";\n sb.append(String.valueOf(root.val));\n String left = serialize(root.left);\n String right = serialize(root.right);\n sb.append(\",\").append(left).append(\",\").append(right);\n return sb.toString();\n }", "private void writeTree() throws IOException {\n\t\ttry (final BufferedWriter writer = Files.newBufferedWriter(destinationFile, CHARSET)) {\n\t\t\tfinal char[] treeString = new char[512];\n\t\t\tint treeStringLength = 0;\n\t\t\tfor (final CharacterCode cur : sortedCodes) {\n\t\t\t\ttreeString[treeStringLength++] = cur.getChar();\n\t\t\t\ttreeString[treeStringLength++] = (char) cur.getCode().length();\n\t\t\t}\n\t\t\tif (treeStringLength > 0xff) { //tree length will not always be less than 255, we have to write it on two bytes\n\t\t\t\tfinal int msb = (treeStringLength & 0xff00) >> Byte.SIZE;\n\t\t\t\ttreeStringLength &= 0x00ff;\n\t\t\t\twriter.write(msb);\n\t\t\t} else {\n\t\t\t\twriter.write(0);\n\t\t\t}\n\t\t\twriter.write(treeStringLength);\n\t\t\twriter.write(treeString, 0, treeStringLength);\n\t\t}\n\t}", "public String serialize(TreeNode root) {\n if (root == null) return \"\";\n\n StringBuilder sb = postOrder(root, new StringBuilder());\n sb.deleteCharAt(sb.length() - 1);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\r\n StringBuilder stringBuilder = new StringBuilder();\r\n doSerialize(root,stringBuilder);\r\n String result = stringBuilder.toString();\r\n return result.substring(0,result.length()-1);\r\n }", "public String toString() {\n\t\t\n\t\tStringBuilder tree = new StringBuilder();\n\t\t\n\t\tQueue<AVLNode> queue = new LinkedList<>();\n\t\tqueue.add(root);\n\t\t\n\t\twhile(!queue.isEmpty()) {\n\t\t\tAVLNode node = queue.poll();\n\t\t\ttree.append(node.num);\n\n\t\t\tif(node.left!=null)\n\t\t\t\tqueue.add(node.left);\n\t\t\t\n\t\t\tif(node.right!=null)\n\t\t\t\tqueue.add(node.right);\n\t\t}\n\t\t\n\t\treturn tree.toString();\n\t}", "public String serialize(TreeNode root) {\n if (root == null) {\n return \"\";\n }\n\n Queue<TreeNode> queue = new LinkedList<>();\n queue.add(root);\n List<String> result = new ArrayList<>();\n while (queue.size() > 0) {\n int size = queue.size();\n for (int i = 0; i < size; i++) {\n TreeNode node = queue.remove();\n if (node == null) {\n result.add(\"#\");\n } else {\n result.add(node.val + \"\");\n queue.add(node.left);\n queue.add(node.right);\n }\n }\n }\n\n return String.join(\",\", result);\n }", "public String serialize(TreeNode root) {\n return serialize(root, \"\");\n }", "public String serialize(TreeNode root) {\n\n if (root == null)\n return \"\";\n\n StringBuffer stringBuffer = new StringBuffer();\n Queue<TreeNode> nodeQueue = new LinkedBlockingQueue<TreeNode>();\n nodeQueue.offer(root);\n TreeNode nullNode = new TreeNode(Integer.MIN_VALUE);\n\n while (!nodeQueue.isEmpty()) {\n TreeNode node = nodeQueue.poll();\n if (node != null && !node.equals(nullNode)) {\n stringBuffer.append(node.val + \",\");\n\n\n if (node.left != null || node.right != null) {\n if (node.left != null) {\n nodeQueue.offer(node.left);\n } else {\n nodeQueue.offer(nullNode);\n //stringBuffer.append(\"null,\");\n }\n\n if (node.right != null) {\n nodeQueue.offer(node.right);\n } else {\n nodeQueue.offer(nullNode);\n // stringBuffer.append(\"null,\");\n }\n }\n } else if (node.equals(nullNode)){\n stringBuffer.append(\"null,\");\n }\n }\n\n stringBuffer.setLength(stringBuffer.length()-1);\n return stringBuffer.toString();\n }", "public String serialize(TreeNode root) {\n return root == null ? \"null\" : root.val + \" \" + serialize(root.left) + \" \" + serialize(root.right);\n }", "public String serialize(TreeNode root) {\n if (root == null) {\n return \"\";\n }\n Queue<TreeNode> queue = new LinkedList<>();\n StringBuilder builder = new StringBuilder();\n queue.offer(root);\n while (!queue.isEmpty()) {\n TreeNode node = queue.poll();\n if (node == null) {\n builder.append(\"X,\");\n } else {\n builder.append(node.val + \",\");\n queue.offer(node.left);\n queue.offer(node.right);\n }\n }\n return builder.toString();\n }", "public String toString() {\n if (subTrees.isEmpty()) return rootToString();\n StringBuilder result = new StringBuilder(rootToString() + \"(\" + subTrees.get(0).toString());\n for (int i = 1; i < subTrees.size(); i++) result.append(\",\").append(subTrees.get(i).toString());\n return result + \")\";\n }", "public String printBFSTree(){\n if(root==null)return \"\";\n String binstr=\"\";\n String valuestr=\"\";\n String codestr=\"\";\n LinkedList<HCNode> list=new LinkedList<HCNode>();\n root.code=\"\";\n list.add(root);\n HCNode node;\n while(list.size()>0){\n node=list.getFirst();\n if(node.left==null && node.right==null){\n binstr=binstr+\"0\";\n valuestr=valuestr+((byte)node.str.charAt(0))+\"\\n\";\n codestr=codestr+node.code;\n }else{\n binstr=binstr+\"1\";\n }\n if(node.left!=null){node.left.code=node.left.parent.code+\"0\";list.addLast(node.left);}\n if(node.right!=null){node.right.code=node.right.parent.code+\"1\";list.addLast(node.right);}\n list.removeFirst();\n }\n String res=binstr+\"\\n\"+valuestr+codestr+\"\\n\";\n System.out.println(binstr);\n System.out.print(valuestr);\n System.out.println(codestr);\n return res;\n }", "public String serialize(TreeNode root) {\n if (root==null){\n return \"[]\";\n }\n Queue<TreeNode> queue = new LinkedList<TreeNode>();\n List<Integer> res = new ArrayList<Integer>();\n queue.add(root);\n int num=0;\n while (queue.size() > 0) {\n TreeNode p=queue.poll();\n if (p==null){\n // System.out.println(\"null\");\n res.add(null);\n continue;\n }\n // System.out.println(p.val);\n res.add(p.val);\n num=res.size();\n queue.offer(p.left);\n queue.offer(p.right);\n }\n res=res.subList(0, num);\n System.out.println(res.toString());\n return res.toString().replaceAll(\" \", \"\");\n }", "public String treeJSON() {\n\t\ttry{\r\n\t\tList trees = this.getTransedTrees();\r\n\t\tString result = this.treeJSON(trees);\r\n\t\treturn result;\r\n\t\t}catch(Exception e){\r\n\t\t\tlog.info(\">>>>faceye error in method:treeJSON() is\"+e.toString());\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t}", "public String serialize(TreeNode root) {\n if (root == null){\n return \"\";\n }\n StringBuilder sb = new StringBuilder();\n Queue<TreeNode> queue = new LinkedList<>();\n queue.offer(root);\n while (!queue.isEmpty()){\n TreeNode curt = queue.poll();\n if (curt == null){\n sb.append(\"null,\");\n continue;\n }\n sb.append(curt.val);\n sb.append(\",\");\n queue.offer(curt.left);\n queue.offer(curt.right);\n }\n sb.deleteCharAt(sb.length() - 1);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n Queue<TreeNode> queue=new LinkedList<>();\n queue.add(root);\n StringBuilder str=new StringBuilder(\"[\");\n while(!queue.isEmpty()){\n TreeNode node=queue.poll();\n if(node==null){\n str.append(\"null,\");\n }else{\n str.append(node.val).append(\",\");\n queue.add(node.left);\n queue.add(node.right);\n }\n }\n str.setLength(str.length()-1);\n str.append(\"]\");\n return str.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n TreeNode current = root;\n if (current == null) {\n return sb.toString();\n }\n Queue<TreeNode> queue = new LinkedList<>();\n queue.offer(current);\n while (!queue.isEmpty()) {\n current = queue.poll();\n if (current == null) {\n sb.append(\"null\");\n } else {\n sb.append(current.val);\n }\n sb.append(\",\");\n if (current != null) {\n queue.offer(current.left);\n }\n if (current != null) {\n queue.offer(current.right);\n }\n }\n return sb.toString();\n }", "public String printTree() {\n printSideways();\n return \"\";\n }", "public String serialize(TreeNode root) {\n if(root == null){\n return \"\";\n }\n Queue<TreeNode> curList = new LinkedList<TreeNode>();\n Queue<TreeNode> nextList = new LinkedList<TreeNode>();\n StringBuilder sb = new StringBuilder();\n curList.add(root);\n while(curList.size() != 0){\n while(curList.size() != 0){\n \tTreeNode curNode = curList.poll();\n if(curNode == null){\n sb.append(\",null\");\n }\n else{\n \tif(sb.length() != 0)\n \t\tsb.append(',');\n sb.append(String.valueOf(curNode.val));\n nextList.add(curNode.left);\n nextList.add(curNode.right);\n }\n }\n curList = nextList;\n }\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n if(root==null) return \"null\";\n Deque<TreeNode> deque = new LinkedList<>();\n StringBuilder sb = new StringBuilder();\n deque.push(root);\n sb.append(root.val);\n sb.append(',');\n while(!deque.isEmpty()){\n TreeNode current = deque.poll();\n if(current.left!=null){\n deque.addLast(current.left);\n sb.append(current.left.val);\n sb.append(',');\n }\n else sb.append(\"null,\");\n \n if(current.right!=null){\n deque.addLast(current.right);\n sb.append(current.right.val);\n sb.append(',');\n }\n else sb.append(\"null,\");\n }\n \n return sb.toString();\n }", "public void encodeTreeHelper(HuffmanNode node, StringBuilder builder){\n if(node.getLeft() == null && node.getRight()== null && !node.getCharAt().equals(null))\n encodedTable.put(node.getCharAt(),builder.toString());\n else{\n encodeTreeHelper(node.getLeft(), builder.append(\"0\"));\n encodeTreeHelper(node.getRight(), builder.append(\"1\"));\n }\n \n if(builder.length()>0)\n builder.deleteCharAt(builder.length()-1);\n }", "public static String getTreeString(final BinaryNodeInterface<Character> root) {\n String treeString = \"\";\n\n if (root == null) {\n return \"\";\n }\n\n if (root.isLeaf()) {\n treeString = \"L\" + root.getData().toString();\n return treeString;\n }\n\n treeString = \"I\";\n\n if (root.getLeftChild() != null) {\n treeString = treeString + getTreeString(root.getLeftChild());\n }\n if (root.getRightChild() != null) {\n treeString = treeString + getTreeString(root.getRightChild());\n }\n\n return treeString;\n\n }", "public String serialize(Node15 root) {\n\t if(root == null) return \"\";\n\t serializeT(root);\n\t return sb.toString();\n\t }", "public String toString(){\n //return myString(root);\n printInOrder(root);\n return \"\";\n }", "public String serialize(TreeNode root) {\n StringBuilder s = new StringBuilder();\n s.append('[');\n if (root == null) {\n s.append(']');\n return s.toString();\n }\n Queue<TreeNode> q =new LinkedList<>();\n q.add(root);\n boolean now=true,next=false;\n while(!q.isEmpty()){\n int size = q.size();\n while (size-- != 0) {\n TreeNode p = q.poll();\n if (p!=null){\n s.append(p.val+\",\");\n q.add(p.left);\n q.add(p.right);\n if (p.left != null||p.right!=null) {\n next=true;\n }\n } else {\n if (now){\n s.append(\"null,\");\n }\n }\n }\n now=next;\n next=false;\n }\n s.append(\"]\");\n return s.toString();\n }", "public String serialize(TreeNode root) {\n if (root == null) return null;\n\n StringBuilder sb = new StringBuilder();\n serializePreorder(root, sb);\n\n return sb.substring(0, sb.length() - 1);\n }", "private static void serializeHelper(TreeNode root, StringBuilder res){\n if (root == null){\n res.append(\"null,\");\n return;\n }\n res.append(Integer.toString(root.val));\n res.append(\",\");\n serializeHelper(root.left, res);\n serializeHelper(root.right, res);\n }", "public String serialize(Node root) {\n List<String> childString = new ArrayList<>();\n for (Node node : root.children) {\n childString.add(serialize(node));\n }\n return \"(\" + root.val + String.join(\"\", childString) + \")\";\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n \n Queue<TreeNode> q = new LinkedList<>();\n \n q.add(root);\n while(!q.isEmpty()) {\n TreeNode node = q.poll();\n sb.append(node != null ? node.val : \"null\");\n sb.append(\",\");\n \n if (node != null) {\n q.offer(node.left);\n q.offer(node.right);\n }\n }\n sb.deleteCharAt(sb.length() - 1);\n //System.out.println(sb);\n return sb.toString();\n }", "public String serialize(TreeNode root) {\n if (root == null) return \"\";\n Queue<TreeNode> queue = new LinkedList<>();\n queue.offer(root);\n StringBuilder ans = new StringBuilder();\n while (!queue.isEmpty()) {\n int sz = queue.size();\n for (int i = 0; i < sz; ++i) {\n TreeNode cur = queue.poll();\n if (cur == null) ans.append(\"#\").append(\",\");\n else {\n ans.append(cur.val).append(\",\");\n queue.offer(cur.left);\n queue.offer(cur.right);\n }\n }\n }\n return ans.toString();\n }", "private String toTreeString(PhyloTreeNode node) {\n if(node == null) {\n return \"\";\n }\n if(node.isLeaf()) {\n if(node.getParent() != null)\n builderTree.append(node.getLabel() + \":\" + String.format(\"%.5f\", node.getParent().getDistanceToChild()));\n else{\n builderTree.append(node.getLabel() + \":0.0\");\n }\n }\n else{\n builderTree.append(\"(\");\n toTreeString(node.getRightChild());\n builderTree.append(\",\");\n toTreeString(node.getLeftChild());\n builderTree.append(\")\");\n if(node.getParent() != null) {\n builderTree.append(\":\" + String.format(\"%.5f\", node.getParent().getDistanceToChild()));\n }\n }\n return builderTree.toString();\n }", "public String toString() {\n return toString(root) + \" \";//call helper method for in-order traversal representation\n }", "public String serialize(TreeNode root) {\n if(root == null) return \"#\";\n return root.val + \",\" + serialize(root.left) + \",\" + serialize(root.right);\n }", "public String toString(Tree<K, V> t) {\n\t\tString result = \"\", leftString, rightString;\n\n\t\tleftString = left.toString(left);\n\t\trightString = right.toString(right);\n\t\tresult = leftString + (leftString.equals(\"\") ? \"\" : \" \") + key + \"/\"\n\t\t\t\t+ value + (rightString.equals(\"\") ? \"\" : \" \") + right;\n\n\t\treturn result;\n\t}", "public String serialize(TreeNode root) {\r\n // Preorder traversal to build our string.\r\n if (root == null) return \"#\";\r\n String left = serialize(root.left);\r\n String right = serialize(root.right);\r\n return root.val + \",\" + left + \",\" + right;\r\n\r\n }", "public static String printTree(Tree t) {\n\tStringWriter sw = new StringWriter();\n\tPrintWriter pw = new PrintWriter(sw);\n\tTreePrint tp = new TreePrint(\"penn\", \"markHeadNodes\", tlp);\n\ttp.printTree(t, pw);\n\treturn sw.toString();\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n Stack<TreeNode> stack = new Stack<TreeNode>();\n stack.push(root);\n while(!stack.isEmpty()) {\n TreeNode n = stack.pop();\n if(n == null) sb.append(\"#\").append(\",\");\n else {\n sb.append(n.val).append(\",\");\n stack.push(n.right);\n stack.push(n.left);\n }\n }\n sb.deleteCharAt(sb.length()-1);\n return sb.toString();\n }", "private String _toString(IntTreeNode root) {\r\n if (root == null) {\r\n return \"\";\r\n } else {\r\n String leftToString = _toString(root.left);\r\n String rightToString = _toString(root.right);\r\n return leftToString + rightToString + \" \" + root.data;\r\n } \r\n }", "public static String serialize(TreeNode root) {\n StringBuilder temp = new StringBuilder();\n serializeHelper(root, temp);\n return temp.toString().substring(0, temp.length() - 1);\n }", "public TreeNode encode(Node root) {\n if (root == null) return null;\n TreeNode node = new TreeNode(root.val);\n List<Node> children = root.children;\n TreeNode tmp = node;\n if (!children.isEmpty()) {\n for (int i = 0; i < children.size(); i++) {\n if (i == 0) {\n node.left = encode(children.get(0));\n tmp = node.left;\n } else {\n tmp.right = encode(children.get(i));\n tmp = tmp.right;\n }\n }\n }\n return node;\n }", "public String serialize(TreeNode root) {\n StringBuilder sb = new StringBuilder();\n LinkedList<TreeNode> stack = new LinkedList<>();\n stack.push(root);\n while (!stack.isEmpty()) {\n TreeNode now = stack.pop();\n if (null == now) {\n sb.append(\"#,\");\n } else {\n sb.append(now.val).append(\",\");\n stack.push(now.right);\n stack.push(now.left);\n }\n }\n return sb.toString().substring(0, sb.length() - 1);\n }", "public String serialize(TreeNode root) {\r\n\t\tif (root == null)\r\n\t\t\treturn \"null\";\r\n\r\n\t\tStringBuilder ret = new StringBuilder();\r\n\t\tQueue<TreeNodePP> q = new LinkedList<>();\r\n\t\tq.offer(new TreeNodePP(root));\r\n\t\tint qSize = 0;\r\n\r\n\t\twhile (!q.isEmpty()) {\r\n\t\t\tqSize = q.size();\r\n\t\t\tfor (int i = 0; i < qSize; i++) {\r\n\t\t\t\tTreeNodePP pp = q.poll();\r\n\t\t\t\tTreeNode n = pp.n;\r\n\t\t\t\tif (n != null) {\r\n\t\t\t\t\tq.offer(new TreeNodePP(n.left));\r\n\t\t\t\t\tq.offer(new TreeNodePP(n.right));\r\n\t\t\t\t\tret.append(n.val + \",\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tret.append(\"null,\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ans = ret.toString();\r\n\r\n\t\t// remove the last two nulls.\r\n\t\treturn ans.substring(0, ans.length() - 11);\r\n\t}", "public String serialize(TreeNode root) {\n\t\tStringBuilder preorder = new StringBuilder(), inorder = new StringBuilder();\n\t\tinorder(root, inorder);\n\t\tpreorder(root, preorder);\n\t\tStringBuilder serialize = new StringBuilder();\n\t\tserialize.append(preorder);\n\t\tserialize.append(\":\");\n\t\tserialize.append(inorder);\n\t\treturn serialize.toString();\n\t}", "public String serialize(Node root) {\n StringBuilder sb = new StringBuilder();\n serialize_helper(root, sb);\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n traverseNode(sb, \"\", \"\", root, false);\n return sb.toString();\n }", "@Override\n public String toString() { // display subtree in order traversal\n String output = \"[\";\n LinkedList<Node<T>> q = new LinkedList<>();\n q.add(this);\n while(!q.isEmpty()) {\n Node<T> next = q.removeFirst();\n if(next.leftChild != null) q.add(next.leftChild);\n if(next.rightChild != null) q.add(next.rightChild);\n output += next.data.toString();\n if(!q.isEmpty()) output += \", \";\n }\n return output + \"]\";\n }", "private void serialize(TreeNode root, StringBuilder sb) {\r\n\r\n // **** end / base condition ****\r\n if (root == null)\r\n return;\r\n\r\n // **** append node to string builder ****\r\n sb.append(root.val + \" \");\r\n\r\n // **** traverse left subtree ****\r\n serialize(root.left, sb);\r\n\r\n // **** traverse right subtree ****\r\n serialize(root.right, sb);\r\n }", "public String getTree ( ) {\n\n String tree;\n StringWriter s = new StringWriter();\n PrintWriter out = null;\n\n try {\n out = new PrintWriter(s);\n } catch ( Exception ex ) {};\n\n program.printIndividual(param.Parameters.STATE, out);\n\n tree = s.toString();\n String list2[] = tree.split(\"\\n\");\n\n out.close();\n try { s.close(); } catch ( Exception e ) {};\n\n return list2[list2.length - 1];\n\n }", "public String preOrderToString(TreeNode tn){\n \tif (tn==null) return \"\";\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(tn.val);\n \tsb.append(\",\");\n \tif (tn.left==null){\n \t\tsb.append(\"#,\");\n \t}else{\n \t\tsb.append(preOrderToString(tn.left));\n \t}\n \tif (tn.right==null){\n \t\tsb.append(\"#,\");\n \t}else{\n \t\tsb.append(preOrderToString(tn.right));\n \t}\n \treturn sb.toString();\n }", "public String toString() {\n if (root == null) {\n return (treeName + \" Empty tree\\n\");\n } else {\n String space = \"\";\n return treeName + \"\\n\" + toStringRecur(root.right, space) + \"\\n\" + root.element +\n \"[No Parent so sad]\" + toStringRecur(root.left, space) + \"\\n\";\n }\n }", "public void testToString() {\r\n tree.insert(\"act\");\r\n tree.insert(\"apple\");\r\n tree.insert(\"bagel\");\r\n\r\n assertEquals(\"(act, apple, bagel)\", tree.toString());\r\n Lab14BinarySearchTree<String> tree2 =\r\n new Lab14BinarySearchTree<String>();\r\n assertEquals(\"()\", tree2.toString());\r\n }", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tpreOrderTraverse(expression.root, 1, sb);\n\t\t\treturn sb.toString();\n\t\t}", "public void writeTree(String path) {\n this.sb = new StringBuilder();\n writeTreeRec(this._root);\n\n try (PrintWriter out = new PrintWriter(path)){\n out.println(sb.toString());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void getDecodedMessage(String encoding){\n\n String output = \"\";\n Node temp = this.root;\n for(int i = 0;i<encoding.length();i++){\n\n if(encoding.charAt(i) == '0'){\n temp = temp.left;\n\n if(temp.left == null && temp.right == null){\n System.out.print(temp.getData());\n temp = this.root;\n }\n }\n else\n {\n temp = temp.right;\n if(temp.left == null && temp.right == null){\n System.out.print(temp.getData());\n temp = this.root; \n }\n\n }\n }\n }", "private String traverseForToString() {\n\t\tif (this.root != null)\n\t\t\tpreorderTraverseForToString(this.root);\n\n\t\treturn this.order;\n\t}", "public void printCode(PrintStream out, String code, BinaryTree<HuffData> tree) {\n HuffData theData = tree.getData(); //Get the data of the tree\n if (theData.symbol != null) { //If the data's symbol is not null (as in a symbol and not a sum)\n if(theData.symbol.equals(\" \")) { //If the symbol is a space print out \"space: \"\n out.println(\"space: \" + code);\n } else { //Otherwise print out the symbol and the code\n out.println(theData.symbol + \" \" + code);\n //Then add the symbol and code to the EncodeData table\n this.encodings[encodingsTop++] = new EncodeData(code, theData.symbol);\n }\n } else {\n //If the data's symbol is null, that means it is a sum node\n //and so it needs to go farther down the tree\n \n //Go down the left tree and add a 0\n printCode(out, code + \"0\", tree.getLeftSubtree());\n //Go down the right tree and add a 1\n printCode(out, code + \"1\", tree.getRightSubtree());\n }\n }", "@Override\n public String toString() {\n StringBuilder outString = new StringBuilder();\n int currentTreeIndex = this.indexCorrespondingToTheFirstElement;\n if (treeSize > 0) {\n while (currentTreeIndex != -1) {\n Node<T> currentNode = getHelper(currentTreeIndex);\n outString.append(currentNode.data).append(\", \");\n currentTreeIndex = currentNode.nextIndex;\n }\n }\n\n if (outString.length() != 0) {\n outString.deleteCharAt(outString.length() - 1); // \", \"\n outString.deleteCharAt(outString.length() - 1);\n }\n return \"[\" + outString.toString() + \"]\";\n }" ]
[ "0.79797685", "0.7266544", "0.6766947", "0.67098355", "0.65929043", "0.6520053", "0.651422", "0.6502086", "0.6480438", "0.6466228", "0.6452631", "0.6446793", "0.6446198", "0.64218706", "0.6407569", "0.64030504", "0.64030504", "0.64030504", "0.6394578", "0.6385417", "0.6381468", "0.63735145", "0.6369932", "0.636884", "0.6354713", "0.635004", "0.6341996", "0.63252956", "0.6320339", "0.6310683", "0.63047385", "0.6293301", "0.62849295", "0.6284787", "0.6258395", "0.62459517", "0.6234277", "0.6215959", "0.6201105", "0.6189887", "0.618641", "0.61788976", "0.61625683", "0.6157522", "0.61480963", "0.6142877", "0.6130256", "0.6123191", "0.6120755", "0.61178523", "0.6117542", "0.6097112", "0.60458636", "0.604062", "0.60347533", "0.6030559", "0.60221565", "0.5992314", "0.59820646", "0.5971955", "0.59686804", "0.59669226", "0.59489965", "0.59384716", "0.59372765", "0.59284425", "0.592408", "0.5918216", "0.589485", "0.5886111", "0.5884969", "0.5880159", "0.58759373", "0.587404", "0.5872872", "0.58665675", "0.586645", "0.5835777", "0.582354", "0.58163106", "0.58071697", "0.57734656", "0.5771894", "0.57675743", "0.5759923", "0.5754951", "0.57327545", "0.56898916", "0.5654589", "0.56353855", "0.5627884", "0.5606264", "0.55901295", "0.5561329", "0.5547123", "0.552698", "0.54959106", "0.548813", "0.5484927", "0.5480989" ]
0.58973026
68
Decodes your encoded data to tree.
public TreeNode deserialize(String data) { if (data == null || data.equals("[]") || data.length() <= 2) { return null; } String[] strArray = data.substring(1, data.length() - 1).split(","); Queue<String> list = new LinkedList<>(); list.addAll(Arrays.asList(strArray)); Queue<TreeNode> queue = new LinkedList<>(); TreeNode root = new TreeNode(Integer.valueOf(list.poll())); queue.offer(root); while (!queue.isEmpty()) { TreeNode node = queue.poll(); String leftVal = list.poll(); if (leftVal == null || leftVal.equals("null")) { node.left = null; } else { TreeNode leftNode = new TreeNode(Integer.valueOf(leftVal)); node.left = leftNode; queue.offer(leftNode); } String rightVal = list.poll(); if (rightVal == null || rightVal.equals("null")) { node.right = null; } else { TreeNode rightNode = new TreeNode(Integer.valueOf(rightVal)); node.right = rightNode; queue.offer(rightNode); } } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeNode deserialize(String data) {\n byte[] bytes = Base64.getDecoder().decode(data);\n IntBuffer intBuf = ByteBuffer.wrap(bytes)\n .order(ByteOrder.BIG_ENDIAN).asIntBuffer();\n int[] nums = new int[intBuf.remaining()];\n intBuf.get(nums);\n //for (int i = 0; i<nums.length;++i) System.out.print(nums[i]);\n return deserialize(new DataIterator(nums), false, 0);\n }", "public TreeNode deserialize(String data) {\n return null;\n }", "public TreeNode deserialize(String data) {\n return deserialize(data, new int[]{0});\n }", "public TreeNode deserialize(String data) {\n return preOrderFromString(data);\n }", "public TreeNode deserialize(StringBuilder data) {\r\n //分成两组\r\n \tHashMap<Integer,Integer> showMapAct = new HashMap<>();\r\n \tStringBuilder[] result = data.split(\"k\");\r\n \t//deal with showMapAct\r\n \tif(result.length==1 || result[1].length()==0){\r\n \t}\r\n \telse{\r\n \t\tStringBuilder[] extraInfo = result[1].split(\",\");\r\n \t\tfor(int i = 0; i < extraInfo.length;i++){\r\n \t\t\tStringBuilder[] temp = extraInfo[i].split(\":\");\r\n \t\t\tshowMapAct.put(Integer.valueOf(temp[0]),Integer.valueOf(temp[1]));\r\n \t\t}///////\r\n \t}\r\n \tStringBuilder[] nums = result[0].split(\",\");\r\n \tint[] preOrder = new int[nums.length/2];\r\n \tint[] inOrder = new int[nums.length/2];\r\n \tinitArray(preOrder,nums,0,nums.length/2);\r\n \tinitArray(inOrder,nums,nums.length/2,nums.length);\r\n \treturn constructTree(preOrder,0,preOrder.length,inOrder,0,inOrder.length,showMapAct);\r\n }", "public TreeNode deserialize(String data) {\n int[] ptr = { 0 };\n return parse(data, ptr);\n }", "public TreeNode deserialize(String data) {\n if (data.length() == 0) {\n return null;\n }\n return deserialize(data.toCharArray(), new int[] { 0 });\n }", "public TreeNode deserialize(String data) {\n return build(new Scanner(data));\n }", "public Node decode(TreeNode root) {\n if (root == null) return null;\n\n Node newNodeRoot = new Node(root.val, new ArrayList<>());\n\n // Decoding all the children nodes\n TreeNode sibling = root.left;\n while (sibling != null) {\n newNodeRoot.children.add(decode(sibling));\n sibling = sibling.right;\n }\n\n return newNodeRoot;\n }", "public Node decode(TreeNode root) {\n\t\t\tif (root == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn new Node(root.val, de(root.left));\n\t\t}", "public Node decode(TreeNode root) {\n if (root == null) {\n return null;\n }\n return new Node(root.val, de(root.left));\n }", "private RealDecisionTree deserialize(byte[] bytes){\n try {\n ObjectInputStream stream = new ObjectInputStream(new ByteArrayInputStream(bytes));\n RealDecisionTree tree = (RealDecisionTree)stream.readObject();\n return tree;\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public TreeNode deserialize(String data) {\n if (data == null) return null;\n String[] nodes = data.split(separator);\n Queue<String> q = new LinkedList<>();\n for (String n : nodes) {\n q.offer(n);\n }\n return helper(q);\n }", "public TreeNode deserialize(String data) {\n Queue<String> queue = new LinkedList<>(Arrays.asList(data.split(SP)));\n return buildTree(queue);\n }", "public TreeNode deserialize(String data) {\n if (data.length() == 0) return null;\n String[] node = data.split(\" \");\n int n = node.length;\n Deque<TreeNode> stack = new LinkedList<>();\n TreeNode root = new TreeNode(Integer.parseInt(node[0]));\n TreeNode x = root;\n stack.push(x);\n\n int i = 1;\n while (i < n) {\n while (i < n && !node[i].equals(\"null\")) {\n x.left = new TreeNode(Integer.parseInt(node[i++]));\n x = x.left;\n stack.push(x);\n }\n while (i < n && node[i].equals(\"null\")) {\n x = stack.pop();\n i++;\n }\n if (i < n) {\n x.right = new TreeNode(Integer.parseInt(node[i++]));\n x = x.right;\n stack.push(x);\n }\n }\n return root;\n }", "public TreeNode deserialize(String data) {\n \n Queue<String> q = new LinkedList<>(Arrays.asList(data.split(\" \")));\n return helper(q);\n }", "public TreeNode deserialize(String data) {\n String[] nodes=data.substring(1,data.length()-1).split(\",\");\n TreeNode root=reverseTreeNode(nodes[0]);\n Queue<TreeNode> parents=new LinkedList<>();\n TreeNode parent=root;\n boolean isLeft=true;\n for(int i=1;i<nodes.length;i++){\n TreeNode cur=reverseTreeNode(nodes[i]);\n if(isLeft){\n parent.left=cur;\n }else{\n parent.right=cur;\n }\n if(cur!=null){\n parents.add(cur);\n }\n isLeft=!isLeft;\n if(isLeft){\n parent=parents.poll();\n }\n }\n return root;\n }", "public void decode(String name) {\n\t\tByteWriter bw = new ByteWriter(name + \"-restored\");\n\n\t\t/*\n\t\t * Read bytes until none are left.\n\t\t */\n\t\twhile (!data.eof()) {\n\t\t\tBST node = tree;\n\t\t\tString decoded = \"\";\n\t\t\tclear();\n\n\t\t\twhile (decoded.equals(\"\")) {\n\t\t\t\tgrabBits(1);\n\n\t\t\t\t/*\n\t\t\t\t * Follow the bits read from file through the Huffman tree\n\t\t\t\t * until a leaf is found. Once found, convert the code back\n\t\t\t\t * to the original bitstring.\n\t\t\t\t */\n\t\t\t\tnode = (proc.equals(\"0\")) ? node.getLeft() : node.getRight();\n\n\t\t\t\tif (node.getRight() == null && node.getLeft() == null) {\n\t\t\t\t\tdecoded = node.getData().getBitstring();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* \n\t\t\t * If EOF byte is found, quit writing to file.\n\t\t\t */\n\t\t\tif (decoded.equals(\"0000\")) {\n\t\t\t\tSystem.out.println(\"Found the null byte!\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//Write translated H. code to target as byte\n\t\t\tbw.writeByte(decoded);\n\t\t}\n\t\tbw.close();\n\t}", "public TreeNode deserialize(String data) {\r\n // We use a queue because we can deserialse in the same way we serialised (preorder)\r\n Queue<String> dserialised = new LinkedList<>();\r\n dserialised.addAll(Arrays.asList(data.split(\",\")));\r\n return helper(dserialised);\r\n }", "public TreeNode deserialize(String data) {\n\t\tString[] orders = data.split(\":\");\n\t\tString[] preorderString = orders[0].split(\",\");\n\t\tString[] inorderString = orders[1].split(\",\");\n\n\t\tint[] preorder = new int[preorderString.length], inorder = new int[inorderString.length];\n\t\tfor (int i = 0; i < preorderString.length; i++) {\n\t\t\tpreorder[i] = Integer.parseInt(preorderString[i]);\n\t\t\tinorder[i] = Integer.parseInt(inorderString[i]);\n\t\t}\n\t\treturn buildTree(preorder, inorder, 0, preorder.length - 1, 0, inorder.length - 1);\n\t}", "public Node decode(TreeNode root) {\n if (root == null) {\n return null;\n }\n Node result = new Node(root.val, new ArrayList<>());\n TreeNode cur = root.left;\n while (cur != null) {\n result.children.add(decode(cur));\n cur = cur.right;\n }\n return result;\n }", "public TreeNode deserialize(String data) {\n // write your code here\n Queue<String> queue = new LinkedList<>();\n queue.addAll(Arrays.asList(data.split(splitter)));\n return deserializeHelper(queue);\n }", "public TreeNode deserialize(String data) {\n if (data.length() == 0) return null;\n String[] node = data.split(\" \");\n Queue<TreeNode> qu = new LinkedList<>();\n TreeNode root = new TreeNode(Integer.parseInt(node[0]));\n qu.offer(root);\n int i = 1;\n while (!qu.isEmpty()) {\n Queue<TreeNode> nextQu = new LinkedList<>();\n while (!qu.isEmpty()) {\n TreeNode x = qu.poll();\n if (node[i].equals(\"null\")) x.left = null;\n else {\n x.left = new TreeNode(Integer.parseInt(node[i]));\n nextQu.offer(x.left);\n }\n i++;\n if (node[i].equals(\"null\")) x.right = null;\n else {\n x.right = new TreeNode(Integer.parseInt(node[i]));\n nextQu.offer(x.right);\n }\n i++;\n }\n qu = nextQu;\n }\n return root;\n }", "public TreeNode deserialize(String data) {\n Deque<String> nodes = new LinkedList<>();\n nodes.addAll(Arrays.asList(data.substring(1, data.length() - 1).split(SPLITER)));\n \n return build_tree(nodes);\n }", "private static void decode() throws IOException{\n File file = new File(_encodedBinFile);\n String longStringAsFile;\n \n //DataInputStream dis;\n FileWriter w;\n try {\n //dis = new DataInputStream(new FileInputStream(file));\n longStringAsFile = getLongStringAsFile();\n //dis.close();\n w = new FileWriter(\"decoded.txt\");\n Node traverser = root;\n for(int i=0; i < longStringAsFile.length(); i++){\n if(longStringAsFile.charAt(i) == '0'){\n //go to left\n if (traverser.getLeftPtr() == null){\n //fallen off the tree. Print to file\n if (i == longStringAsFile.length() - 1 ){\n w.write(((LeafNode)traverser).getData());\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getLeftPtr();\n }\n }\n else{\n traverser = traverser.getLeftPtr();\n }\n }\n else{\n //go to right of tree\n if (traverser.getRightPtr() == null){\n //fallen off the tree. PRint to file\n if (i == longStringAsFile.length() - 1){\n w.write(((LeafNode)traverser).getData() );\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getRightPtr();\n }\n\n }\n else{\n traverser = traverser.getRightPtr();\n }\n }\n \n }\n //dis.close();\n w.close();\n } catch (IOException ex) {\n Logger.getLogger(decoder.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public TreeNode deserialize(String data) {\r\n Deque<String> nodes = new LinkedList<>();\r\n nodes.addAll(Arrays.asList(data.split(spliter)));\r\n return buildTree(nodes);\r\n }", "public TreeNode deserialize(String data) {\n // write your code here\n ArrayList<TreeNode> queue = new ArrayList<TreeNode>();\n boolean isLeftPosition = true;\n String[] stringArray = data.substring(1, data.length() - 1).split(\",\");\n if(data.equals(\"{}\")){\n \treturn null;\n }\n TreeNode root = new TreeNode(Integer.parseInt(stringArray[0]));\n queue.add(root);\n int index = 0;\n for(int i = 1; i < stringArray.length; i++){\n \tif(!stringArray[i].equals(\"#\")){\n \t\tTreeNode node = new TreeNode(Integer.parseInt(stringArray[i]));\n \t\tSystem.out.print((new TreeNode(Integer.parseInt(stringArray[i])).equals(new TreeNode(Integer.parseInt(stringArray[i])))));\n \t\tif (isLeftPosition){\n \t\t queue.get(index).left = new TreeNode(Integer.parseInt(stringArray[i]));\n \t\t}\n \t\telse {\n \t\t queue.get(index).right = new TreeNode(Integer.parseInt(stringArray[i]));\n \t\t}\n \t\tqueue.add(new TreeNode(Integer.parseInt(stringArray[i])));\n \t}\n \tif(!isLeftPosition) index++;\n \tisLeftPosition = !isLeftPosition;\n }\n return root;\n }", "public TreeNode deserialize(String data) {\n if(data.charAt(start)=='#'){\n start++;\n return null;\n }\n int end=start;\n while(end==data.length() || data.charAt(end)!='|'){\n end++;\n }\n String num=data.substring(start,end);\n TreeNode node=new TreeNode(Integer.valueOf(num));\n start=end;\n start++; node.left=deserialize(data);\n start++;node.right=deserialize(data);\n return node;\n }", "public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tchar[] encodedArray = encoded.toCharArray();\n\n\t\tString decoded = \"\";\n\n\t\tLeaf current = root;\n\n\t\tfor(char c : encodedArray) {\n\n\t\t\tif (c == '0' && current.left != null) {\n\t\t\t\tcurrent = current.left;\n\t\t\t}\n\t\t\telse if(c == '1' && current.right != null){\n\t\t\t\tcurrent = current.right;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tchar letter = current.character;\n\t\t\t\tdecoded = decoded + letter;\n\t\t\t\tcurrent = root;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(textArray);\n\t\tSystem.out.println(decoded);\n\n\t\treturn decoded;\n\t}", "public TreeNode deserialize(String data) {\n LinkedList<String> linkedList = new LinkedList<>(Arrays.asList(data.split(\",\")));\n return buildTree(linkedList);\n }", "public TreeNode deserialize(String data) {\n if (data == null) return null;\n LinkedList<String> queue = new LinkedList<>(Arrays.asList(data.split(\",\")));\n return deserialize(queue);\n }", "public TreeNode deserialize(String data) {\n if (data.length() == 0) return null;\n String[] vals = data.split(\"\\\\,\");\n Queue<TreeNode> queue = new LinkedList<>();\n TreeNode root = new TreeNode(Integer.valueOf(vals[0]));\n queue.offer(root);\n for (int i = 1; i < vals.length; ++i) {\n TreeNode cur = queue.poll();\n if (!vals[i].equals(\"#\")) {\n cur.left = new TreeNode(Integer.valueOf(vals[i]));\n queue.offer(cur.left);\n } \n if (!vals[++i].equals(\"#\")) {\n cur.right = new TreeNode(Integer.valueOf(vals[i]));\n queue.offer(cur.right);\n }\n }\n return root;\n }", "public TreeNode deserialize(String data) {\n String[] token = data.split(\",\");\n int index = 0;\n Queue<TreeNode> q = new LinkedList<>();\n TreeNode root = convertTreeNode(token[index++]);\n q.add(root);\n \n while(!q.isEmpty()) {\n TreeNode node = q.poll();\n if (node == null) {\n continue;\n }\n node.left = convertTreeNode(token[index++]);\n node.right = convertTreeNode(token[index++]);\n q.offer(node.left);\n q.offer(node.right);\n }\n \n return root;\n }", "public TreeNode deserialize(String data) {\n if (data==null || data.length()==0){\n return null;\n }\n Node n = deSerRec(data.split(\",\"),0);;\n return n.node;\n }", "public TreeNode deserialize(String data) {\n \n \tif(!data.contains(\"(\") && !data.contains(\")\")) {\n \t\tif(data.length() == 0) {\n \t\t\treturn null;\n \t\t}else {\n \t\t\treturn new TreeNode(Integer.valueOf(data));\n \t\t}\n \t}\n \tint count = 0;\n \tint index = 0;\n \tint start = 0;\n \twhile(index < data.length()) {\n \t\tif(data.charAt(index) == '(') {\n \t\t\tcount ++;\n \t\t}\n \t\tif(data.charAt(index) == ')') {\n \t\t\tcount --;\n \t\t}\n \t\tif(count == 0) {\n \t\t\tstart = index;\n \t\t\tbreak;\n \t\t}\n \t\tindex ++;\n \t}\n \tstart ++;\n \tint temp = start + 1;\n \twhile(temp < data.length()) {\n \t\tif(data.charAt(temp) == ')') {\n \t\t\tbreak;\n \t\t}\n \t\ttemp ++;\n \t}\n \tTreeNode root = new TreeNode(Integer.valueOf(data.substring(start + 1, temp)));\n \troot.left = deserialize(data.substring(1, start - 1));\n \troot.right = deserialize(data.substring(temp + 2, data.length() - 1));\n \treturn root;\n \t\n }", "public TreeNode deserialize(String data) {\r\n\r\n\t\tQueue<TreeNode> q = new LinkedList<>();\r\n\t\tint[] start = new int[1];\r\n\t\tint qSize = 0;\r\n\t\tTreeNode head = read(data, start);\r\n\t\tif (head == null)\r\n\t\t\treturn head;\r\n\t\tq.offer(head);\r\n\r\n\t\twhile (!q.isEmpty()) {\r\n\t\t\tqSize = q.size();\r\n\r\n\t\t\tfor (int i = 0; i < qSize; i++) {\r\n\t\t\t\tTreeNode n = q.poll();\r\n\t\t\t\tif (start[0] >= data.length()) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tn.left = read(data, start);\r\n\r\n\t\t\t\tn.right = read(data, start);\r\n\t\t\t\tif (n.left != null) {\r\n\t\t\t\t\tq.offer(n.left);\r\n\t\t\t\t}\r\n\t\t\t\tif (n.right != null) {\r\n\t\t\t\t\tq.offer(n.right);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn head;\r\n\t}", "public TreeNode deserialize(String data) {\n if (\"\".equals(data)) return null;\n String dataArray[] = data.split(NODE_SEPERATOR);\n TreeNode root = new TreeNode(Integer.valueOf(dataArray[0]));\n Queue<TreeNode> q = new LinkedList<>();\n q.offer(root);\n int dataIndex = 1;\n while (!q.isEmpty()) {\n TreeNode parent = q.poll();\n if (!dataArray[dataIndex].equals(EMPTY_NODE_INDICATOR)) {\n TreeNode left = new TreeNode(Integer.valueOf(dataArray[dataIndex]));\n parent.left = left;\n q.offer(left);\n }\n dataIndex++;\n if (!dataArray[dataIndex].equals(EMPTY_NODE_INDICATOR)) {\n TreeNode right = new TreeNode(Integer.valueOf(dataArray[dataIndex]));\n parent.right = right;\n q.offer(right);\n }\n dataIndex++;\n }\n return root;\n }", "public TreeNode deserialize(String data) {\n String[] dchar = data.split(\",\");\n return deserialize(dchar, new Index(0));\n }", "public TreeNode deserialize(String data) {\r\n String[] ar = data.split(\":\");\r\n\r\n LinkedList<String> list = new LinkedList<>(Arrays.asList(ar));\r\n\r\n return doDeSerialize(list);\r\n }", "public static TreeNode deserialize(String data) {\n String[] split = data.split(\"-\");\n if (split[0].length() == 2 && split[1].length() == 2) {\n return null;\n }\n split[0] = split[0].replace('[', ' ').replace(']', ' ').trim();\n split[1] = split[1].replace('[', ' ').replace(']', ' ').trim();\n String[] split1 = split[0].split(\",\");\n String[] split2 = split[1].split(\",\");\n int[] pre = new int[split1.length];\n int[] inor = new int[split2.length];\n for (int i = 0; i < pre.length; i++) {\n pre[i] = Integer.parseInt(split1[i].trim());\n }\n for (int i = 0; i < inor.length; i++) {\n inor[i] = Integer.parseInt(split2[i].trim());\n }\n return buildTree(pre, inor);\n }", "public TreeNode deserialize(String data) {\n if (data == \"\") return null; \n \n String[] strs = data.split(\" \");\n Queue<TreeNode> q = new LinkedList<>();\n TreeNode root = new TreeNode(Integer.parseInt(strs[0]));\n q.offer(root);\n \n for (int i = 1; i < strs.length; i++) {\n TreeNode cur = q.poll(); // cannot use root, since we need return root at the end\n if (!strs[i].equals(\"null\")) { // use equals, not ==\n cur.left = new TreeNode(Integer.parseInt(strs[i]));\n q.offer(cur.left);\n }\n \n if (!strs[++i].equals(\"null\")) { // use equals, not ==\n cur.right = new TreeNode(Integer.parseInt(strs[i]));\n q.offer(cur.right);\n }\n }\n \n return root;\n }", "public TreeNode deserialize(String tree) {\r\n\r\n // **** sanity check ****\r\n if (tree.isEmpty())\r\n return null;\r\n\r\n // **** populate the queue with the serialized data ****\r\n Queue<String> q = new LinkedList<>(Arrays.asList(tree.split(\" \")));\r\n\r\n // **** deserialize the BST ****\r\n return deserialize(q, Integer.MIN_VALUE, Integer.MAX_VALUE);\r\n }", "public TreeNode deserialize(String data) {\n start = 0;\n TreeNode root = build(data.split(\",\",-1));\n return root;\n }", "public TreeNode deserialize(String data) {\n// String[] nodes = data.split(\",\");\n Deque<String> nodes = new LinkedList<>(Arrays.asList(data.split(\",\")));\n return build(nodes);\n }", "public TreeNode deserialize(String data) {\r\n if (\"n\".equals(data)) {\r\n return null;\r\n }\r\n\r\n final String[] nodes = data.split(\", \");\r\n int i = 0;\r\n final TreeNode root = new TreeNode(Integer.parseInt(nodes[i]));\r\n final Queue<TreeNode> queue = new ArrayDeque<>();\r\n queue.add(root);\r\n i++;\r\n while (!queue.isEmpty()) {\r\n final TreeNode node = queue.poll();\r\n\r\n if (!\"n\".equals(nodes[i])) {\r\n node.left = new TreeNode(Integer.parseInt(nodes[i]));\r\n queue.add(node.left);\r\n } else {\r\n node.left = null;\r\n }\r\n i++;\r\n\r\n\r\n if (!\"n\".equals(nodes[i])) {\r\n node.right = new TreeNode(Integer.parseInt(nodes[i]));\r\n queue.add(node.right);\r\n } else {\r\n node.right = null;\r\n }\r\n i++;\r\n }\r\n\r\n return root;\r\n }", "public CodeTree toCodeTree() {\n List<Node> nodes = new ArrayList<Node>();\n for (int i = max(codeLengths); i >= 0; i--) { // Descend through code lengths\n List<Node> newNodes = new ArrayList<Node>();\n\n // Add leaves for symbols with positive code length i\n if (i > 0) {\n for (int j = 0; j < codeLengths.length; j++) {\n if (codeLengths[j] == i)\n newNodes.add(new Leaf(j)); //Isidedame ASCII reiksmes ilgiausio kodo\n }\n }\n\n // Merge pairs of nodes from the previous deeper layer\n for (int j = 0; j < nodes.size(); j += 2) {\n newNodes.add(new InternalNode(nodes.get(j), nodes.get(j + 1))); //Sujungia lapus i InternalNodes\n }\n nodes = newNodes;\n }\n return new CodeTree((InternalNode)nodes.get(0), codeLengths.length);\n }", "public TreeNode deserialize(String data) {\n String[] vals = data.split(\"\\\\,\");\n Queue<String> queue = new LinkedList<>();\n queue.addAll(Arrays.asList(vals));\n return deserialize(queue);\n }", "public TreeNode deserialize(String data) {\n if (data == \"\") {\n return null;\n }\n String[] dataSplit = data.split(\",\");\n Queue<String> nodes = new ArrayDeque<String>(Arrays.asList(dataSplit));\n Queue<TreeNode> queue = new LinkedList<>();\n TreeNode root = new TreeNode(Integer.parseInt(nodes.poll()));\n queue.offer(root);\n while (!queue.isEmpty()) {\n TreeNode curNode = queue.poll();\n String left = nodes.poll(), right = nodes.poll();\n if (!left.equals(\"X\")) {\n curNode.left = new TreeNode(Integer.parseInt(left));\n queue.offer(curNode.left);\n }\n if (!right.equals(\"X\")) {\n curNode.right = new TreeNode(Integer.parseInt(right));\n queue.offer(curNode.right);\n }\n }\n return root;\n }", "public Node deserialize(String data) {\n String subData = data.substring(1, data.length() - 1);\n if (subData.indexOf(\"(\") == -1) {\n return new Node(Integer.parseInt(subData));\n }\n System.out.println(\"the data \" + subData);\n String val = subData.substring(0, subData.indexOf(\"(\"));\n\n List<String> childData = new ArrayList<>();\n subData = subData.substring(subData.indexOf(\"(\"));\n int cnt = 0;\n int lstIndex = 0;\n for (int i = subData.indexOf('('); i < subData.length(); i++) {\n if (subData.charAt(i) == '(') {\n cnt += 1;\n } else if (subData.charAt(i) == ')') {\n cnt -= 1;\n }\n\n if (cnt == 0) {\n childData.add(subData.substring(lstIndex, i + 1));\n lstIndex = i + 1;\n }\n }\n System.out.println(childData);\n\n Node root = new Node();\n root.val = Integer.parseInt(val);\n for (int i = 0; i < childData.size(); i++) {\n root.children.add(deserialize(childData.get(i)));\n }\n return root;\n }", "@Test\r\n public void testDeserialize() {\r\n System.out.println(\"deserialize\");\r\n String data = \"1,#,2\";\r\n BinaryTreeSerialization instance = new BinaryTreeSerialization();\r\n TreeNode expResult = null;\r\n TreeNode result = instance.deserialize(data);\r\n String s = instance.serialize(result);\r\n result = instance.deserialize(s);\r\n assertEquals(expResult, result);\r\n }", "public TreeNode deserialize(String data) {\n //LinkedList doesnot have the constructor form array\n LinkedList<String> l = new LinkedList<>();\n //LinkedList.addAll doesnot support array, need to use Arrays.asList\n //String.split(String regex, int limit) when limit<0, return the most part of splits as possibile, delete the empty items\n l.addAll(Arrays.asList(data.split(\",\",-1)));\n TreeNode root = build(l);\n return root;\n }", "public TreeNode deserialize(String data) {\n String[] strings = data.split(\",\");\n LinkedList<String> stack = new LinkedList<>();\n for (String s : strings) {\n stack.add(s);\n }\n return deserialize(stack);\n }", "public TreeNode deserialize1(String tree) {\r\n \r\n // **** sanity checks ****\r\n if (tree.isEmpty())\r\n return null;\r\n\r\n // **** split the tree string ****\r\n String[] strs = tree.split(\" \");\r\n\r\n // **** deserialise BST ****\r\n return deserialize1(strs, 0, strs.length - 1);\r\n }", "public TreeNode deserialize(String data) {\n if(data.charAt(0)=='n') return null;\n String[] array = data.split(\",\");\n TreeNode[] nodes = new TreeNode[array.length];\n for(int i = 0; i < nodes.length; i++){\n if(array[i].equals(\"null\")) nodes[i] = null;\n else nodes[i] = new TreeNode(Integer.valueOf(array[i]));\n }\n int index = 0;\n Deque<TreeNode> deque = new LinkedList<>();\n deque.addLast(nodes[index++]);\n //level-first recover\n while(!deque.isEmpty() && index<nodes.length){\n TreeNode current = deque.pollFirst();\n if(current==null) continue;\n current.left = nodes[index++];\n current.right = nodes[index++];\n deque.addLast(current.left);\n deque.addLast(current.right);\n }\n \n return nodes[0];\n }", "public void getDecodedMessage(String encoding){\n\n String output = \"\";\n Node temp = this.root;\n for(int i = 0;i<encoding.length();i++){\n\n if(encoding.charAt(i) == '0'){\n temp = temp.left;\n\n if(temp.left == null && temp.right == null){\n System.out.print(temp.getData());\n temp = this.root;\n }\n }\n else\n {\n temp = temp.right;\n if(temp.left == null && temp.right == null){\n System.out.print(temp.getData());\n temp = this.root; \n }\n\n }\n }\n }", "public TreeNode deserialize(String data) {\n ArrayList<Integer> res = new ArrayList<Integer>();\n data=data.substring(1,data.length()-1);\n System.out.println(data);\n if(data.length()==0) return null;\n String[] datas=data.split(\",\");\n if (datas.length%2==0) {\n data=data.concat(\",null\");\n System.out.println(data);\n datas=data.split(\",\");\n }\n TreeNode[] nodes=new TreeNode[datas.length];\n nodes[0]=new TreeNode(Integer.parseInt(datas[0]));\n int p=0;\n for (int i=1;i<datas.length;i+=2){\n System.out.println(datas[i]);\n System.out.println(datas[i+1]);\n nodes[i]=datas[i].equals(\"null\")?null:new TreeNode(Integer.parseInt(datas[i]));\n nodes[i+1]=datas[i+1].equals(\"null\")?null:new TreeNode(Integer.parseInt(datas[i+1]));\n nodes[p].left=nodes[i];\n nodes[p].right=nodes[i+1];\n p++;\n while(nodes[p]==null) p++;\n }\n return nodes[0];\n // res=new ArrayList<Integer>(Arrays.asList(data.split(\",\")));\n }", "public TreeNode deserialize(String data) {\n if (data == null || data.isEmpty()) {\n return null;\n }\n String[] nodesStr = data.split(\",\");\n TreeNode[] nodes = new TreeNode[nodesStr.length];\n for (int i = 0; i < nodes.length; i++) {\n nodes[i] = \"null\".equals(nodesStr[i]) ? null : new TreeNode(Integer.parseInt(nodesStr[i]));\n }\n int index = 1;\n for (int i = 0; i < nodes.length; i++) {\n if (nodes[i] != null) {\n nodes[i].left = nodes[index++];\n nodes[i].right = nodes[index++];\n }\n }\n return nodes[0];\n }", "public TreeNode deserialize(String data) {\n String[] arr = data.split(\",\");\n Queue<String> queue = new LinkedList<>(Arrays.asList(arr));\n return deserialize(queue);\n }", "void decodeObject();", "public TreeNode deserialize(String data) {\n String[] strs = data.split(\",\");\n LinkedList<String> list = new LinkedList<>();\n for(String s:strs){\n list.add(s);\n }\n return deserialize(list);\n }", "public TreeNode deserialize(String data) {\n if (data == null || data.length() == 0) return null;\n Queue<TreeNode> queue = new LinkedList<>();\n String[] nodes = data.split(\",\");\n TreeNode root = new TreeNode(Integer.parseInt(nodes[0]));\n queue.offer(root);\n for (int i = 1; i < nodes.length; i += 2) {\n TreeNode cur = queue.poll();\n if (!nodes[i].equals(\"null\")) {\n TreeNode left = new TreeNode(Integer.parseInt(nodes[i]));\n cur.left = left;\n queue.offer(left);\n }\n if (!nodes[i+1].equals(\"null\")) {\n TreeNode right = new TreeNode(Integer.parseInt(nodes[i+1]));\n cur.right = right;\n queue.offer(right);\n }\n }\n return root;\n }", "public TreeNode deserialize(String data) {\n //1,2,3,null,null,4,5\n // 0 1 2 3 4 5 6 7\n // 1, 2, null, 3, null, 4, null, 5\n\n if (data == null || data.length() ==0)\n return null;\n\n StringTokenizer st = new StringTokenizer(data, \",\");\n String[] nodes = new String[st.countTokens()];\n int index =0;\n while (st.hasMoreTokens()) {\n nodes[index++] = st.nextToken();\n }\n\n TreeNode root = new TreeNode(Integer.parseInt(nodes[0]));\n Queue<TreeNode> nodeQueue = new LinkedBlockingQueue<TreeNode>();\n Queue<Integer> indexQueue = new LinkedBlockingQueue<Integer>();\n int currentIndex = 0;\n\n indexQueue.offer(currentIndex);\n nodeQueue.offer(root);\n\n while (!nodeQueue.isEmpty()) {\n\n TreeNode node = nodeQueue.poll();\n int nodeIndex = indexQueue.poll();\n int leftChild = 2 * nodeIndex + 1;\n int rightChild = 2 * nodeIndex + 2;\n TreeNode leftNode = generateNode(leftChild, nodes);\n if (leftNode != null) {\n node.left = leftNode;\n nodeQueue.offer(leftNode);\n indexQueue.offer(++currentIndex);\n }\n\n TreeNode rightNode = generateNode(rightChild, nodes);\n if (rightNode != null) {\n node.right = rightNode;\n nodeQueue.offer(rightNode);\n indexQueue.offer(++currentIndex);\n }\n }\n\n return root;\n\n }", "public TreeNode deserialize(String data) {\n if (data.length() == 0) {\n return null;\n }\n String[] input = data.split(\",\");\n\n int childIndex = 1;\n Queue<TreeNode> queue = new LinkedList<>();\n TreeNode root = new TreeNode(Integer.valueOf(input[0]));\n queue.add(root);\n while (queue.size() > 0) {\n TreeNode node = queue.remove();\n if (!input[childIndex].equals(\"#\")) {\n node.left = new TreeNode(Integer.valueOf(input[childIndex]));\n queue.add(node.left);\n }\n if (!input[childIndex + 1].equals(\"#\")) {\n node.right = new TreeNode(Integer.valueOf(input[childIndex + 1]));\n queue.add(node.right);\n }\n childIndex += 2;\n }\n return root;\n }", "public TreeNode deserialize(String data){\n String[] arr = data.split(\",\");\n List<String> list = new ArrayList<String>(Arrays.asList(arr));\n return desHelper(list);\n }", "public TreeNode deserialize(String data) {\n String[] nums = data.split(\",\");\n List<String> dataNums = new ArrayList<>(Arrays.asList(nums));\n return deserializeCore(dataNums);\n }", "public TreeNode deserialize(String data) {\n\t\tString[] nodes = data.split(\",\");\n\t\tQueue<String> queue = new LinkedList<>();\n\t\tqueue.addAll(Arrays.asList(nodes));\n\t\treturn treeDeserialize(queue);\n\t}", "public TreeNode deserialize(String data) {\n if (data == null || data.isEmpty()) {\n return null;\n }\n\n String[] values = data.split(\",\");\n List<Integer> preorder = Arrays.stream(values)\n .map(Integer::parseInt)\n .collect(Collectors.toList());\n\n return preOrderDeserialize(preorder);\n }", "public TreeNode deserialize(String data) {\n if (data.isEmpty()) return null;\n\n LinkedList<Integer> list = new LinkedList();\n for (String s: data.split(\",\"))\n list.add(Integer.parseInt(s));\n return doDeserialize(list, Integer.MIN_VALUE, Integer.MAX_VALUE);\n }", "public TreeNode deserialize(String data) {\n if (data.length()==0 || data.equals(\"#\")) return null;\n String[] n = data.split(\",\");\n idx = 0;\n return helper(n);\n }", "public TreeNode deserialize(String data) {\n \tif(data == null || data.length() == 0)\n return null;\n String[] splits = data.split(\",\");\n if(splits.length == 0)\n return null;\n Queue<TreeNode> curList = new LinkedList<TreeNode>();\n int index = 0;\n if(isNull(splits[index]))\n return null;\n TreeNode head = new TreeNode(Integer.parseInt(splits[index++])); \n curList.add(head);\n Queue<TreeNode> nextList = new LinkedList<TreeNode>();\n while(curList.size() != 0){\n while(curList.size() != 0){\n TreeNode curNode = curList.poll();\n if(isNull(splits[index])){\n curNode.left = null;\n index++;\n }\n else{\n TreeNode left = new TreeNode(Integer.parseInt(splits[index++]));\n curNode.left = left;\n nextList.add(left);\n }\n if(isNull(splits[index])){\n curNode.right = null;\n index++;\n }\n else{\n TreeNode right = new TreeNode(Integer.parseInt(splits[index++]));\n curNode.right = right;\n nextList.add(right);\n }\n }\n curList = nextList;\n }\n return head;\n }", "public TreeNode deserialize(String data) {\n String[] arr = data.split(\",\");\n int[] index = new int[1];\n return helper(arr, index);\n }", "public Node deserialize(String data) {\n return deserialize_helper(data, new int[]{1}, new StringBuilder());\n }", "Object decode(String encoded);", "public void decode() throws Exception {\n decodeFat();\n decodeDat();\n }", "public void encodeTree(){\n StringBuilder builder = new StringBuilder();\n encodeTreeHelper(root,builder);\n }", "public static TreeNode deserialize(String data) {\n String[] dataArray = data.split(\",\");\n Queue<String> dataQueue = new LinkedList<>(Arrays.asList(dataArray));\n return deserializeHelper(dataQueue);\n }", "private void buildTree() {\n\t\tfinal TreeSet<Tree> treeSet = new TreeSet<Tree>();\n\t\tfor (char i = 0; i < 256; i++) {\n\t\t\tif (characterCount[i] > 0) {\n\t\t\t\ttreeSet.add(new Tree(i, characterCount[i]));\n\t\t\t}\n\t\t}\n\n\t\t// Merge the trees to one Tree\n\t\tTree left;\n\t\tTree right;\n\t\twhile (treeSet.size() > 1) {\n\t\t\tleft = treeSet.pollFirst();\n\t\t\tright = treeSet.pollFirst();\n\t\t\ttreeSet.add(new Tree(left, right));\n\t\t}\n\n\t\t// There is only our final tree left\n\t\thuffmanTree = treeSet.pollFirst();\n\t}", "private static TreeNode deserializeHelper(Queue<String> dataQueue){\n \t// use equals to compare Strings\n if (dataQueue.peek().equals(\"null\")){\n dataQueue.poll();\n return null;\n }\n int val = Integer.parseInt(dataQueue.poll());\n TreeNode res = new TreeNode(val);\n res.left = deserializeHelper(dataQueue);\n res.right = deserializeHelper(dataQueue);\n return res;\n }", "public Node readTree() {\n boolean totuusarvo = b.readBoolean();\n if (totuusarvo == true) {\n return new Node(b.readShort(), -1, null, null);\n } else {\n return new Node(\"9000\", -1, readTree(), readTree());\n }\n }", "public Node deserialize(String data) {\n if (data.length()==0){\n return null;\n }\n int i=0;\n int temp=0;\n while (i<data.length()&&Character.isDigit(data.charAt(i))){\n temp=temp*10+data.charAt(i)-'0';\n i++;\n }\n data=data.substring(i);\n Node root=new Node(temp);\n Queue<Node> q=new LinkedList<>();\n q.offer(root);\n while (!q.isEmpty()){\n Node n=q.poll();\n int index=data.indexOf(')');\n String childrenString=data.substring(1,index);\n n.children=new ArrayList<>();//就算没有children也要建,不然lc不行\n if (childrenString!=null&&childrenString.length()!=0){\n String[] array=childrenString.split(\",\");\n if (array.length>0){\n for (String v:array){\n Node child=new Node(Integer.valueOf(v));\n n.children.add(child);\n q.offer(child);\n }\n }\n }\n data=data.substring(index+1);\n }\n return root;\n }", "private void encodeTree(BitOutputStore output, SymbolNode root) {\n output.appendBits(8, nLeafNodes - 1);\n SymbolNode[] path = new SymbolNode[256];\n int[] pathBranch = new int[256];\n path[0] = root;\n pathBranch[0] = 0;\n int depth = 1;\n while (depth > 0) {\n int index = depth - 1;\n SymbolNode pNode = path[index];\n int pBranch = pathBranch[index];\n // pBranch is set as follows:\n // 0 we've just arrived at the node and have not yet\n // identified whether it is a branch or a leaf.\n // we have not yet traversed any of its children\n //\n // 1 we traversed down the left branch and need to traverse\n // down the right\n //\n // 2 we have traversed both branches and are on our way up\n\n switch (pBranch) {\n case 0:\n // we've just pushed the node on the stack and have not yet\n // identified whether it is a leaf or a branch.\n if (pNode.isLeaf) {\n output.appendBit(1); // terminal\n output.appendBits(8, pNode.symbol);\n BitOutputStore bitpath = encodePath(depth, path);\n pNode.nBitsInCode = bitpath.getEncodedTextLength();\n pNode.code = bitpath.getEncodedText();\n // pop the stack\n depth--;\n index--;\n // pro-forma, clear the stack variables\n pathBranch[depth] = 0;\n path[depth] = null;\n\n } else {\n output.appendBit(0); // non-terminal\n pathBranch[index] = 1;\n pathBranch[depth] = 0;\n path[depth] = pNode.left;\n depth++;\n }\n break;\n case 1:\n pathBranch[index] = 2;\n pathBranch[depth] = 0;\n path[depth] = pNode.right;\n depth++;\n break;\n case 2:\n // we're on our way up\n pathBranch[index] = 0;\n path[index] = null;\n depth--;\n break;\n default:\n // error condition, won't happen\n throw new IllegalStateException(\"Internal error encoding tree\");\n }\n }\n }", "public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tStringBuilder decodedText = new StringBuilder();\n\t\tNode currentBit = huffmanTree;\n\t\tint index = 0;\n\t\t//System.out.println(currentBit.getLeft());\n\t\t//System.out.println(currentBit.getRight());\n\t\twhile (index < encoded.length()) {\n\t\t\tif (encoded.charAt(index) == '0') {\n\t\t\t\tif (currentBit.getLeft() != null) {\n\t\t\t\t\tcurrentBit = currentBit.getLeft();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdecodedText.append(currentBit.getCharacter());\n\t\t\t\t\tcurrentBit = huffmanTree;\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentBit.getRight() != null) {\n\t\t\t\t\tcurrentBit = currentBit.getRight();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tdecodedText.append(currentBit.getCharacter());\n\t\t\t\t\tcurrentBit = huffmanTree;\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex++;\n if (index == encoded.length()) {\n decodedText.append(currentBit.getCharacter());\n }\n\t\t}\n System.out.println(\"EncondedText: \" + encoded);\n\t\tSystem.out.print(\"decodedText: \" + decodedText.toString());\n\t\treturn decodedText.toString();\n\n\t}", "public MorseCodeTree()\r\n\t{\r\n\t\tbuildTree();\r\n\t}", "void decodeObjectArray();", "void decode (DataInputStream dis, Node [] table, Decoder decoder) {\n m_size = Decoder.readUnsignedByte (dis);\n if (m_size == 255) {\n m_size = Decoder.readUnsignedByte (dis) * 255 + Decoder.readUnsignedByte (dis) ;\n }\n //System.out.println (m_size);\n if (m_size > 0) {\n m_node = new Node [m_size];\n for (int i = 0; i < m_size; i++) {\n m_node[i] = Node.decode (dis, table, decoder);\n }\n }\n //System.out.println (\"decoding MFNode done\");\n }", "public void decode()\n {\n if (null == escherRecords || 0 == escherRecords.size()){\n byte[] rawData = getRawData();\n convertToEscherRecords(0, rawData.length, rawData );\n }\n }", "private String decoder(String code, Tree iterator) {\n for (int i = 0; i < code.length(); i++) {\n String decodedChar = iterator.decode(code.substring(0, i + 1));\n\n if (decodedChar != null) {\n decode = decode + decodedChar;\n code = code.substring(i + 1);\n i = -1;\n }\n }\n\n return code;\n }", "public static void main(String[] args) {\n TreeNode root = new TreeNode(50);\n root.left = new TreeNode(30);\n root.right = new TreeNode(70);\n root.left.left = new TreeNode(20);\n root.left.right = new TreeNode(40);\n root.right.left = new TreeNode(60);\n root.right.right = new TreeNode(80);\n StringBuilder result = serialiseBT(root, new StringBuilder());\n System.out.println(result.toString());\n String[] strings = result.toString().split(\",\");\n TreeNode head = deserialize(strings, new int[]{0});\n System.out.println(serialiseBT(head, new StringBuilder()));\n }", "public static java.lang.Object decodeObject(com.webobjects.foundation.NSCoder coder){\n return null; //TODO codavaj!!\n }", "@Override\n public String decode(String code) throws IllegalStateException {\n if (code == null || code.equals(\"\")) {\n throw new IllegalStateException(\"the code cannot be null or empty.\");\n }\n Tree iterator = root;\n decode = \"\";\n\n for (int i = 0; i < code.length(); i++) {\n if (!encodingArray.contains(code.charAt(i))) {\n throw new IllegalStateException(\"The encoded string contains illegal symbol\");\n }\n }\n\n code = decoder(code, iterator);\n\n if (code.length() != 0) {\n throw new IllegalStateException(\"there is some problem with decoding.\");\n }\n\n return decode;\n }", "public void decode(String data) throws JSONException {\n\t\tthis.dtoObj=getObj(data, JrGxpgbillDTO.class);\n\t}", "void loadNodeData(byte[] data) throws Exception;", "public TreeNode encode(Node root) {\n return en(root);\n }", "public TreeNode encode(Node root) {\n if (root == null) {\n return null;\n }\n TreeNode head = new TreeNode(root.val);\n head.left = en(root.children);\n return head;\n }", "@Override\n public String decode(File fileName) throws IOException\n {\n HuffmanEncodedResult result = readFromFile(fileName);\n StringBuilder stringBuilder = new StringBuilder();\n\n BitSet bitSet = result.getEncodedData();\n\n for (int i = 0; bitSet.length() - 1 > i; )\n {\n Node currentNode = result.getRoot();\n while (!currentNode.isLeaf())\n {\n if (bitSet.get(i))\n {\n currentNode = currentNode.getLeftChild();\n }\n else\n {\n currentNode = currentNode.getRightChild();\n }\n i++;\n }\n stringBuilder.append(currentNode.getCharacter());\n }\n return stringBuilder.toString();\n }", "public TreeNode encode(Node root) {\n\t\t\tif (root == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tTreeNode head = new TreeNode(root.val);\n\t\t\thead.left = en(root.children);\n\t\t\treturn head;\n\t\t}", "public void reset(final byte[] treeData) {\n \t\traw = treeData;\n \t\trawPtr = 0;\n \t}", "public void decode(byte[] data)\n\t{\n\t\ttry\n\t\t{\n\n\t\t\tByteArrayInputStream bstream = new ByteArrayInputStream(data);\n\t\t\tDataInputStream istream = new DataInputStream(bstream);\n\t\t\tlevel = istream.readInt();\n\t\t\thp = istream.readInt();\n\t\t\tattack = istream.readInt();\n\t\t\tdefend = istream.readInt();\n\t\t\tmoney = istream.readInt();\n\t\t\texperience = istream.readInt();\n\t\t\tyellowKey = istream.readInt();\n\t\t\tblueKey = istream.readInt();\n\t\t\tredKey = istream.readInt();\n\t\t\tint can = istream.readInt();\n\t\t\t// canlookup\n\t\t\tif (can == 0)\n\t\t\t{\n\t\t\t\tcanLookup = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanLookup = true;\n\t\t\t}\n\t\t\tcan = istream.readInt();\n\t\t\t// canjump\n\t\t\tif (can == 0)\n\t\t\t{\n\t\t\t\tcanJump = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanJump = true;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"decode error::\" + e);\n\t\t}\n\t}", "public Object decode(Object value) {\n\t\treturn decode(value, null, this.filter);\n\t}", "private byte[] decode(Node root) {\n BitSet dataInBits = BitSet.valueOf(Arrays.copyOfRange(buffer.array(), bufferPosition, buffer.capacity()));\n int bitIndex = 0;\n\n ByteBuffer result = ByteBuffer.allocate(inputFileSize);\n\n for (int i = 0; i < inputFileSize; i++) {\n Node node = root;\n while (!node.hasValue() && i < inputFileSize) {\n boolean bit = dataInBits.get(bitIndex);\n bitIndex += 1;\n if (bit) node = node.getRightChild();\n else node = node.getLeftChild();\n }\n if (node.hasValue()) {\n result.put(node.getValue());\n }\n }\n\n // preparing byte buffer for converting to byte array\n int pos = result.position();\n result.flip();\n byte[] resultArray = new byte[pos];\n result.get(resultArray);\n return resultArray;\n }" ]
[ "0.6894664", "0.6808548", "0.650279", "0.64891165", "0.64851105", "0.6415433", "0.6362339", "0.63083476", "0.6284537", "0.622987", "0.6213446", "0.6161982", "0.6147146", "0.6140804", "0.6133282", "0.6078927", "0.6073399", "0.6069482", "0.6064389", "0.60632867", "0.6053727", "0.60433733", "0.60367304", "0.6033932", "0.59991515", "0.59938365", "0.5980659", "0.596683", "0.5959962", "0.59403956", "0.5926964", "0.59259915", "0.5904777", "0.5904113", "0.58938473", "0.58901024", "0.5863078", "0.585575", "0.58412635", "0.5839326", "0.5826294", "0.5817251", "0.58140945", "0.58085304", "0.5806847", "0.5799143", "0.5789812", "0.57792795", "0.57764786", "0.57683444", "0.57327855", "0.5725321", "0.5709299", "0.5705495", "0.56862473", "0.56824213", "0.5681499", "0.5657532", "0.5635658", "0.56222343", "0.5621862", "0.5619518", "0.5614503", "0.55898565", "0.5585282", "0.55714303", "0.5560025", "0.5553068", "0.55436295", "0.5540626", "0.5527881", "0.5520708", "0.5510794", "0.5509914", "0.54495806", "0.54390955", "0.53605646", "0.5349602", "0.5349041", "0.5328883", "0.5313851", "0.52906096", "0.52453035", "0.5230596", "0.5184324", "0.5172378", "0.5150647", "0.5116578", "0.5107965", "0.5099443", "0.5095703", "0.5091816", "0.5067655", "0.5054793", "0.5025217", "0.49959937", "0.49791348", "0.49754342", "0.49738646", "0.49662596" ]
0.5633201
59
TODO Autogenerated method stub
public static void main(String[] args) { try { //Initialize shell frame ShellFrame = new ShellFrame(360,200,"Menu principal",null); //Content charge contentCharge (); //ShellFrame standby ShellFrame.StandBy(); } catch (Exception e) { JOptionPane.showMessageDialog(null, "Error. GUI initialization failure", "Java Error", JOptionPane.ERROR_MESSAGE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
jhipsterneedleentityaddfield JHipster will add fields here
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addField(\n JavaSymbolName propertyName,\n JavaType propertyType,\n String columnName,\n String columnType,\n JavaType className,\n boolean id,\n boolean oneToOne, boolean oneToMany, boolean manyToOne, boolean manyToMany, String mappedBy);", "Builder addMainEntity(String value);", "@Override\n\tpublic void save(Field entity) {\n\t\t\n\t}", "Builder addMainEntity(Thing value);", "public void setupFields()\n {\n FieldInfo field = null;\n field = new FieldInfo(this, \"ID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"LastChanged\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Date.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Deleted\", 10, null, new Boolean(false));\n field.setDataClass(Boolean.class);\n field.setHidden(true);\n field = new FieldInfo(this, \"Description\", 25, null, null);\n field = new FieldInfo(this, \"CurrencyCode\", 3, null, null);\n field = new FieldInfo(this, \"LastRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"RateChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"RateChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"CostingRate\", 10, null, null);\n field.setDataClass(Double.class);\n field.setScale(-1);\n field = new FieldInfo(this, \"CostingChangedDate\", 12, null, null);\n field.setDataClass(Date.class);\n field.setScale(Constants.DATE_ONLY);\n field = new FieldInfo(this, \"CostingChangedBy\", 16, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"RoundAt\", 1, null, null);\n field.setDataClass(Short.class);\n field = new FieldInfo(this, \"IntegerDesc\", 20, null, \"Dollar\");\n field = new FieldInfo(this, \"FractionDesc\", 20, null, null);\n field = new FieldInfo(this, \"FractionAmount\", 10, null, new Integer(100));\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"Sign\", 3, null, \"$\");\n field = new FieldInfo(this, \"LanguageID\", Constants.DEFAULT_FIELD_LENGTH, null, null);\n field.setDataClass(Integer.class);\n field = new FieldInfo(this, \"NaturalInteger\", 20, null, null);\n field = new FieldInfo(this, \"NaturalFraction\", 20, null, null);\n }", "public void addField(TemplateField field)\r\n{\r\n\tfields.addElement(field);\r\n}", "public PimsSysReqFieldDaoHibernate() {\n super(PimsSysReqField.class);\n }", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "public void updateNonDynamicFields() {\n\n\t}", "Builder addMainEntity(Thing.Builder value);", "private void addFieldToBook(String config_id, GOlrField field) {\n if (!unique_fields.containsKey(field.id)) {\n unique_fields.put(field.id, field);\n } else {\n // check if defined fields are equivalent\n if (!unique_fields.get(field.id).equals(field)) {\n throw new IllegalStateException(field.id + \" is defined twice with different properties.\\n\"\n + unique_fields.get(field.id) + \"\\n\" + field);\n }\n }\n // Ensure presence of comments (description) list.\n if (!collected_comments.containsKey(field.id)) {\n collected_comments.put(field.id, new ArrayList<String>());\n }\n // And add to it if there is an available description.\n if (field.description != null) {\n ArrayList<String> comments = collected_comments.get(field.id);\n comments.add(\" \" + config_id + \": \" + field.description + \" \");\n collected_comments.put(field.id, comments);\n }\n }", "public void setEntityAddDate(String entityAddDate);", "public ChangeFieldEf() {\r\n\t\tthis(null, null);\r\n\t}", "void SaveBudgetKeyAdditional(BudgetKeyAdditionalEntity budgetKeyAdditionalEntity);", "protected void addField(InstanceContainer container, Form form, MetaProperty metaProperty, boolean isReadonly) {\n MetaClass metaClass = container.getEntityMetaClass();\n Range range = metaProperty.getRange();\n\n boolean isRequired = isRequired(metaProperty);\n\n UiEntityAttributeContext attributeContext = new UiEntityAttributeContext(metaClass, metaProperty.getName());\n accessManager.applyRegisteredConstraints(attributeContext);\n\n if (!attributeContext.canView())\n return;\n\n if (range.isClass()) {\n UiEntityContext entityContext = new UiEntityContext(range.asClass());\n accessManager.applyRegisteredConstraints(entityContext);\n if (!entityContext.isViewPermitted()) {\n return;\n }\n }\n\n ValueSource valueSource = new ContainerValueSource<>(container, metaProperty.getName());\n\n ComponentGenerationContext componentContext =\n new ComponentGenerationContext(metaClass, metaProperty.getName());\n componentContext.setValueSource(valueSource);\n\n Field field = (Field) uiComponentsGenerator.generate(componentContext);\n\n if (requireTextArea(metaProperty, getItem(), MAX_TEXTFIELD_STRING_LENGTH)) {\n field = uiComponents.create(TextArea.NAME);\n }\n\n if (isBoolean(metaProperty)) {\n field = createBooleanField();\n }\n\n if (range.isClass()) {\n EntityPicker pickerField = uiComponents.create(EntityPicker.class);\n\n EntityLookupAction lookupAction = actions.create(EntityLookupAction.class);\n lookupAction.setScreenClass(EntityInspectorBrowser.class);\n lookupAction.setScreenOptionsSupplier(() -> new MapScreenOptions(\n ParamsMap.of(\"entity\", metaProperty.getRange().asClass().getName())));\n lookupAction.setOpenMode(OpenMode.THIS_TAB);\n\n pickerField.addAction(lookupAction);\n pickerField.addAction(actions.create(EntityClearAction.class));\n\n field = pickerField;\n }\n\n field.setValueSource(valueSource);\n field.setCaption(getPropertyCaption(metaClass, metaProperty));\n field.setRequired(isRequired);\n\n isReadonly = isReadonly || (disabledProperties != null && disabledProperties.contains(metaProperty.getName()));\n if (range.isClass() && !metadataTools.isEmbedded(metaProperty)) {\n field.setEditable(metadataTools.isOwningSide(metaProperty) && !isReadonly);\n } else {\n field.setEditable(!isReadonly);\n }\n\n field.setWidth(fieldWidth);\n\n if (isRequired) {\n field.setRequiredMessage(messageTools.getDefaultRequiredMessage(metaClass, metaProperty.getName()));\n }\n form.add(field);\n }", "public interface ExtendedFieldGroupFieldFactory extends FieldGroupFieldFactory\r\n{\r\n\t<T> CRUDTable<T> createTableField(Class<T> genericType, boolean manyToMany);\r\n}", "public void createField(Field field) {\n Span span = this.tracer.buildSpan(\"Client.CreateField\").start();\n try {\n String path = String.format(\"/index/%s/field/%s\", field.getIndex().getName(), field.getName());\n String body = field.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating field\");\n } finally {\n span.finish();\n }\n }", "public interface FieldPopulator\n{\n List<String> getCoreFields();\n\n List<String> getSupportedFields();\n\n String getUriTemplate();\n}", "FieldDefinition createFieldDefinition();", "@attribute(value = \"\", required = true)\t\r\n\tpublic void addField(Field f) {\r\n\t\tfields.put(\"\" + fieldCount++, f);\r\n\t}", "@Label(\"Organization存储\")\npublic interface OrganizationRepository extends ModelQueryAndBatchUpdateRepository<Organization, EOrganization, Integer> {\n\n}", "void addFieldBinding( FieldBinding binding );", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "@Test\n public void createCustomFieldTest() throws ApiException {\n CustomFieldDefinitionJsonBean body = null;\n FieldDetails response = api.createCustomField(body);\n\n // TODO: test validations\n }", "@Mapper(uses ={DateComponent.class}, componentModel = \"spring\")\npublic interface CreateCodeMapper extends EntityMapper<CreateCodeDto , Code> {\n}", "void addField(\n JavaSymbolName propertyName,\n JavaType propertyType,\n String columnName,\n String columnType,\n JavaType className\n );", "public void setUWCompany(entity.UWCompany value);", "@Mapper(componentModel = \"spring\", uses = {HopDongMapper.class})\npublic interface GhiNoMapper extends EntityMapper<GhiNoDTO, GhiNo> {\n\n @Mapping(source = \"hopDong.id\", target = \"hopDongId\")\n GhiNoDTO toDto(GhiNo ghiNo);\n\n @Mapping(source = \"hopDongId\", target = \"hopDong\")\n GhiNo toEntity(GhiNoDTO ghiNoDTO);\n\n default GhiNo fromId(Long id) {\n if (id == null) {\n return null;\n }\n GhiNo ghiNo = new GhiNo();\n ghiNo.setId(id);\n return ghiNo;\n }\n}", "@Override\n public Field<?> createField(Container container, Object itemId,\n Object propertyId, Component uiContext) {\n Field<?> field = super.createField(container, itemId,\n propertyId, uiContext);\n\n // ...and just set them as immediate\n ((AbstractField<?>) field).setImmediate(true);\n\n // Also modify the width of TextFields\n if (field instanceof TextField)\n field.setWidth(\"100%\");\n field.setRequired(true);\n ((TextField) field).setInputPrompt(\"Введите назначение\");\n field.addStyleName(ValoTheme.LAYOUT_HORIZONTAL_WRAPPING);\n field.focus();\n\n return field;\n }", "public interface JdlFieldView extends JdlField, JdlCommentView {\n //TODO This validation should be handled in JdlService\n default String getTypeName() {\n JdlFieldEnum type = getType();\n return switch (type) {\n case ENUM -> getEnumEntityName()\n .orElseThrow(() -> new IllegalStateException(\"An enum field must have its enum entity name set\"));\n default -> ((\"UUID\".equals(type.name())) ? type.name() : type.toCamelUpper());\n };\n }\n\n default String constraints() {\n List<String> constraints = new ArrayList<>();\n if (renderRequired()) constraints.add(requiredConstraint());\n if (isUnique()) constraints.add(uniqueConstraint());\n getMin().ifPresent(min -> constraints.add(minConstraint(min)));\n getMax().ifPresent(max -> constraints.add(maxConstraint(max)));\n getPattern().ifPresent(pattern -> constraints.add(patternConstraint(pattern)));\n return (!constraints.isEmpty()) ? \" \".concat(Joiner.on(\" \").join(constraints)) : null;\n }\n\n // TODO do not write required when field is primary key\n default boolean renderRequired() {\n // if (!isPrimaryKey() && isRequired() && ) constraints.add(JdlUtils.validationRequired());\n return isRequired() && !(getName().equals(\"id\") && getType().equals(JdlFieldEnum.UUID));\n }\n\n @NotNull\n default String requiredConstraint() {\n return \"required\";\n }\n\n @NotNull\n default String uniqueConstraint() {\n return \"unique\";\n }\n\n default String minConstraint(int min) {\n return switch (getType()) {\n case STRING -> validationMinLength(min);\n default -> validationMin(min);\n };\n }\n\n default String maxConstraint(int max) {\n return switch (getType()) {\n case STRING -> validationMaxLength(max);\n default -> validationMax(max);\n };\n }\n\n //TODO This validation should be handled in JdlService\n default String patternConstraint(String pattern) {\n return switch (getType()) {\n case STRING -> validationPattern(pattern);\n default -> throw new RuntimeException(\"Only String can have a pattern\");\n };\n }\n\n @NotNull\n default String validationMax(final int max) {\n return \"max(\" + max + \")\";\n }\n\n @NotNull\n default String validationMin(final int min) {\n return \"min(\" + min + \")\";\n }\n\n default String validationMaxLength(final int max) {\n return \"maxlength(\" + max + \")\";\n }\n\n @NotNull\n default String validationMinLength(final int min) {\n return \"minlength(\" + min + \")\";\n }\n\n @NotNull\n default String validationPattern(final String pattern) {\n return \"pattern(/\" + pattern + \"/)\";\n }\n}", "HxField createField(final String fieldType,\n final String fieldName);", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface Record25HerfinancieeringMapper extends EntityMapper<Record25HerfinancieeringDTO, Record25Herfinancieering> {\n\n\n\n default Record25Herfinancieering fromId(Long id) {\n if (id == null) {\n return null;\n }\n Record25Herfinancieering record25Herfinancieering = new Record25Herfinancieering();\n record25Herfinancieering.setId(id);\n return record25Herfinancieering;\n }\n}", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "@PrePersist()\r\n\tpublic void initEntity(){\r\n\t\tthis.name = WordUtils.capitalizeFully(this.name);\r\n\t}", "public interface FieldDAO extends CrudRepository<Field, Integer> {\n\n}", "@Override\n\tprotected void initializeFields() {\n\n\t}", "@Override\r\n\tpublic void addField(Field field) \r\n\t{\r\n\t\tif(this.fields == null)\r\n\t\t{\r\n\t\t\tthis.fields = new ArrayList<>();\r\n\t\t}\r\n\t\tthis.fields.add(field);\r\n\t}", "void add(E entity) throws ValidationException, RepositoryException;", "private void addSetter(JavaObject object, JavaModelBeanField field) {\n\t\tIJavaCodeLines arguments = getArguments(field, object.getImports());\n\t\tSetterMethod method = new SetterMethod(field.getName(), field.getType(), arguments, objectType);\n\t\tobject.addBlock(method);\n\t}", "@Override\n\tpublic void save(List<Field> entity) {\n\t\t\n\t}", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "void addEntity(IViewEntity entity);", "private void handleIdFields(JFieldVar field, JsonNode propertyNode) {\n if (propertyNode.has(JpaConstants.IS_ID_COLUMN) && propertyNode.get(JpaConstants.IS_ID_COLUMN).asBoolean(true)) {\n field.annotate(Id.class);\n }\n\n if (propertyNode.has(JpaConstants.GENERATED_VALUE)) {\n JsonNode generatedValueNode = propertyNode.get(JpaConstants.GENERATED_VALUE);\n JAnnotationUse jAnnotationUse = field.annotate(GeneratedValue.class);\n if (generatedValueNode.has(JpaConstants.STRATEGY)) {\n jAnnotationUse.param(JpaConstants.STRATEGY, GenerationType.valueOf(generatedValueNode.get(JpaConstants.STRATEGY).asText()));\n }\n }\n }", "Builder addMainEntityOfPage(String value);", "public void addEntityMetadata() throws Exception {\n\n\t\tEntityMetadata entity = new EntityMetadata(entityType, false);\n\t\tentity.setRepositoryInstance(\"OperationalDB\");\n\t\tentity.setProviderType(\"RDBMSDataProvider\");\n\n\t\tMap<String, List<String>> providerParams = new HashMap<String, List<String>>();\n\t\tproviderParams.put(\"table\",\n\t\t\t\tArrays.asList(new String[] { \"APPLICATION_OBJECT\" }));\n\t\tproviderParams.put(\"id_column\", Arrays.asList(new String[] { \"ID\" }));\n\t\tproviderParams.put(\"id_type\", Arrays.asList(new String[] { \"guid\" }));\n\t\tproviderParams.put(\"optimistic_locking\",\n\t\t\t\tArrays.asList(new String[] { \"false\" }));\n\t\tproviderParams.put(\"flex_searchable_string_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_VC\" }));\n\t\tproviderParams.put(\"flex_non_searchable_string_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_VC\" }));\n\t\tproviderParams.put(\"flex_searchable_date_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_DT\" }));\n\t\tproviderParams.put(\"flex_non_searchable_date_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_DT\" }));\n\t\tproviderParams.put(\"flex_searchable_number_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"I_NUM\" }));\n\t\tproviderParams.put(\"flex_non_searchable_number_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_NUM\" }));\n\t\tproviderParams.put(\"flex_blob_prefix\",\n\t\t\t\tArrays.asList(new String[] { \"U_BLOB\" }));\n\n\t\tentity.setProviderParameters(providerParams);\n\t\tentity.setContainer(false);\n\n\t\tHashMap<String, Map<String, String>> metadataAttachments = new HashMap<String, Map<String, String>>();\n\t\tMap<String, String> prop = new HashMap<String, String>();\n\t\tprop.put(\"isEncrypted\", \"false\");\n\t\tmetadataAttachments.put(\"properties\", prop);\n\t\tAttributeDefinition attrDef = null;\n\t\tFieldDefinition fieldDef = null;\n\n\t\t// parameters: name, type, description, isRequired, isSearchable, isMLS,\n\t\t// defaultValue, groupName, metadataAttachments\n\n\t\tattrDef = new AttributeDefinition(\"givenName\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"lastName\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"email\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"startDate\", \"date\", null, false,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"endDate\", \"date\", null, false,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\t\n\t\tattrDef = new AttributeDefinition(\"employeeNo\", \"number\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\n\n\t\tattrDef = new AttributeDefinition(\"__UID__\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\tfieldDef = new FieldDefinition(\"AO_UID\", \"string\",true);\n\t\tentity.addField(fieldDef);\n\t\tentity.addAttributeMapping(\"__UID__\", \"AO_UID\");\n\t\t\n\t\tattrDef = new AttributeDefinition(\"__NAME__\", \"string\", null, true,\n\t\t\t\ttrue, false, null, \"Basic\", metadataAttachments);\n\t\tentity.addAttribute(attrDef);\n\t\tfieldDef = new FieldDefinition(\"AO_NAME\", \"string\",true);\n\t\tentity.addField(fieldDef);\n\t\tentity.addAttributeMapping(\"__NAME__\", \"AO_NAME\");\n\n\t\t/*\n\t\t * attrDef = new AttributeDefinition(childEntityType, childEntityType,\n\t\t * null, false, true, false, null, \"Basic\", metadataAttachments);\n\t\t * entity.addChildEntityAttribute(attrDef);\n\t\t */\n\n\t\tString xmlString = getStringfromDoc(entity);\n\n\t\ttry {\n\t\t\tmgrConfig.createEntityMetadata(entity);\n\t\t\tSystem.out.println(\"Created entity type: \" + entityType);\n\n\t\t} catch (Exception e) {\n\t\t\t//fail(\"Unexpected exception: \" + getStackTrace(e));\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@ProviderType\npublic interface EmployeeModel extends BaseModel<Employee> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a employee model instance should use the {@link Employee} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this employee.\n\t *\n\t * @return the primary key of this employee\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this employee.\n\t *\n\t * @param primaryKey the primary key of this employee\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this employee.\n\t *\n\t * @return the uuid of this employee\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this employee.\n\t *\n\t * @param uuid the uuid of this employee\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the employee ID of this employee.\n\t *\n\t * @return the employee ID of this employee\n\t */\n\tpublic long getEmployeeId();\n\n\t/**\n\t * Sets the employee ID of this employee.\n\t *\n\t * @param employeeId the employee ID of this employee\n\t */\n\tpublic void setEmployeeId(long employeeId);\n\n\t/**\n\t * Returns the first name of this employee.\n\t *\n\t * @return the first name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getFirstName();\n\n\t/**\n\t * Sets the first name of this employee.\n\t *\n\t * @param firstName the first name of this employee\n\t */\n\tpublic void setFirstName(String firstName);\n\n\t/**\n\t * Returns the last name of this employee.\n\t *\n\t * @return the last name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getLastName();\n\n\t/**\n\t * Sets the last name of this employee.\n\t *\n\t * @param lastName the last name of this employee\n\t */\n\tpublic void setLastName(String lastName);\n\n\t/**\n\t * Returns the middle name of this employee.\n\t *\n\t * @return the middle name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getMiddleName();\n\n\t/**\n\t * Sets the middle name of this employee.\n\t *\n\t * @param middleName the middle name of this employee\n\t */\n\tpublic void setMiddleName(String middleName);\n\n\t/**\n\t * Returns the birth date of this employee.\n\t *\n\t * @return the birth date of this employee\n\t */\n\tpublic Date getBirthDate();\n\n\t/**\n\t * Sets the birth date of this employee.\n\t *\n\t * @param birthDate the birth date of this employee\n\t */\n\tpublic void setBirthDate(Date birthDate);\n\n\t/**\n\t * Returns the post ID of this employee.\n\t *\n\t * @return the post ID of this employee\n\t */\n\tpublic long getPostId();\n\n\t/**\n\t * Sets the post ID of this employee.\n\t *\n\t * @param postId the post ID of this employee\n\t */\n\tpublic void setPostId(long postId);\n\n\t/**\n\t * Returns the sex of this employee.\n\t *\n\t * @return the sex of this employee\n\t */\n\tpublic Boolean getSex();\n\n\t/**\n\t * Sets the sex of this employee.\n\t *\n\t * @param sex the sex of this employee\n\t */\n\tpublic void setSex(Boolean sex);\n\n}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "@Component\npublic interface AdFieldRepository extends CrudRepository<AdField, Integer> {\n\n AdField findById(int id);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ProgrammePropMapper extends EntityMapper<ProgrammePropDTO, ProgrammeProp> {\n\n\n\n default ProgrammeProp fromId(Long id) {\n if (id == null) {\n return null;\n }\n ProgrammeProp programmeProp = new ProgrammeProp();\n programmeProp.setId(id);\n return programmeProp;\n }\n}", "public interface RegistryFieldSearchRepository extends ElasticsearchRepository<RegistryField, Long> {\n}", "@Override\n\tpublic void entityAdded(Entity entity)\n\t{\n\t\t\n\t}", "private void setNewField(String fieldName) {\n setNewField(fieldName, DBCreator.STRING_TYPE, null);\n }", "Ack editProperty(ProjectEntity entity, String propertyTypeName, JsonNode data);", "@Test\n\tpublic void testFieldCRUDConfig() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\tfinal String entityInputTypeName = Entity6.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix();\n\t\tfinal IntrospectionFullType entityInputType = getFullType(introspection, entityInputTypeName);\n\t\tfinal String entity6TypeName = Entity6.class.getSimpleName();\n\t\tfinal IntrospectionFullType entityType = getFullType(introspection, entity6TypeName);\n\t\t// Check field attr1 is not readable\n\t\tfinal Optional<IntrospectionTypeField> attr1Field = getOptionalField(entityType, \"attr1\");\n\t\tAssert.assertFalse(\n\t\t\t\tMessage.format(\"There shouldn't be a readable field [{}] in [{}].\", \"typeField\", entity6TypeName),\n\t\t\t\tattr1Field.isPresent());\n\t\t// Check field attr2 is not saveable\n\t\tfinal Optional<IntrospectionInputValue> attr2InputField = getOptionalInputField(entityInputType, \"attr2\");\n\t\tAssert.assertFalse(\n\t\t\t\tMessage.format(\"There shouldn't be a not saveable field [{}] in [{}].\", \"attr2\", entityInputTypeName),\n\t\t\t\tattr2InputField.isPresent());\n\t\t// Check field attr3 is not nullable\n\t\tassertInputField(entityInputType, \"attr3\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\t// Check field attr4 is not nullableForCreate\n\t\tassertInputField(entityInputType, \"attr4\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\t// Check field attr5 is not nullableForUpdate\n\t\tassertInputField(entityInputType, \"attr5\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\t// Check field attr6 is not filterable\n\t\tfinal String entityFilterTypeName = Entity6.class.getSimpleName()\n\t\t\t\t+ schemaConfig.getQueryGetListFilterEntityTypeNameSuffix();\n\t\tfinal IntrospectionFullType entityFilterInputType = getFullType(introspection, entityFilterTypeName);\n\t\tfinal Optional<IntrospectionInputValue> attr4IinputField = getOptionalInputField(entityFilterInputType,\n\t\t\t\t\"attr6\");\n\t\tAssert.assertFalse(\n\t\t\t\tMessage.format(\"There shouldn't be a filterable field [{}] in [{}].\", \"attr6\", entityFilterTypeName),\n\t\t\t\tattr4IinputField.isPresent());\n\t\t// Check field attr7 is mandatory\n\t\t// Check field attr8 is mandatory for update\n\t\t// Check field attr9 is mandatory for create\n\n\t\t// Check field attr10 is not readable for ROLE1\n\t\t// Check field attr10 is not readable for ROLE1\n\n\t\t// Check field attr11 is not saveable for ROLE1\n\n\t\t// Check field attr12 is not nullable for ROLE1\n\n\t\t// Check field attr13 is not nullable for update for ROLE1\n\n\t\t// Check field attr14 is not nullable for create for ROLE1\n\n\t\t// Check field attr15 is mandatory for ROLE1\n\n\t\t// Check field attr16 is mandatory for update for ROLE1\n\n\t\t// Check field attr17 is mandatory for create for ROLE1\n\n\t\t// Check field attr18 is not readable for ROLE1 and ROLE2\n\n\t\t// Check field attr19 is not readable for ROLE1 and ROLE2\n\n\t\t// Check field attr20 is not readable for ROLE1 and not saveable ROLE2\n\n\t\t// Check field attr21 is not readable and not nullable for ROLE1 and\n\t\t// ROLE2\n\n\t\t// Check field attr21 is readable and nullable for other roles than ROLE\n\t\t// 1 and ROLE2\n\n\t\t// Check field attr22 is readable for ROLE1\n\n\t\t// Check field attr22 is not readable for everybody except ROLE1\n\t}", "public AttributeField(Field field){\n this.field = field;\n }", "public void createFieldEditors()\n\t{\n\t}", "public EsIndexPropertyBuilder addField(String fieldName, AllowableFieldEntry field) {\n this.fieldMap.put(fieldName, field);\n return this;\n }", "@Test(enabled = false) //ExSkip\n public void insertMergeField(final DocumentBuilder builder, final String fieldName, final String textBefore, final String textAfter) throws Exception {\n FieldMergeField field = (FieldMergeField) builder.insertField(FieldType.FIELD_MERGE_FIELD, true);\n field.setFieldName(fieldName);\n field.setTextBefore(textBefore);\n field.setTextAfter(textAfter);\n }", "@Override\n\tpublic void addTmly(Tmly tmly) {\n\t\tString sql = \"insert into tmly(id_,title,content) values(?,?,?)\";\n\t\tthis.jdbcTemplate\n\t\t\t\t.update(sql,\n\t\t\t\t\t\tnew Object[] { tmly.getId(), tmly.getTitle(),\n\t\t\t\t\t\t\t\ttmly.getContent() });\n\t}", "protected synchronized void addFieldEntity(int fld_i, String entity) {\r\n // System.err.println(\"addFieldEntity(\" + fld_i + \",\\\"\" + entity + \"\\\")\");\r\n //\r\n // fld_i is used to indicate if this is a second iteration of addFieldEntity() to prevent\r\n // infinite recursion... not sure if it's correct... for example, what happens when\r\n // a post-processor transform converts a domain to an ip address - shouldn't that IP\r\n // address then be further decomposed?\r\n //\r\n if (fld_i != -1 && entity.equals(BundlesDT.NOTSET)) {\r\n ent_2_i.put(BundlesDT.NOTSET, -1); \r\n fld_dts.get(fld_i).add(BundlesDT.DT.NOTSET);\r\n\r\n //\r\n // Decompose a tag into it's basic elements\r\n //\r\n } else if (fld_i != -1 && fieldHeader(fld_i).equals(BundlesDT.TAGS)) {\r\n addFieldEntity(-1,entity); // Add the tag itself\r\n Iterator<String> it = Utils.tokenizeTags(entity).iterator();\r\n while (it.hasNext()) {\r\n String tag = it.next(); addFieldEntity(-1, tag);\r\n\tif (Utils.tagIsHierarchical(tag)) {\r\n String sep[] = Utils.tagDecomposeHierarchical(tag);\r\n\t for (int i=0;i<sep.length;i++) addFieldEntity(-1, sep[i]);\r\n\t} else if (Utils.tagIsTypeValue(tag)) {\r\n String sep[] = Utils.separateTypeValueTag(tag);\r\n\t tag_types.add(sep[0]);\r\n\t addFieldEntity(-1,sep[1]);\r\n\t}\r\n }\r\n\r\n //\r\n // Otherwise, keep track of the datatype to field correlation and run post\r\n // processors on the item to have those lookups handy.\r\n //\r\n } else {\r\n // System.err.println(\"determining datatype for \\\"\" + entity + \"\\\"\"); // DEBUG\r\n BundlesDT.DT datatype = BundlesDT.getEntityDataType(entity); if (dt_count_lu.containsKey(datatype) == false) dt_count_lu.put(datatype,0);\r\n // System.err.println(\"datatype for \\\"\" + entity + \"\\\" ==> \" + datatype); // DEBUG\r\n if (datatype != null) {\r\n// System.err.println(\"390:fld_i = \" + fld_i + \" (\" + fld_dts.containsKey(fld_i) + \")\"); // abc DEBUG\r\n// try { System.err.println(\" \" + fieldHeader(fld_i)); } catch (Throwable t) { } // abc DEBUG\r\n if (fld_i != -1) fld_dts.get(fld_i).add(datatype);\r\n if (ent_2_i.containsKey(entity) == false) {\r\n\t // Use special rules to set integer correspondance\r\n\t switch (datatype) {\r\n\t case IPv4: ent_2_i.put(entity, Utils.ipAddrToInt(entity)); break;\r\n\t case IPv4CIDR: ent_2_i.put(entity, Utils.ipAddrToInt((new StringTokenizer(entity, \"/\")).nextToken())); break;\r\n\t case INTEGER: ent_2_i.put(entity, Integer.parseInt(entity)); \r\n\t if (warn_on_float_conflict) checkForFloatConflict(fld_i);\r\n\t break;\r\n case FLOAT: ent_2_i.put(entity, Float.floatToIntBits(Float.parseFloat(entity))); \r\n\t if (warn_on_float_conflict) checkForFloatConflict(fld_i);\r\n break;\r\n\t case DOMAIN: ent_2_i.put(entity, Utils.ipAddrToInt(\"127.0.0.2\") + dt_count_lu.get(datatype)); // Put Domains In Unused IPv4 Space\r\n\t dt_count_lu.put(datatype, dt_count_lu.get(datatype) + 1);\r\n\t\t\t break;\r\n\r\n\t // Pray that these don't collide - otherwise x/y scatters will be off...\r\n\t default: ent_2_i.put(entity, dt_count_lu.get(datatype));\r\n\t dt_count_lu.put(datatype, dt_count_lu.get(datatype) + 1);\r\n\t\t\t break;\r\n }\r\n\t}\r\n\t// Map out the derivatives so that they will have values int the lookups\r\n\t// - Create the post processors\r\n\tif (post_processors == null) {\r\n\t String post_proc_strs[] = BundlesDT.listEnabledPostProcessors();\r\n\t post_processors = new PostProc[post_proc_strs.length];\r\n\t for (int i=0;i<post_processors.length;i++) post_processors[i] = BundlesDT.createPostProcessor(post_proc_strs[i], this);\r\n\t}\r\n\t// - Run all of the post procs against their correct types\r\n if (fld_i != -1) for (int i=0;i<post_processors.length;i++) {\r\n if (post_processors[i].type() == datatype) {\r\n\t String strs[] = post_processors[i].postProcess(entity);\r\n\t for (int j=0;j<strs.length;j++) {\r\n if (entity.equals(strs[j]) == false) addFieldEntity(-1, strs[j]);\r\n\t }\r\n }\r\n\t}\r\n } else if (ent_2_i.containsKey(entity) == false) {\r\n ent_2_i.put(entity, not_assoc.size());\r\n\tnot_assoc.add(entity);\r\n }\r\n }\r\n }", "public static CommonTableField createUpdatedEntity() {\n CommonTableField commonTableField = new CommonTableField()\n .title(UPDATED_TITLE)\n .entityFieldName(UPDATED_ENTITY_FIELD_NAME)\n .type(UPDATED_TYPE)\n .tableColumnName(UPDATED_TABLE_COLUMN_NAME)\n .columnWidth(UPDATED_COLUMN_WIDTH)\n .order(UPDATED_ORDER)\n .editInList(UPDATED_EDIT_IN_LIST)\n .hideInList(UPDATED_HIDE_IN_LIST)\n .hideInForm(UPDATED_HIDE_IN_FORM)\n .enableFilter(UPDATED_ENABLE_FILTER)\n .validateRules(UPDATED_VALIDATE_RULES)\n .showInFilterTree(UPDATED_SHOW_IN_FILTER_TREE)\n .fixed(UPDATED_FIXED)\n .sortable(UPDATED_SORTABLE)\n .treeIndicator(UPDATED_TREE_INDICATOR)\n .clientReadOnly(UPDATED_CLIENT_READ_ONLY)\n .fieldValues(UPDATED_FIELD_VALUES)\n .notNull(UPDATED_NOT_NULL)\n .system(UPDATED_SYSTEM)\n .help(UPDATED_HELP)\n .fontColor(UPDATED_FONT_COLOR)\n .backgroundColor(UPDATED_BACKGROUND_COLOR)\n .nullHideInForm(UPDATED_NULL_HIDE_IN_FORM)\n .endUsed(UPDATED_END_USED)\n .options(UPDATED_OPTIONS);\n return commonTableField;\n }", "@Test\n @Transactional\n void createCommonTableFieldWithExistingId() throws Exception {\n commonTableField.setId(1L);\n CommonTableFieldDTO commonTableFieldDTO = commonTableFieldMapper.toDto(commonTableField);\n\n int databaseSizeBeforeCreate = commonTableFieldRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restCommonTableFieldMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(commonTableFieldDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the CommonTableField in the database\n List<CommonTableField> commonTableFieldList = commonTableFieldRepository.findAll();\n assertThat(commonTableFieldList).hasSize(databaseSizeBeforeCreate);\n }", "public void add() {\n preAdd();\n EntitySelect<T> entitySelect = getEntitySelect();\n entitySelect.setMultiSelect(true);\n getEntitySelect().open();\n }", "@ModelAttribute(\"student\")\n public Student_gra_84 setupAddForm() {\n return new Student_gra_84();\n }", "private JSONObject addMetadataField(String field, String value, JSONObject metadataFields) throws JSONException{\n\t\tif (value != null && value != \"\"){\n\t\t\tmetadataFields.put(field, value);\n\t\t} return metadataFields;\n\t}", "public void buildMetaFields() {\n for (AtreusMetaEntity metaEntity : environment.getMetaManager().getEntities()) {\n Class<?> entityType = metaEntity.getEntityType();\n\n // Build the fields\n for (Field field : entityType.getDeclaredFields()) {\n\n // Execute the meta property builder rule bindValue\n for (BaseEntityMetaComponentBuilder propertyBuilder : fieldPropertyBuilders) {\n if (!propertyBuilder.acceptsField((MetaEntityImpl) metaEntity, field)) {\n continue;\n }\n propertyBuilder.validateField((MetaEntityImpl) metaEntity, field);\n if (propertyBuilder.handleField((MetaEntityImpl) metaEntity, field)) {\n break;\n }\n }\n\n }\n }\n }", "@Data\npublic class <XXX>ModelInfo extends AbstractModelInfo {\n private <Field1DataType> <Field1>;\n /**\n * @return an corresponding {@link <XXX>Transformer} for this model info\n */\n @Override\n public Transformer getTransformer() {\n return new <XXX>Transformer(this);\n }", "public <T>void addFieldValue(Field<T> field, T value)\n\t{\n\t\t this.addKeyValue(field.getAPIName(), value);\n\n\t}", "@Override\r\n protected void addAdditionalFormFields(AssayDomainIdForm domainIdForm, DataRegion rgn)\r\n {\n rgn.addHiddenFormField(\"providerName\", domainIdForm.getProviderName());\r\n }", "public static void insertField(Field field) {\n\t\t\n\t\ttry{\n Connection connection = getConnection();\n\n\n try {\n PreparedStatement statement = connection.prepareStatement(\"INSERT INTO template_fields (field_id, form_name, field_name, field_value, field_type, field_mandatory)\"\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" VALUES ('\"+field.getTheId()+\"', '\"+field.getTheFormName()+\"', '\"+field.getTheName()+\"', 'Here is text 424', '\"+field.getTheType()+\"', '\"+field.getTheMandatory()+\"')\"); \n statement.executeUpdate();\n\n statement.close();\n connection.close();\n } catch (SQLException ex) {\n \t//23 stands for duplicate / unique entries in db, so listen for that error and update db if so\n \tif (ex.getSQLState().startsWith(\"23\")) {\n System.out.println(\"Duplicate\");\n PreparedStatement statement = connection.prepareStatement(\"UPDATE template_fields SET \"\n \t\t+ \"field_id = '\"+field.getTheId()+\"', field_name = '\"+field.getTheName()+\"',\"\n \t\t+ \" field_value = 'here text', field_type = '\"+field.getTheType()+\"'\"\n \t\t\t\t+ \"WHERE field_id = '\"+field.getTheId()+\"' \"); \n\t\t\t\t\tstatement.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\tstatement.close();\n\t\t\t\t\tconnection.close();\n \t}\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\t}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface EmploymentTypeMapper extends EntityMapper<EmploymentTypeDTO, EmploymentType> {\n\n\n @Mapping(target = \"people\", ignore = true)\n EmploymentType toEntity(EmploymentTypeDTO employmentTypeDTO);\n\n default EmploymentType fromId(Long id) {\n if (id == null) {\n return null;\n }\n EmploymentType employmentType = new EmploymentType();\n employmentType.setId(id);\n return employmentType;\n }\n}", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "public BaseField setupField(int iFieldSeq)\n {\n BaseField field = null;\n if (iFieldSeq == 0)\n field = new HotelField(this, PRODUCT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 1)\n // field = new DateField(this, START_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 2)\n // field = new DateField(this, END_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 3)\n // field = new StringField(this, DESCRIPTION, 10, null, null);\n //if (iFieldSeq == 4)\n // field = new CityField(this, CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 5)\n // field = new CityField(this, TO_CITY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 6)\n // field = new ContinentField(this, CONTINENT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 7)\n // field = new RegionField(this, REGION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 8)\n // field = new CountryField(this, COUNTRY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 9)\n // field = new StateField(this, STATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 10)\n // field = new VendorField(this, VENDOR_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 11)\n field = new HotelRateField(this, RATE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 12)\n field = new HotelClassField(this, CLASS_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 13)\n // field = new DateField(this, DETAIL_DATE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 14)\n // field = new ShortField(this, PAX, Constants.DEFAULT_FIELD_LENGTH, null, new Short((short)2));\n //if (iFieldSeq == 15)\n // field = new HotelScreenRecord_LastChanged(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 16)\n // field = new BooleanField(this, REMOTE_QUERY_ENABLED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 17)\n // field = new ShortField(this, BLOCKED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 18)\n // field = new ShortField(this, OVERSELL, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 19)\n // field = new BooleanField(this, CLOSED, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 20)\n // field = new BooleanField(this, DELETE, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 21)\n // field = new BooleanField(this, READ_ONLY, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 22)\n // field = new ProductSearchTypeField(this, PRODUCT_SEARCH_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n //if (iFieldSeq == 23)\n // field = new ProductTypeField(this, PRODUCT_TYPE_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (iFieldSeq == 24)\n field = new PaxCategorySelect(this, PAX_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);\n if (field == null)\n field = super.setupField(iFieldSeq);\n return field;\n }", "@Override\n\tpublic int addBookshelfinfo(BookshelfinfoEntity bookshelfinfoEntity) {\n\t\treturn this.sqlSessionTemplate.insert(\"bookshelfinfo.add\", bookshelfinfoEntity);\n\t}", "public JsonField() {\n }", "Builder addMainEntityOfPage(CreativeWork.Builder value);", "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface OrganisationTypeMapper extends EntityMapper<OrganisationTypeDTO, OrganisationType> {\n\n\n @Mapping(target = \"organisations\", ignore = true)\n OrganisationType toEntity(OrganisationTypeDTO organisationTypeDTO);\n\n default OrganisationType fromId(Long id) {\n if (id == null) {\n return null;\n }\n OrganisationType organisationType = new OrganisationType();\n organisationType.setId(id);\n return organisationType;\n }\n}", "protected abstract void createFieldEditors();", "@Repository\npublic interface SignInSendMessageDao {\n\n /**\n * 存入消息推送信息\n * @param message\n */\n @Insert({\n \"INSERT INTO sign_in_send_message(code,sponsor_id) values(#{message.code},#{message.sponsor_id})\",\n })\n void saveSendMessage(@Param(\"message\")SignInSendMessage message);\n\n}", "public ChangeFieldEf( EAdField<?> field,\r\n\t\t\tEAdOperation operation) {\r\n\t\tsuper();\r\n\t\tsetId(\"changeField\");\r\n\t\tthis.fields = new EAdListImpl<EAdField<?>>(EAdField.class);\r\n\t\tif (field != null)\r\n\t\t\tfields.add(field);\r\n\t\tthis.operation = operation;\r\n\t}", "EntityBeanDescriptor createEntityBeanDescriptor();", "private void addField(JField jfield) {\n\n // Check for storage ID conflict; note we can get this legitimately when a field is declared only\n // in supertypes, where two of the supertypes are mutually unassignable from each other. In that\n // case, verify that the generated field is the same.\n JField other = this.jfields.get(jfield.storageId);\n if (other != null) {\n\n // If the descriptions differ, no need to give any more details\n if (!other.toString().equals(jfield.toString())) {\n throw new IllegalArgumentException(\"illegal duplicate use of storage ID \"\n + jfield.storageId + \" for both \" + other + \" and \" + jfield);\n }\n\n // Check whether the fields are exactly the same; if not, there is a conflict\n if (!other.isSameAs(jfield)) {\n throw new IllegalArgumentException(\"two or more methods defining \" + jfield + \" conflict: \"\n + other.getter + \" and \" + jfield.getter);\n }\n\n // OK - they are the same thing\n return;\n }\n this.jfields.put(jfield.storageId, jfield);\n\n // Check for name conflict\n if ((other = this.jfieldsByName.get(jfield.name)) != null)\n throw new IllegalArgumentException(\"illegal duplicate use of field name `\" + jfield.name + \"' in \" + this);\n this.jfieldsByName.put(jfield.name, jfield);\n jfield.parent = this;\n\n // Logging\n if (this.log.isTraceEnabled())\n this.log.trace(\"added {} to object type `{}'\", jfield, this.name);\n }", "@Generated(\"Speedment\")\npublic interface Employee extends Entity<Employee> {\n \n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getId()} method.\n */\n public final static ComparableField<Employee, Short> ID = new ComparableFieldImpl<>(\"id\", Employee::getId, Employee::setId);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getFirstname()} method.\n */\n public final static StringField<Employee> FIRSTNAME = new StringFieldImpl<>(\"firstname\", o -> o.getFirstname().orElse(null), Employee::setFirstname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getLastname()} method.\n */\n public final static StringField<Employee> LASTNAME = new StringFieldImpl<>(\"lastname\", o -> o.getLastname().orElse(null), Employee::setLastname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getBirthdate()} method.\n */\n public final static ComparableField<Employee, Date> BIRTHDATE = new ComparableFieldImpl<>(\"birthdate\", o -> o.getBirthdate().orElse(null), Employee::setBirthdate);\n \n /**\n * Returns the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @return the id of this Employee\n */\n Short getId();\n \n /**\n * Returns the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @return the firstname of this Employee\n */\n Optional<String> getFirstname();\n \n /**\n * Returns the lastname of this Employee. The lastname field corresponds to\n * the database column db0.sql696688.employee.lastname.\n * \n * @return the lastname of this Employee\n */\n Optional<String> getLastname();\n \n /**\n * Returns the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @return the birthdate of this Employee\n */\n Optional<Date> getBirthdate();\n \n /**\n * Sets the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @param id to set of this Employee\n * @return this Employee instance\n */\n Employee setId(Short id);\n \n /**\n * Sets the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @param firstname to set of this Employee\n * @return this Employee instance\n */\n Employee setFirstname(String firstname);\n \n /**\n * Sets the lastname of this Employee. The lastname field corresponds to the\n * database column db0.sql696688.employee.lastname.\n * \n * @param lastname to set of this Employee\n * @return this Employee instance\n */\n Employee setLastname(String lastname);\n \n /**\n * Sets the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @param birthdate to set of this Employee\n * @return this Employee instance\n */\n Employee setBirthdate(Date birthdate);\n \n /**\n * Creates and returns a {@link Stream} of all {@link Borrowed} Entities that\n * references this Entity by the foreign key field that can be obtained using\n * {@link Borrowed#getEmployeeid()}. The order of the Entities are undefined\n * and may change from time to time.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a {@link Stream} of all {@link Borrowed} Entities that references\n * this Entity by the foreign key field that can be obtained using {@link\n * Borrowed#getEmployeeid()}\n */\n Stream<Borrowed> findBorrowedsByEmployeeid();\n \n /**\n * Creates and returns a <em>distinct</em> {@link Stream} of all {@link\n * Borrowed} Entities that references this Entity by a foreign key. The order\n * of the Entities are undefined and may change from time to time.\n * <p>\n * Note that the Stream is <em>distinct</em>, meaning that referencing\n * Entities will only appear once in the Stream, even though they may\n * reference this Entity by several columns.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a <em>distinct</em> {@link Stream} of all {@link Borrowed}\n * Entities that references this Entity by a foreign key\n */\n Stream<Borrowed> findBorroweds();\n}", "ObjectField createObjectField();", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TemplateFormulaireMapper extends EntityMapper<TemplateFormulaireDTO, TemplateFormulaire> {\n\n\n @Mapping(target = \"questions\", ignore = true)\n TemplateFormulaire toEntity(TemplateFormulaireDTO templateFormulaireDTO);\n\n default TemplateFormulaire fromId(Long id) {\n if (id == null) {\n return null;\n }\n TemplateFormulaire templateFormulaire = new TemplateFormulaire();\n templateFormulaire.setId(id);\n return templateFormulaire;\n }\n}", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "@Repository\npublic interface UserMapper {\n /**\n * 添加用户\n * @param user\n * @return\n */\n Integer addUser(User user);\n}", "public void templateMetadataInsert(Long idTemplate,Long idFieldLib)\n\t{\t\n\t\tFieldsTemplateLibrary lib = new FieldsTemplateLibrary();\n\t\tlib.setId(idFieldLib);\n\t\t\t\t\n\t\tFieldsMappingMeta metadata = new FieldsMappingMeta();\n\t\tmetadata.setTemplateId(idTemplate);\n\t\tmetadata.setFieldsTemplateLibrary(lib);\n\t\t\n\t\tFieldsMappingMetaDAO metaDao = new FieldsMappingMetaDAO();\n\t\tmetaDao.saveNew(metadata);\n\t}", "public EntityPropertyBean() {}", "public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}", "public void addEmployee(Employee employee) {\n employeeRepository.save(employee);\n }", "public interface RoleMapper {\n\n @Insert(\"insert into role values (role,desc) values (#{model.role},#{model.desc})\")\n @Options(useGeneratedKeys = true,keyProperty = \"model.id\")\n int insertRole(@Param(\"model\") RoleModel model);\n\n\n /**\n * 获取所有角色信息\n * @return\n */\n @Select(\"select id,role,desc,data_added,last_modified from role\")\n List<RoleModel> getAllRoles();\n\n\n /**\n * 获取角色Id\n * @param role\n * @return\n */\n @Select(\"select id from role where role=#{role}\")\n int getRoleId(String role);\n}", "@Override\n protected final Map<String, String> createFieldToPropertyMapping() {\n // get super class mapping\n final Map<String, String> mapping = super.createFieldToPropertyMapping();\n \n mapping.put(this.tableName + \".rmres_id\", \"id\");\n mapping.put(this.tableName + \".cost_rmres\", \"cost\");\n mapping.put(this.tableName + \".config_id\", \"configId\");\n mapping.put(this.tableName + \".rm_arrange_type_id\", \"arrangeTypeId\");\n mapping.put(this.tableName + \".guests_external\", \"externalGuests\");\n mapping.put(this.tableName + \".guests_internal\", \"internalGuests\");\n \n return mapping;\n }", "@attribute(value = \"\", required = true)\t\r\n\tpublic void addCharField(CharField f) {\r\n\t\tfields.put(\"\" + fieldCount++, f);\r\n\t}", "public void addEntity(AnnexDetail entity) throws Exception {\n\t\t\n\t}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ClientHeartbeatInfoMapper extends EntityMapper<ClientHeartbeatInfoDTO, ClientHeartbeatInfo> {\n\n\n\n default ClientHeartbeatInfo fromId(Long id) {\n if (id == null) {\n return null;\n }\n ClientHeartbeatInfo clientHeartbeatInfo = new ClientHeartbeatInfo();\n clientHeartbeatInfo.setId(id);\n return clientHeartbeatInfo;\n }\n}", "@PrePersist\r\n void createdAt() {\r\n setDateRecordAdded();\r\n setDateRecordUpdated();\r\n }", "public void addField(String fieldName, Object fieldValue, boolean forceAdd) {\n if (forceAdd\n || (this.beanMap.containsKey(fieldName)\n && this.beanMap.get(fieldName) == null && !this.deferredDescriptions\n .containsKey(fieldName))) {\n this.beanMap.put(fieldName, fieldValue);\n }\n }" ]
[ "0.62763983", "0.6147681", "0.5844888", "0.5740545", "0.5560386", "0.547659", "0.5464255", "0.54582417", "0.5440488", "0.54376584", "0.54208726", "0.5391521", "0.5391482", "0.5388153", "0.53871155", "0.5342213", "0.53312904", "0.53302115", "0.53127635", "0.5301875", "0.52962977", "0.52888054", "0.5285831", "0.52825797", "0.52535474", "0.5250478", "0.5249147", "0.52381194", "0.52362245", "0.5214042", "0.5191118", "0.5186886", "0.5186228", "0.51827353", "0.5180491", "0.5179368", "0.51545656", "0.5154284", "0.5147629", "0.51453775", "0.5132376", "0.5129072", "0.51171714", "0.51104254", "0.5102788", "0.5096364", "0.5074868", "0.507228", "0.50713027", "0.5066665", "0.5062547", "0.50567937", "0.5053703", "0.50528276", "0.50496", "0.50467986", "0.504433", "0.50420856", "0.5032941", "0.5027046", "0.5023237", "0.50179607", "0.50144804", "0.5010465", "0.5009751", "0.5006927", "0.50039434", "0.49890155", "0.49758595", "0.49737886", "0.49706906", "0.4966843", "0.49599364", "0.49537742", "0.49523878", "0.4941048", "0.4937173", "0.4935044", "0.49349967", "0.4931293", "0.49299306", "0.49252585", "0.49208006", "0.49196607", "0.49181932", "0.49150485", "0.49120373", "0.49110124", "0.49100074", "0.49089795", "0.4908439", "0.48915273", "0.48892927", "0.48880747", "0.48820144", "0.4881684", "0.488159", "0.48758405", "0.48690853", "0.48640433", "0.48630932" ]
0.0
-1
jhipsterneedleentityaddgetterssetters JHipster will add getters and setters here
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof LigneEntreeStock)) { return false; } return id != null && id.equals(((LigneEntreeStock) o).id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface CommonEntityMethod extends ToJson,GetFieldValue,SetFieldValue{\n}", "static void setPropertiesFromGetters(TableEntity entity, ClientLogger logger) {\n Class<?> myClass = entity.getClass();\n\n // Do nothing if the entity is actually a `TableEntity` rather than a subclass\n if (myClass == TableEntity.class) {\n return;\n }\n\n for (Method m : myClass.getMethods()) {\n // Skip any non-getter methods\n if (m.getName().length() < 3\n || TABLE_ENTITY_METHODS.contains(m.getName())\n || (!m.getName().startsWith(\"get\") && !m.getName().startsWith(\"is\"))\n || m.getParameterTypes().length != 0\n || void.class.equals(m.getReturnType())) {\n continue;\n }\n\n // A method starting with `is` is only a getter if it returns a boolean\n if (m.getName().startsWith(\"is\") && m.getReturnType() != Boolean.class\n && m.getReturnType() != boolean.class) {\n continue;\n }\n\n // Remove the `get` or `is` prefix to get the name of the property\n int prefixLength = m.getName().startsWith(\"is\") ? 2 : 3;\n String propName = m.getName().substring(prefixLength);\n\n try {\n // Invoke the getter and store the value in the properties map\n entity.getProperties().put(propName, m.invoke(entity));\n } catch (ReflectiveOperationException | IllegalArgumentException e) {\n logger.logThrowableAsWarning(new ReflectiveOperationException(String.format(\n \"Failed to get property '%s' on type '%s'\", propName, myClass.getName()), e));\n }\n }\n }", "public interface UnitTypeProperties extends PropertyAccess<UnitTypeDTO> {\n @Editor.Path(\"id\")\n ModelKeyProvider<UnitTypeDTO> key();\n ValueProvider<UnitTypeDTO, String> id();\n ValueProvider<UnitTypeDTO, String> name();\n @Editor.Path(\"name\")\n LabelProvider<UnitTypeDTO> nameLabel();\n}", "@ProviderType\npublic interface EmployeeModel extends BaseModel<Employee> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a employee model instance should use the {@link Employee} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this employee.\n\t *\n\t * @return the primary key of this employee\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this employee.\n\t *\n\t * @param primaryKey the primary key of this employee\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this employee.\n\t *\n\t * @return the uuid of this employee\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this employee.\n\t *\n\t * @param uuid the uuid of this employee\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the employee ID of this employee.\n\t *\n\t * @return the employee ID of this employee\n\t */\n\tpublic long getEmployeeId();\n\n\t/**\n\t * Sets the employee ID of this employee.\n\t *\n\t * @param employeeId the employee ID of this employee\n\t */\n\tpublic void setEmployeeId(long employeeId);\n\n\t/**\n\t * Returns the first name of this employee.\n\t *\n\t * @return the first name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getFirstName();\n\n\t/**\n\t * Sets the first name of this employee.\n\t *\n\t * @param firstName the first name of this employee\n\t */\n\tpublic void setFirstName(String firstName);\n\n\t/**\n\t * Returns the last name of this employee.\n\t *\n\t * @return the last name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getLastName();\n\n\t/**\n\t * Sets the last name of this employee.\n\t *\n\t * @param lastName the last name of this employee\n\t */\n\tpublic void setLastName(String lastName);\n\n\t/**\n\t * Returns the middle name of this employee.\n\t *\n\t * @return the middle name of this employee\n\t */\n\t@AutoEscape\n\tpublic String getMiddleName();\n\n\t/**\n\t * Sets the middle name of this employee.\n\t *\n\t * @param middleName the middle name of this employee\n\t */\n\tpublic void setMiddleName(String middleName);\n\n\t/**\n\t * Returns the birth date of this employee.\n\t *\n\t * @return the birth date of this employee\n\t */\n\tpublic Date getBirthDate();\n\n\t/**\n\t * Sets the birth date of this employee.\n\t *\n\t * @param birthDate the birth date of this employee\n\t */\n\tpublic void setBirthDate(Date birthDate);\n\n\t/**\n\t * Returns the post ID of this employee.\n\t *\n\t * @return the post ID of this employee\n\t */\n\tpublic long getPostId();\n\n\t/**\n\t * Sets the post ID of this employee.\n\t *\n\t * @param postId the post ID of this employee\n\t */\n\tpublic void setPostId(long postId);\n\n\t/**\n\t * Returns the sex of this employee.\n\t *\n\t * @return the sex of this employee\n\t */\n\tpublic Boolean getSex();\n\n\t/**\n\t * Sets the sex of this employee.\n\t *\n\t * @param sex the sex of this employee\n\t */\n\tpublic void setSex(Boolean sex);\n\n}", "public interface EmployeeMapper extends BaseMapper<Employee> {\n\n @Override\n @Select(\"select * from employee\")\n List<Employee> findAll();\n\n @Override\n int save(Employee employee);\n}", "public void toEntity(){\n\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface Record25HerfinancieeringMapper extends EntityMapper<Record25HerfinancieeringDTO, Record25Herfinancieering> {\n\n\n\n default Record25Herfinancieering fromId(Long id) {\n if (id == null) {\n return null;\n }\n Record25Herfinancieering record25Herfinancieering = new Record25Herfinancieering();\n record25Herfinancieering.setId(id);\n return record25Herfinancieering;\n }\n}", "public interface ResourceEntityMapperExt {\n\n List<ResourceEntity> getAllResource();\n\n Set<ResourceEntity> selectRoleResourcesByRoleId(@Param(\"roleId\") String roleId);\n\n void disable(@Param(\"resourceId\") String resourceId);\n\n void enable(@Param(\"resourceId\") String resourceId);\n\n List<Map> getParentMenusByUserId(@Param(\"userId\") String userId);\n\n List<Map> getChildrenMenusByUserId(@Param(\"userId\") String userId);\n\n List<Map> getAllParentMenus();\n\n List<Map> getAllChildrenMenus();\n\n List<Map> queryResourceList();\n\n void deleteByResourceId(@Param(\"resourceId\")String resourceId);\n\n List<String> resourcesByRoleId(@Param(\"roleId\") String roleId);\n\n List<Map> getAllChildrenMenusBySourceId(@Param(\"sourceId\")String sourceId);\n}", "@Mapper(componentModel = \"spring\")\npublic interface SaleMapper extends EntityMapper<SaleDto, Sale> {\n\n @Mapping(source = \"client.id\", target = \"clientId\")\n @Mapping(source = \"client.name\", target = \"clientName\")\n SaleDto toDto(Sale sale);\n\n @Mapping(source = \"clientId\", target = \"client.id\")\n Sale toEntity(SaleDto saleDTO);\n\n default Sale fromId(Long id) {\n if (id == null) {\n return null;\n }\n Sale sale = new Sale();\n sale.setId(id);\n return sale;\n }\n\n}", "public interface RepositoryJpaMetadataProvider extends\n ItdTriggerBasedMetadataProvider {\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ProgrammePropMapper extends EntityMapper<ProgrammePropDTO, ProgrammeProp> {\n\n\n\n default ProgrammeProp fromId(Long id) {\n if (id == null) {\n return null;\n }\n ProgrammeProp programmeProp = new ProgrammeProp();\n programmeProp.setId(id);\n return programmeProp;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {SabegheMapper.class, NoeSabegheMapper.class})\npublic interface AdamKhesaratMapper extends EntityMapper<AdamKhesaratDTO, AdamKhesarat> {\n\n @Mapping(source = \"sabeghe.id\", target = \"sabegheId\")\n @Mapping(source = \"sabeghe.name\", target = \"sabegheName\")\n @Mapping(source = \"noeSabeghe.id\", target = \"noeSabegheId\")\n @Mapping(source = \"noeSabeghe.name\", target = \"noeSabegheName\")\n AdamKhesaratDTO toDto(AdamKhesarat adamKhesarat);\n\n @Mapping(source = \"sabegheId\", target = \"sabeghe\")\n @Mapping(source = \"noeSabegheId\", target = \"noeSabeghe\")\n AdamKhesarat toEntity(AdamKhesaratDTO adamKhesaratDTO);\n\n default AdamKhesarat fromId(Long id) {\n if (id == null) {\n return null;\n }\n AdamKhesarat adamKhesarat = new AdamKhesarat();\n adamKhesarat.setId(id);\n return adamKhesarat;\n }\n}", "public interface IGQLDynamicAttributeGetterSetter<ENTITY_TYPE, GETTER_ATTRIBUTE_TYPE, SETTER_ATTRIBUTE_TYPE>\n\t\textends\n\t\t\tIGQLDynamicAttributeGetter<ENTITY_TYPE, GETTER_ATTRIBUTE_TYPE>,\n\t\t\tIGQLDynamicAttributeSetter<ENTITY_TYPE, SETTER_ATTRIBUTE_TYPE> {\n\n}", "@Mapper(uses ={DateComponent.class}, componentModel = \"spring\")\npublic interface CreateCodeMapper extends EntityMapper<CreateCodeDto , Code> {\n}", "@Mapper(componentModel = \"spring\", uses = {HopDongMapper.class})\npublic interface GhiNoMapper extends EntityMapper<GhiNoDTO, GhiNo> {\n\n @Mapping(source = \"hopDong.id\", target = \"hopDongId\")\n GhiNoDTO toDto(GhiNo ghiNo);\n\n @Mapping(source = \"hopDongId\", target = \"hopDong\")\n GhiNo toEntity(GhiNoDTO ghiNoDTO);\n\n default GhiNo fromId(Long id) {\n if (id == null) {\n return null;\n }\n GhiNo ghiNo = new GhiNo();\n ghiNo.setId(id);\n return ghiNo;\n }\n}", "public interface SaleRowDTOProperties {\n\n Vehicle.KapschVehicle getVehicle();\n\n void setVehicle(Vehicle.KapschVehicle vehicle);\n\n}", "public interface CreateEntityView<E extends SerializableEntity> extends EntityView {\r\n\r\n\t/**\r\n\t * Make save handler enabled\r\n\t * \r\n\t * @param enabled\r\n\t */\r\n\tvoid setSaveHandlerEnabled(boolean enabled);\r\n\t\r\n}", "public void setUWCompany(entity.UWCompany value);", "@SuppressWarnings(\"unused\")\n@Repository\n@JaversSpringDataAuditable\n\npublic interface SellContractCustomerRepository extends JpaRepository<SellContractCustomer, Long> {\n\n SellContractCustomer findByCustomer_Id(Long customerId);\n\n List<SellContractCustomer> findAllBySellContract_Id(Long sellContractId);\n\n}", "public interface PropertyDefEntity extends javax.ejb.EJBLocalObject {\n\n /**\n * Returns a PropertyDefDto data transfer object containing all parameters of\n * this property definition instance.\n *\n * @return PropertyDefDto the data transfer object containing all parameters of this instance\n * @see #setDto\n */\n public PropertyDefDto getDto();\n\n /**\n * Sets all data members of this property definition instance to the values\n * from the specified data transfer object.\n *\n * @param dto PropertyDefDto the data transfer object containing the new\n * parameters for this instance\n * @see #getDto\n */\n public void setDto(PropertyDefDto dto);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface ClientHeartbeatInfoMapper extends EntityMapper<ClientHeartbeatInfoDTO, ClientHeartbeatInfo> {\n\n\n\n default ClientHeartbeatInfo fromId(Long id) {\n if (id == null) {\n return null;\n }\n ClientHeartbeatInfo clientHeartbeatInfo = new ClientHeartbeatInfo();\n clientHeartbeatInfo.setId(id);\n return clientHeartbeatInfo;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface EmploymentTypeMapper extends EntityMapper<EmploymentTypeDTO, EmploymentType> {\n\n\n @Mapping(target = \"people\", ignore = true)\n EmploymentType toEntity(EmploymentTypeDTO employmentTypeDTO);\n\n default EmploymentType fromId(Long id) {\n if (id == null) {\n return null;\n }\n EmploymentType employmentType = new EmploymentType();\n employmentType.setId(id);\n return employmentType;\n }\n}", "public interface RoleMapper {\n\n @Insert(\"insert into role values (role,desc) values (#{model.role},#{model.desc})\")\n @Options(useGeneratedKeys = true,keyProperty = \"model.id\")\n int insertRole(@Param(\"model\") RoleModel model);\n\n\n /**\n * 获取所有角色信息\n * @return\n */\n @Select(\"select id,role,desc,data_added,last_modified from role\")\n List<RoleModel> getAllRoles();\n\n\n /**\n * 获取角色Id\n * @param role\n * @return\n */\n @Select(\"select id from role where role=#{role}\")\n int getRoleId(String role);\n}", "public interface GradeMapper {\n @Select(\"select * from grade\")\n public List<Grade> getByGradeNm();\n\n @Insert(\"insert into grade(grade_nm,teacher_id) values(#{gradeNm},#{teacherId})\")\n @Options(useGeneratedKeys=true,keyColumn=\"id\",keyProperty=\"id\")//设置id自增长\n public void save(Grade grade);\n}", "private GetProperty(Builder builder) {\n super(builder);\n }", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface MisteriosoMapper extends EntityMapper<MisteriosoDTO, Misterioso> {\n\n \n\n \n\n default Misterioso fromId(Long id) {\n if (id == null) {\n return null;\n }\n Misterioso misterioso = new Misterioso();\n misterioso.setId(id);\n return misterioso;\n }\n}", "void generateWriteProperty2ContentValues(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);", "@ProviderType\npublic interface LichChiTietModel\n\textends BaseModel<LichChiTiet>, GroupedModel, ShardedModel {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a lich chi tiet model instance should use the {@link LichChiTiet} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this lich chi tiet.\n\t *\n\t * @return the primary key of this lich chi tiet\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this lich chi tiet.\n\t *\n\t * @param primaryKey the primary key of this lich chi tiet\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the lich chi tiet ID of this lich chi tiet.\n\t *\n\t * @return the lich chi tiet ID of this lich chi tiet\n\t */\n\tpublic long getLichChiTietId();\n\n\t/**\n\t * Sets the lich chi tiet ID of this lich chi tiet.\n\t *\n\t * @param lichChiTietId the lich chi tiet ID of this lich chi tiet\n\t */\n\tpublic void setLichChiTietId(long lichChiTietId);\n\n\t/**\n\t * Returns the group ID of this lich chi tiet.\n\t *\n\t * @return the group ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getGroupId();\n\n\t/**\n\t * Sets the group ID of this lich chi tiet.\n\t *\n\t * @param groupId the group ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setGroupId(long groupId);\n\n\t/**\n\t * Returns the language of this lich chi tiet.\n\t *\n\t * @return the language of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getLanguage();\n\n\t/**\n\t * Sets the language of this lich chi tiet.\n\t *\n\t * @param language the language of this lich chi tiet\n\t */\n\tpublic void setLanguage(String language);\n\n\t/**\n\t * Returns the company ID of this lich chi tiet.\n\t *\n\t * @return the company ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getCompanyId();\n\n\t/**\n\t * Sets the company ID of this lich chi tiet.\n\t *\n\t * @param companyId the company ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setCompanyId(long companyId);\n\n\t/**\n\t * Returns the user ID of this lich chi tiet.\n\t *\n\t * @return the user ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic long getUserId();\n\n\t/**\n\t * Sets the user ID of this lich chi tiet.\n\t *\n\t * @param userId the user ID of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserId(long userId);\n\n\t/**\n\t * Returns the user uuid of this lich chi tiet.\n\t *\n\t * @return the user uuid of this lich chi tiet\n\t */\n\t@Override\n\tpublic String getUserUuid();\n\n\t/**\n\t * Sets the user uuid of this lich chi tiet.\n\t *\n\t * @param userUuid the user uuid of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserUuid(String userUuid);\n\n\t/**\n\t * Returns the user name of this lich chi tiet.\n\t *\n\t * @return the user name of this lich chi tiet\n\t */\n\t@AutoEscape\n\t@Override\n\tpublic String getUserName();\n\n\t/**\n\t * Sets the user name of this lich chi tiet.\n\t *\n\t * @param userName the user name of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setUserName(String userName);\n\n\t/**\n\t * Returns the create date of this lich chi tiet.\n\t *\n\t * @return the create date of this lich chi tiet\n\t */\n\t@Override\n\tpublic Date getCreateDate();\n\n\t/**\n\t * Sets the create date of this lich chi tiet.\n\t *\n\t * @param createDate the create date of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setCreateDate(Date createDate);\n\n\t/**\n\t * Returns the created by user of this lich chi tiet.\n\t *\n\t * @return the created by user of this lich chi tiet\n\t */\n\tpublic long getCreatedByUser();\n\n\t/**\n\t * Sets the created by user of this lich chi tiet.\n\t *\n\t * @param createdByUser the created by user of this lich chi tiet\n\t */\n\tpublic void setCreatedByUser(long createdByUser);\n\n\t/**\n\t * Returns the modified date of this lich chi tiet.\n\t *\n\t * @return the modified date of this lich chi tiet\n\t */\n\t@Override\n\tpublic Date getModifiedDate();\n\n\t/**\n\t * Sets the modified date of this lich chi tiet.\n\t *\n\t * @param modifiedDate the modified date of this lich chi tiet\n\t */\n\t@Override\n\tpublic void setModifiedDate(Date modifiedDate);\n\n\t/**\n\t * Returns the modified by user of this lich chi tiet.\n\t *\n\t * @return the modified by user of this lich chi tiet\n\t */\n\tpublic long getModifiedByUser();\n\n\t/**\n\t * Sets the modified by user of this lich chi tiet.\n\t *\n\t * @param modifiedByUser the modified by user of this lich chi tiet\n\t */\n\tpublic void setModifiedByUser(long modifiedByUser);\n\n\t/**\n\t * Returns the gio bat dau of this lich chi tiet.\n\t *\n\t * @return the gio bat dau of this lich chi tiet\n\t */\n\tpublic Date getGioBatDau();\n\n\t/**\n\t * Sets the gio bat dau of this lich chi tiet.\n\t *\n\t * @param gioBatDau the gio bat dau of this lich chi tiet\n\t */\n\tpublic void setGioBatDau(Date gioBatDau);\n\n\t/**\n\t * Returns the mo ta of this lich chi tiet.\n\t *\n\t * @return the mo ta of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getMoTa();\n\n\t/**\n\t * Sets the mo ta of this lich chi tiet.\n\t *\n\t * @param moTa the mo ta of this lich chi tiet\n\t */\n\tpublic void setMoTa(String moTa);\n\n\t/**\n\t * Returns the nguoi tham du of this lich chi tiet.\n\t *\n\t * @return the nguoi tham du of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNguoiThamDu();\n\n\t/**\n\t * Sets the nguoi tham du of this lich chi tiet.\n\t *\n\t * @param nguoiThamDu the nguoi tham du of this lich chi tiet\n\t */\n\tpublic void setNguoiThamDu(String nguoiThamDu);\n\n\t/**\n\t * Returns the nguoi chu tri of this lich chi tiet.\n\t *\n\t * @return the nguoi chu tri of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNguoiChuTri();\n\n\t/**\n\t * Sets the nguoi chu tri of this lich chi tiet.\n\t *\n\t * @param nguoiChuTri the nguoi chu tri of this lich chi tiet\n\t */\n\tpublic void setNguoiChuTri(String nguoiChuTri);\n\n\t/**\n\t * Returns the selected date of this lich chi tiet.\n\t *\n\t * @return the selected date of this lich chi tiet\n\t */\n\tpublic Date getSelectedDate();\n\n\t/**\n\t * Sets the selected date of this lich chi tiet.\n\t *\n\t * @param selectedDate the selected date of this lich chi tiet\n\t */\n\tpublic void setSelectedDate(Date selectedDate);\n\n\t/**\n\t * Returns the trangthai chi tiet of this lich chi tiet.\n\t *\n\t * @return the trangthai chi tiet of this lich chi tiet\n\t */\n\tpublic int getTrangthaiChiTiet();\n\n\t/**\n\t * Sets the trangthai chi tiet of this lich chi tiet.\n\t *\n\t * @param trangthaiChiTiet the trangthai chi tiet of this lich chi tiet\n\t */\n\tpublic void setTrangthaiChiTiet(int trangthaiChiTiet);\n\n\t/**\n\t * Returns the lich cong tac ID of this lich chi tiet.\n\t *\n\t * @return the lich cong tac ID of this lich chi tiet\n\t */\n\tpublic long getLichCongTacId();\n\n\t/**\n\t * Sets the lich cong tac ID of this lich chi tiet.\n\t *\n\t * @param lichCongTacId the lich cong tac ID of this lich chi tiet\n\t */\n\tpublic void setLichCongTacId(long lichCongTacId);\n\n\t/**\n\t * Returns the address of this lich chi tiet.\n\t *\n\t * @return the address of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getAddress();\n\n\t/**\n\t * Sets the address of this lich chi tiet.\n\t *\n\t * @param address the address of this lich chi tiet\n\t */\n\tpublic void setAddress(String address);\n\n\t/**\n\t * Returns the note of this lich chi tiet.\n\t *\n\t * @return the note of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getNote();\n\n\t/**\n\t * Sets the note of this lich chi tiet.\n\t *\n\t * @param note the note of this lich chi tiet\n\t */\n\tpublic void setNote(String note);\n\n\t/**\n\t * Returns the lydo tra ve of this lich chi tiet.\n\t *\n\t * @return the lydo tra ve of this lich chi tiet\n\t */\n\t@AutoEscape\n\tpublic String getLydoTraVe();\n\n\t/**\n\t * Sets the lydo tra ve of this lich chi tiet.\n\t *\n\t * @param lydoTraVe the lydo tra ve of this lich chi tiet\n\t */\n\tpublic void setLydoTraVe(String lydoTraVe);\n\n\t/**\n\t * Returns the organization ID of this lich chi tiet.\n\t *\n\t * @return the organization ID of this lich chi tiet\n\t */\n\tpublic long getOrganizationId();\n\n\t/**\n\t * Sets the organization ID of this lich chi tiet.\n\t *\n\t * @param organizationId the organization ID of this lich chi tiet\n\t */\n\tpublic void setOrganizationId(long organizationId);\n\n}", "@DSDerby\n@Repository\npublic interface HillMapper extends BaseMapper<Hill> {\n\n}", "@Mapper\n@Repository\npublic interface ClientDao {\n\n @Insert(value = \"insert into client_information(phone_number,user_name,password) values (#{phoneNumber},#{userName},#{password})\")\n void addClient(@Param(\"userName\") String userName, @Param(\"phoneNumber\") String phoneNumber , @Param(\"password\") String password);\n\n @Update(value = \"update client_information set sex=#{sex},user_name=#{user_name},email=#{email},\" +\n \"unit=#{unit},place=#{place} where phone_number=#{phone_number}\")\n void updateClient(@Param(\"phone_number\") String phone_number,@Param(\"user_name\") String user_name,@Param(\"sex\") String sex,@Param(\"email\") String email,@Param(\"unit\") String unit,@Param(\"place\") String place);\n\n @Select(value = \"select * from client_information where phone_number=#{phoneNumber}\")\n ClientVO selectClient(String phoneNumber);\n\n @Update(value = \"update client_information set password=#{password} where phone_number=#{phone_number}\")\n void updatePass(@Param(\"phone_number\") String phone_number,@Param(\"password\") String password);\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface GradeMapper extends EntityMapper<GradeDTO, Grade> {\n\n\n @Mapping(target = \"subjects\", ignore = true)\n @Mapping(target = \"contents\", ignore = true)\n Grade toEntity(GradeDTO gradeDTO);\n\n default Grade fromId(Long id) {\n if (id == null) {\n return null;\n }\n Grade grade = new Grade();\n grade.setId(id);\n return grade;\n }\n}", "@ProviderType\npublic interface PersonModel extends BaseModel<Person> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a person model instance should use the {@link Person} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this person.\n\t *\n\t * @return the primary key of this person\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this person.\n\t *\n\t * @param primaryKey the primary key of this person\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the uuid of this person.\n\t *\n\t * @return the uuid of this person\n\t */\n\t@AutoEscape\n\tpublic String getUuid();\n\n\t/**\n\t * Sets the uuid of this person.\n\t *\n\t * @param uuid the uuid of this person\n\t */\n\tpublic void setUuid(String uuid);\n\n\t/**\n\t * Returns the person ID of this person.\n\t *\n\t * @return the person ID of this person\n\t */\n\tpublic long getPersonId();\n\n\t/**\n\t * Sets the person ID of this person.\n\t *\n\t * @param personId the person ID of this person\n\t */\n\tpublic void setPersonId(long personId);\n\n\t/**\n\t * Returns the name of this person.\n\t *\n\t * @return the name of this person\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this person.\n\t *\n\t * @param name the name of this person\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the age of this person.\n\t *\n\t * @return the age of this person\n\t */\n\tpublic int getAge();\n\n\t/**\n\t * Sets the age of this person.\n\t *\n\t * @param age the age of this person\n\t */\n\tpublic void setAge(int age);\n\n\t/**\n\t * Returns the gender of this person.\n\t *\n\t * @return the gender of this person\n\t */\n\t@AutoEscape\n\tpublic String getGender();\n\n\t/**\n\t * Sets the gender of this person.\n\t *\n\t * @param gender the gender of this person\n\t */\n\tpublic void setGender(String gender);\n\n\t/**\n\t * Returns the email ID of this person.\n\t *\n\t * @return the email ID of this person\n\t */\n\t@AutoEscape\n\tpublic String getEmailId();\n\n\t/**\n\t * Sets the email ID of this person.\n\t *\n\t * @param emailId the email ID of this person\n\t */\n\tpublic void setEmailId(String emailId);\n\n\t/**\n\t * Returns the nationality of this person.\n\t *\n\t * @return the nationality of this person\n\t */\n\t@AutoEscape\n\tpublic String getNationality();\n\n\t/**\n\t * Sets the nationality of this person.\n\t *\n\t * @param nationality the nationality of this person\n\t */\n\tpublic void setNationality(String nationality);\n\n\t/**\n\t * Returns the occupation of this person.\n\t *\n\t * @return the occupation of this person\n\t */\n\t@AutoEscape\n\tpublic String getOccupation();\n\n\t/**\n\t * Sets the occupation of this person.\n\t *\n\t * @param occupation the occupation of this person\n\t */\n\tpublic void setOccupation(String occupation);\n\n}", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "public interface EmployeeRepository extends ArangoRepository<Employee, String> {}", "@SuppressWarnings(\"unused\")\n@Repository\n@JaversSpringDataAuditable\npublic interface ReservoirCapacityRepository extends JpaRepository<ReservoirCapacity, Long> {\n\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface EightydMapper extends EntityMapper<EightydDTO, Eightyd> {\n\n\n\n default Eightyd fromId(Long id) {\n if (id == null) {\n return null;\n }\n Eightyd eightyd = new Eightyd();\n eightyd.setId(id);\n return eightyd;\n }\n}", "public interface AllergyModelProperties extends PropertyAccess<AllergyModel> {\n ModelKeyProvider<AllergyModel> id();\n}", "@MapperScan\npublic interface AdminMapper{\n //------------------Add your code here---------------------\n\n //------------------以下代码自动生成-----------------------\n\n /**\n * 根据条件查询全部\n * 参数:\n * map里的key为属性名(字段首字母小写)\n * value为查询的条件,默认为等于\n * 要改动sql请修改 *Mapper 类里的 _query() 方法\n */\n @SelectProvider(type = AdminSql.class,method = \"_queryAll\")\n List<AdminEntity> _queryAll(Map pagerParam);\n\n /**\n * 检验账号密码\n * @param account\n * @param password\n * @return\n */\n @SelectProvider(type = AdminSql.class,method = \"check\")\n List<AdminEntity> check(@Param(\"account\") String account, @Param(\"password\") String password);\n\n /**\n * 按id查询\n * 参数:\n * id : 要查询的记录的id\n */\n @SelectProvider(type = AdminSql.class,method = \"_get\")\n AdminEntity _get(String id);\n\n /**\n * 删除(逻辑)\n * 参数:\n * id : 要删除的记录的id\n */\n @DeleteProvider(type = AdminSql.class,method = \"_delete\")\n int _delete(String id);\n\n /**\n * 删除(物理)\n * 参数:\n * id : 要删除的记录的id\n */\n @DeleteProvider(type = AdminSql.class,method = \"_deleteForce\")\n int _deleteForce(String id);\n\n /**\n * 新增\n * 参数:\n * map里的key为属性名(字段首字母小写)\n * value为要插入的key值\n */\n @InsertProvider(type = AdminSql.class,method = \"_add\")\n int _add(Map params);\n\n /**\n * 按实体类新增\n * 参数:\n * 实体类对象,必须有id属性\n */\n @InsertProvider(type = AdminSql.class,method = \"_addEntity\")\n int _addEntity(AdminEntity bean);\n\n /**\n * 更新\n * 参数:\n * id : 要更新的记录的id\n * 其他map里的参数,key为属性名(字段首字母小写)\n * value为要更新成的值\n */\n @InsertProvider(type = AdminSql.class,method = \"_update\")\n int _update(Map params);\n\n /**\n * 按实体类更新\n * 参数:\n * 实体类对象,必须有id属性\n */\n @InsertProvider(type = AdminSql.class,method = \"_updateEntity\")\n int _updateEntity(AdminEntity bean);\n\n}", "public void setupEntities() {\n }", "@Generated(\"Speedment\")\npublic interface Employee extends Entity<Employee> {\n \n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getId()} method.\n */\n public final static ComparableField<Employee, Short> ID = new ComparableFieldImpl<>(\"id\", Employee::getId, Employee::setId);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getFirstname()} method.\n */\n public final static StringField<Employee> FIRSTNAME = new StringFieldImpl<>(\"firstname\", o -> o.getFirstname().orElse(null), Employee::setFirstname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getLastname()} method.\n */\n public final static StringField<Employee> LASTNAME = new StringFieldImpl<>(\"lastname\", o -> o.getLastname().orElse(null), Employee::setLastname);\n /**\n * This Field corresponds to the {@link Employee} field that can be obtained\n * using the {@link Employee#getBirthdate()} method.\n */\n public final static ComparableField<Employee, Date> BIRTHDATE = new ComparableFieldImpl<>(\"birthdate\", o -> o.getBirthdate().orElse(null), Employee::setBirthdate);\n \n /**\n * Returns the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @return the id of this Employee\n */\n Short getId();\n \n /**\n * Returns the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @return the firstname of this Employee\n */\n Optional<String> getFirstname();\n \n /**\n * Returns the lastname of this Employee. The lastname field corresponds to\n * the database column db0.sql696688.employee.lastname.\n * \n * @return the lastname of this Employee\n */\n Optional<String> getLastname();\n \n /**\n * Returns the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @return the birthdate of this Employee\n */\n Optional<Date> getBirthdate();\n \n /**\n * Sets the id of this Employee. The id field corresponds to the database\n * column db0.sql696688.employee.id.\n * \n * @param id to set of this Employee\n * @return this Employee instance\n */\n Employee setId(Short id);\n \n /**\n * Sets the firstname of this Employee. The firstname field corresponds to\n * the database column db0.sql696688.employee.firstname.\n * \n * @param firstname to set of this Employee\n * @return this Employee instance\n */\n Employee setFirstname(String firstname);\n \n /**\n * Sets the lastname of this Employee. The lastname field corresponds to the\n * database column db0.sql696688.employee.lastname.\n * \n * @param lastname to set of this Employee\n * @return this Employee instance\n */\n Employee setLastname(String lastname);\n \n /**\n * Sets the birthdate of this Employee. The birthdate field corresponds to\n * the database column db0.sql696688.employee.birthdate.\n * \n * @param birthdate to set of this Employee\n * @return this Employee instance\n */\n Employee setBirthdate(Date birthdate);\n \n /**\n * Creates and returns a {@link Stream} of all {@link Borrowed} Entities that\n * references this Entity by the foreign key field that can be obtained using\n * {@link Borrowed#getEmployeeid()}. The order of the Entities are undefined\n * and may change from time to time.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a {@link Stream} of all {@link Borrowed} Entities that references\n * this Entity by the foreign key field that can be obtained using {@link\n * Borrowed#getEmployeeid()}\n */\n Stream<Borrowed> findBorrowedsByEmployeeid();\n \n /**\n * Creates and returns a <em>distinct</em> {@link Stream} of all {@link\n * Borrowed} Entities that references this Entity by a foreign key. The order\n * of the Entities are undefined and may change from time to time.\n * <p>\n * Note that the Stream is <em>distinct</em>, meaning that referencing\n * Entities will only appear once in the Stream, even though they may\n * reference this Entity by several columns.\n * <p>\n * Using this method, you may \"walk the graph\" and jump directly between\n * referencing Entities without using {@code JOIN}s.<p> N.B. The current\n * implementation supports lazy-loading of the referencing Entities.\n * \n * @return a <em>distinct</em> {@link Stream} of all {@link Borrowed}\n * Entities that references this Entity by a foreign key\n */\n Stream<Borrowed> findBorroweds();\n}", "@Mapper(componentModel = \"spring\", uses = {TravauxMapper.class, ChantierMapper.class, EmployeMapper.class})\npublic interface AffectationMapper extends EntityMapper<AffectationDTO, Affectation> {\n\n @Mapping(source = \"travaux.id\", target = \"travauxId\")\n @Mapping(source = \"travaux.nomTrav\", target = \"travauxNomTrav\")\n @Mapping(source = \"chantier.id\", target = \"chantierId\")\n @Mapping(source = \"chantier.nomChantier\", target = \"chantierNomChantier\")\n AffectationDTO toDto(Affectation affectation);\n\n @Mapping(source = \"travauxId\", target = \"travaux\")\n @Mapping(source = \"chantierId\", target = \"chantier\")\n Affectation toEntity(AffectationDTO affectationDTO);\n\n default Affectation fromId(Long id) {\n if (id == null) {\n return null;\n }\n Affectation affectation = new Affectation();\n affectation.setId(id);\n return affectation;\n }\n}", "EntityDefinitionVisitor getEntityDefinitionStateSetterVisitor();", "@Bean\n\t@Lazy(false)\n\tAdditionalModelsConverter additionalModelsConverter() {\n\t\treturn new AdditionalModelsConverter();\n\t}", "@Mapper\n@Repository\npublic interface StockMapper {\n\n @Insert(\"insert into product_stock(valued,product_id) values(#{valued},#{product_id})\")\n public void insertProductStock(ProductStock ProductStock);\n @Update(\"update product_stock set valued=#{valued},product_id=#{product_id} where id=#{id}\")\n public void updateProductStock(ProductStock ProductStock);\n @Delete(\"delete from product_stock where id=#{id}\")\n public void deleteProductStock(Integer id);\n @Select(\"select * from product_stock\")\n public List<ProductStock> selectAll();\n @Select(\"select * from product_stock where id=#{id}\")\n ProductStock selectById(Integer id);\n @Select(\"select * from product_stock where product_id=#{id}\")\n ProductStock findStockByProductId(Integer id);\n}", "@ProviderType\npublic interface ItemShopBasketModel extends BaseModel<ItemShopBasket> {\n\n\t/*\n\t * NOTE FOR DEVELOPERS:\n\t *\n\t * Never modify or reference this interface directly. All methods that expect a item shop basket model instance should use the {@link ItemShopBasket} interface instead.\n\t */\n\n\t/**\n\t * Returns the primary key of this item shop basket.\n\t *\n\t * @return the primary key of this item shop basket\n\t */\n\tpublic long getPrimaryKey();\n\n\t/**\n\t * Sets the primary key of this item shop basket.\n\t *\n\t * @param primaryKey the primary key of this item shop basket\n\t */\n\tpublic void setPrimaryKey(long primaryKey);\n\n\t/**\n\t * Returns the item shop basket ID of this item shop basket.\n\t *\n\t * @return the item shop basket ID of this item shop basket\n\t */\n\tpublic long getItemShopBasketId();\n\n\t/**\n\t * Sets the item shop basket ID of this item shop basket.\n\t *\n\t * @param itemShopBasketId the item shop basket ID of this item shop basket\n\t */\n\tpublic void setItemShopBasketId(long itemShopBasketId);\n\n\t/**\n\t * Returns the shop basket ID of this item shop basket.\n\t *\n\t * @return the shop basket ID of this item shop basket\n\t */\n\tpublic long getShopBasketId();\n\n\t/**\n\t * Sets the shop basket ID of this item shop basket.\n\t *\n\t * @param shopBasketId the shop basket ID of this item shop basket\n\t */\n\tpublic void setShopBasketId(long shopBasketId);\n\n\t/**\n\t * Returns the name of this item shop basket.\n\t *\n\t * @return the name of this item shop basket\n\t */\n\t@AutoEscape\n\tpublic String getName();\n\n\t/**\n\t * Sets the name of this item shop basket.\n\t *\n\t * @param name the name of this item shop basket\n\t */\n\tpublic void setName(String name);\n\n\t/**\n\t * Returns the imported of this item shop basket.\n\t *\n\t * @return the imported of this item shop basket\n\t */\n\tpublic boolean getImported();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is imported.\n\t *\n\t * @return <code>true</code> if this item shop basket is imported; <code>false</code> otherwise\n\t */\n\tpublic boolean isImported();\n\n\t/**\n\t * Sets whether this item shop basket is imported.\n\t *\n\t * @param imported the imported of this item shop basket\n\t */\n\tpublic void setImported(boolean imported);\n\n\t/**\n\t * Returns the exempt of this item shop basket.\n\t *\n\t * @return the exempt of this item shop basket\n\t */\n\tpublic boolean getExempt();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is exempt.\n\t *\n\t * @return <code>true</code> if this item shop basket is exempt; <code>false</code> otherwise\n\t */\n\tpublic boolean isExempt();\n\n\t/**\n\t * Sets whether this item shop basket is exempt.\n\t *\n\t * @param exempt the exempt of this item shop basket\n\t */\n\tpublic void setExempt(boolean exempt);\n\n\t/**\n\t * Returns the price of this item shop basket.\n\t *\n\t * @return the price of this item shop basket\n\t */\n\tpublic Double getPrice();\n\n\t/**\n\t * Sets the price of this item shop basket.\n\t *\n\t * @param price the price of this item shop basket\n\t */\n\tpublic void setPrice(Double price);\n\n\t/**\n\t * Returns the active of this item shop basket.\n\t *\n\t * @return the active of this item shop basket\n\t */\n\tpublic boolean getActive();\n\n\t/**\n\t * Returns <code>true</code> if this item shop basket is active.\n\t *\n\t * @return <code>true</code> if this item shop basket is active; <code>false</code> otherwise\n\t */\n\tpublic boolean isActive();\n\n\t/**\n\t * Sets whether this item shop basket is active.\n\t *\n\t * @param active the active of this item shop basket\n\t */\n\tpublic void setActive(boolean active);\n\n\t/**\n\t * Returns the amount of this item shop basket.\n\t *\n\t * @return the amount of this item shop basket\n\t */\n\tpublic long getAmount();\n\n\t/**\n\t * Sets the amount of this item shop basket.\n\t *\n\t * @param amount the amount of this item shop basket\n\t */\n\tpublic void setAmount(long amount);\n\n\t/**\n\t * Returns the tax of this item shop basket.\n\t *\n\t * @return the tax of this item shop basket\n\t */\n\tpublic Double getTax();\n\n\t/**\n\t * Sets the tax of this item shop basket.\n\t *\n\t * @param tax the tax of this item shop basket\n\t */\n\tpublic void setTax(Double tax);\n\n\t/**\n\t * Returns the total of this item shop basket.\n\t *\n\t * @return the total of this item shop basket\n\t */\n\tpublic Double getTotal();\n\n\t/**\n\t * Sets the total of this item shop basket.\n\t *\n\t * @param total the total of this item shop basket\n\t */\n\tpublic void setTotal(Double total);\n\n}", "@Api(tags = \"Address Entity\")\n@RepositoryRestResource(collectionResourceRel = \"taxInformation\", path =\"taxInformation\")\npublic interface TaxInformationRepository extends PagingAndSortingRepository<TaxInformation,Integer> {\n}", "public EntityPropertyBean() {}", "@Service(name = \"CustomerService\")\n@OpenlegacyDesigntime(editor = \"WebServiceEditor\")\npublic interface CustomerServiceService {\n\n public CustomerServiceOut getCustomerService(CustomerServiceIn customerServiceIn) throws Exception;\n\n @Getter\n @Setter\n public static class CustomerServiceIn {\n \n Integer id3;\n }\n \n @ApiModel(value=\"CustomerServiceOut\", description=\"\")\n @Getter\n @Setter\n public static class CustomerServiceOut {\n \n @ApiModelProperty(value=\"Getuserdetails\")\n Getuserdetails getuserdetails;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface CountryMapper extends EntityMapper<CountryDTO, Country> {\n\n\n @Mapping(target = \"cities\", ignore = true)\n @Mapping(target = \"countryLanguages\", ignore = true)\n Country toEntity(CountryDTO countryDTO);\n\n default Country fromId(Long id) {\n if (id == null) {\n return null;\n }\n Country country = new Country();\n country.setId(id);\n return country;\n }\n}", "@Repository\n@Mapper\npublic interface AppInfoMapper extends BaseMapper<AppInfoEntity> {\n}", "EntityBeanDescriptor createEntityBeanDescriptor();", "public interface AEntityProperty {\n}", "public interface SmooksTransformModel extends TransformModel {\n\n /** The \"smooks\" name. */\n public static final String SMOOKS = \"smooks\";\n\n /** The \"config\" name. */\n public static final String CONFIG = \"config\";\n \n /** The \"type\" name. */\n public static final String TYPE = \"type\";\n\n /** The \"reportPath\" name. */\n public static final String REPORT_PATH = \"reportPath\";\n \n /**\n * Gets the type attribute.\n * @return the type attribute\n */\n public String getTransformType();\n\n /**\n * Sets the type attribute.\n * @param type the type attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setTransformType(String type);\n\n /**\n * Gets the config attribute.\n * @return the config attribute\n */\n public String getConfig();\n\n\n /**\n * Sets the config attribute.\n * @param config the config attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setConfig(String config);\n\n /**\n * Gets the reportPath attribute.\n * @return the reportPath attribute\n */\n public String getReportPath();\n\n /**\n * Sets the reportPath attribute.\n * @param reportPath the reportPath attribute\n * @return this SmooksTransformModel (useful for chaining)\n */\n public SmooksTransformModel setReportPath(String reportPath);\n\n}", "@Test\n\tpublic void testGettersAndSetters() {\n\t\tnew BeanTester().testBean(LeastCommonNodeInput.class, configuration);\n\n\t}", "public interface MerchandiserEntities {\n\n static Entity outletEntity() {\n return new Entity(\n Entities.OUTLET_ENTITY,\n OutletModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletModel.name),\n field(OutletModel.address),\n field(OutletModel.qrCode),\n field(OutletModel.location, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationGps, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.locationNetwork, JavaType.OBJECT, hasOneLocation()),\n field(OutletModel.images, JavaType.ARRAY, hasManyOutletImages())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_TABLE,\n OutletTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletModel.name, OutletTable.name),\n column(OutletModel.address, OutletTable.address),\n column(OutletModel.qrCode, OutletTable.qr_code)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n Entities.locationMapping(OutletModel.location, OutletTable.location_id),\n Entities.locationMapping(OutletModel.locationGps, OutletTable.location_id_gps),\n Entities.locationMapping(OutletModel.locationNetwork, OutletTable.location_id_network),\n outletImagesMapping()\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneLocation() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n Entities.LOCATION_ENTITY\n );\n }\n\n static Relationship hasManyOutletImages() {\n return new Relationship(\n Relationship.Type.ONE_TO_MANY,\n Relationship.Name.HAS_MANY,\n Entities.OUTLET_IMAGE_ENTITY\n );\n }\n\n static VirtualRelationMappingImpl outletImagesMapping() {\n return new VirtualRelationMappingImpl(\n Entities.OUTLET_IMAGE_TABLE,\n Entities.OUTLET_IMAGE_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletModel.images,\n new RelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.YES,\n RelationMappingOptions.CascadeDelete.YES,\n true\n )\n );\n }\n\n static Entity outletImageEntity() {\n return new Entity(\n Entities.OUTLET_IMAGE_ENTITY,\n OutletImageModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n field(OutletImageModel.title),\n field(OutletImageModel.description),\n field(OutletImageModel.uri),\n field(OutletImageModel.file),\n field(OutletImageModel.fileName),\n field(OutletImageModel.height),\n field(OutletImageModel.width),\n field(OutletImageModel.outlet, JavaType.OBJECT, hasOneOutlet())\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n Entities.OUTLET_IMAGE_TABLE,\n OutletImageTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n column(OutletImageModel.title, OutletImageTable.title),\n column(OutletImageModel.description, OutletImageTable.description),\n column(OutletImageModel.uri, OutletImageTable.uri),\n column(OutletImageModel.file, OutletImageTable.file),\n column(OutletImageModel.fileName, OutletImageTable.file_name),\n column(OutletImageModel.height, OutletImageTable.height),\n column(OutletImageModel.width, OutletImageTable.width)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n ArrayBuilder.<RelationMapping>create()\n .addAll(ImmutableList.of(\n new DirectRelationMappingImpl(\n OUTLET_TABLE,\n OUTLET_ENTITY,\n ImmutableList.of(\n new ForeignColumnMapping(\n OutletImageTable.outlet_id,\n OutletTable.id\n )\n ),\n OutletImageModel.outlet,\n new DirectRelationMappingOptionsImpl(\n RelationMappingOptions.CascadeUpsert.NO,\n RelationMappingOptions.CascadeDelete.NO,\n true,\n DirectRelationMappingOptions.LoadAndDelete.LOAD_AND_DELETE\n )\n )\n ))\n .addAll(Arrays.asList(Entities.baseRelationMappingsArray()))\n .build(list -> list.toArray(new RelationMapping[list.size()]))\n )\n );\n }\n\n static Relationship hasOneOutlet() {\n return new Relationship(\n Relationship.Type.MANY_TO_ONE,\n Relationship.Name.HAS_ONE,\n OUTLET_ENTITY\n );\n }\n\n static Entity locationEntity() {\n return new Entity(\n LOCATION_ENTITY,\n LocationModel.id,\n ArrayBuilder.<Field>create()\n .addAll(ImmutableList.of(\n Entities.field(LocationModel.lat),\n Entities.field(LocationModel.lng),\n Entities.field(LocationModel.accuracy)\n ))\n .addAll(Entities.baseFields())\n .build(list -> list.toArray(new Field[list.size()])),\n new DbMapping(\n LOCATION_TABLE,\n LocationTable.id,\n ArrayBuilder.<ColumnMapping>create()\n .addAll(ImmutableList.of(\n Entities.column(LocationModel.lat, LocationTable.lat),\n Entities.column(LocationModel.lng, LocationTable.lng),\n Entities.column(LocationModel.accuracy, LocationTable.accuracy)\n ))\n .addAll(Entities.baseColumns())\n .build(list -> list.toArray(new ColumnMapping[list.size()])),\n Entities.baseRelationMappingsArray()\n )\n );\n }\n}", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "@Mapper\npublic interface UserMapper {\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return int\n */\n int registerAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param baseUser\n * @return int\n */\n int registerBaseUser(BaseUser baseUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param appUser\n * @return com.example.app.entity.BaseUser\n */\n AppUser loginAppUser(AppUser appUser);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param\n * @return java.util.List<com.example.app.entity.College>\n */\n @Select(\"select * from col\")\n List<College> allCollege();\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param user\n * @return int\n */\n int hasUser(BaseUser user);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param col_id\n * @return int\n */\n int hasCol(int col_id);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param sms\n * @return int\n */\n int registerCode(SMS sms);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param code\n * @return int\n */\n int getCode(@Param(\"code\") Integer code);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrder(Order order);\n /**\n * 功能描述\n * @author xgl\n * @date 2019/12/12\n * @param order\n * @return int\n */\n int insertOrderCount(Order order);\n\n}", "@Test\n\tpublic void testSettersAddress() {\n\t\tassertTrue(beanTester.testSetters());\n\t}", "@Repository\npublic interface UserMapper {\n /**\n * 添加用户\n * @param user\n * @return\n */\n Integer addUser(User user);\n}", "@RepositoryRestResource\npublic interface WebsiteRepository extends JpaRepository<WebsiteEntity, Long> {\n\n}", "@Mapper(componentModel = \"spring\", uses = {UserMapper.class, })\npublic interface PeopleMapper extends EntityMapper <PeopleDTO, People> {\n\n @Mapping(source = \"user.id\", target = \"userId\")\n @Mapping(source = \"user.firstName\", target = \"userFirstName\")\n @Mapping(source = \"user.lastName\", target = \"userLastName\")\n PeopleDTO toDto(People people);\n\n @Mapping(source = \"userId\", target = \"user\")\n @Mapping(target = \"seminarsPresenteds\", ignore = true)\n @Mapping(target = \"seminarsAttendeds\", ignore = true)\n @Mapping(target = \"specialGuestAts\", ignore = true)\n People toEntity(PeopleDTO peopleDTO);\n default People fromId(Long id) {\n if (id == null) {\n return null;\n }\n People people = new People();\n people.setId(id);\n return people;\n }\n\n default String peopleName(People people) {\n String name = \"\";\n if (people == null) {\n return null;\n }\n if (people.getUser() == null) {\n return null;\n }\n String firstName = people.getUser().getFirstName();\n if (firstName != null) {\n name += firstName;\n }\n String lastName = people.getUser().getLastName();\n if (lastName != null) {\n name += \" \" + lastName;\n }\n return name;\n }\n}", "public interface ApplyOrderMapper extends CrudRepository<OrderEntity, Long> {\n}", "public interface HealthBlockRecordsDataService extends MotechDataService<HealthBlock> {\n\n /**\n * finds the Health Block details by its parent code\n *\n * @param stateCode\n * @param districtCode\n * @param talukaCode\n * @param healthBlockCode\n * @return HealthBlock\n */\n @Lookup\n HealthBlock findHealthBlockByParentCode(@LookupField(name = \"stateCode\") Long stateCode, @LookupField(name = \"districtCode\") Long districtCode,\n @LookupField(name = \"talukaCode\") Long talukaCode, @LookupField(name = \"healthBlockCode\") Long healthBlockCode);\n\n}", "@JsonGetter(\"product_details\")\n public ProductData getProductDetails ( ) { \n return this.productDetails;\n }", "@Repository(\"productTypeMapper\")\npublic interface ProductTypeMapper extends CommonMapper<ProductTypeInfo> {\n}", "@Repository\npublic interface EmployeeStoreRepository extends JpaRepository<EmployeeStore,String>{\n\n}", "@Mapper(componentModel = \"spring\", uses = {AanvraagberichtMapper.class})\npublic interface FdnAanvragerMapper extends EntityMapper<FdnAanvragerDTO, FdnAanvrager> {\n\n @Mapping(source = \"aanvraagbericht.id\", target = \"aanvraagberichtId\")\n FdnAanvragerDTO toDto(FdnAanvrager fdnAanvrager);\n\n @Mapping(target = \"adres\", ignore = true)\n @Mapping(target = \"legitimatiebewijs\", ignore = true)\n @Mapping(target = \"werksituaties\", ignore = true)\n @Mapping(target = \"gezinssituaties\", ignore = true)\n @Mapping(target = \"financieleSituaties\", ignore = true)\n @Mapping(source = \"aanvraagberichtId\", target = \"aanvraagbericht\")\n FdnAanvrager toEntity(FdnAanvragerDTO fdnAanvragerDTO);\n\n default FdnAanvrager fromId(Long id) {\n if (id == null) {\n return null;\n }\n FdnAanvrager fdnAanvrager = new FdnAanvrager();\n fdnAanvrager.setId(id);\n return fdnAanvrager;\n }\n}", "public interface TdHtFuncroleRelRepository {\n\n /**\n * @Purpose 根据id查找角色id和功能id\n * @version 4.0\n * @author lizhun\n * @param map\n * @return TdHtFuncroleRelDto\n */\n public TdHtFuncroleRelDto findFuncroleRelByRoleIdAndFuncId(Map<String,Integer> map);\n\n /**\n * @Purpose 根据权限id查找角色权限关联信息\n * @version 4.0\n * @author lizhun\n * @param role_id\n * @return List<TdHtFuncroleRelDto>\n */\n public List<TdHtFuncroleRelDto> findFuncroleRelsByRoleId(int role_id);\n /**\n * @Purpose 添加角色权限关联信息\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void insertFuncroleRel(TdHtFuncroleRelDto TdHtFuncroleRelDto);\n /**\n * @Purpose 修改角色限关联信息\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void updateFuncroleRel(TdHtFuncroleRelDto TdHtFuncroleRelDto);\n /**\n * @Purpose 修改角色所有功能不可用\n * @version 4.0\n * @author lizhun\n * @return void\n */\n public void updateFuncroleRelByRoleId(int role_id);\n}", "@Mapper\npublic interface SkuMapper {\n\n\n @Select(\"select * from Sku\")\n List<SkuParam> getAll();\n\n @Insert(value = {\"INSERT INTO Sku (skuName,price,categoryId,brandId,description) VALUES (#{skuName},#{price},#{categoryId},#{brandId},#{description})\"})\n @Options(useGeneratedKeys=true, keyProperty=\"skuId\")\n int insertLine(Sku sku);\n\n// @Insert(value = {\"INSERT INTO Sku (categoryId,brandId) VALUES (2,1)\"})\n// @Options(useGeneratedKeys=true, keyProperty=\"SkuId\")\n// int insertLine(Sku sku);\n\n @Delete(value = {\n \"DELETE from Sku WHERE skuId = #{skuId}\"\n })\n int deleteLine(@Param(value = \"skuId\") Long skuId);\n\n// @Insert({\n// \"<script>\",\n// \"INSERT INTO\",\n// \"CategoryAttributeGroup(id,templateId,name,sort,createTime,deleted,updateTime)\",\n// \"<foreach collection='list' item='obj' open='values' separator=',' close=''>\",\n// \" (#{obj.id},#{obj.templateId},#{obj.name},#{obj.sort},#{obj.createTime},#{obj.deleted},#{obj.updateTime})\",\n// \"</foreach>\",\n// \"</script>\"\n// })\n// Integer createCategoryAttributeGroup(List<CategoryAttributeGroup> categoryAttributeGroups);\n\n @Update(\"UPDATE Sku SET skuName = #{skuName} WHERE skuId = #{skuId}\")\n int updateLine(@Param(\"skuId\") Long skuId,@Param(\"skuName\")String skuName);\n\n\n @Select({\n \"<script>\",\n \"SELECT\",\n \"s.SkuName,c.categoryName,s.categoryId,b.brandName,s.price\",\n \"FROM\",\n \"Sku AS s\",\n \"JOIN\",\n \"Category AS c ON s.categoryId = c.categoryId\",\n \"JOIN\",\n \"Brand AS b ON s.brandId = b.brandId\",\n \"WHERE 1=1\",\n //范围查询,根据时间\n \"<if test=\\\" null != higherSkuParam.startTime and null != higherSkuParam.endTime \\\">\",\n \"AND s.updateTime &gt;= #{higherSkuParam.startTime}\",\n \"AND s.updateTime &lt;= #{ higherSkuParam.endTime}\",\n \"</if>\",\n //模糊查询,根据类别\n\n \"<if test=\\\"null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName\\\">\",\n \" AND c.categoryName LIKE CONCAT('%', #{higherSkuParam.categoryName}, '%')\",\n \"</if>\",\n\n //模糊查询,根据品牌\n\n \"<if test=\\\"null != higherSkuParam.brandName and ''!=higherSkuParam.brandName\\\">\",\n \" AND b.brandName LIKE CONCAT('%', #{higherSkuParam.brandName}, '%')\",\n \"</if>\",\n\n\n //模糊查询,根据商品名字\n \"<if test=\\\"null != higherSkuParam.skuName and ''!=higherSkuParam.skuName\\\">\",\n \" AND s.skuName LIKE CONCAT('%', #{higherSkuParam.skuName}, '%')\",\n \"</if>\",\n\n\n //根据多个类别查询\n \"<if test=\\\" null != higherSkuParam.categoryIds and higherSkuParam.categoryIds.size>0\\\" >\",\n \"AND s.categoryId IN\",\n \"<foreach collection=\\\"higherSkuParam.categoryIds\\\" item=\\\"data\\\" index=\\\"index\\\" open=\\\"(\\\" separator=\\\",\\\" close=\\\")\\\" >\",\n \" #{data} \",\n \"</foreach>\",\n \"</if>\",\n \"</script>\"\n })\n List<HigherSkuDTO> higherSelect(@Param(\"higherSkuParam\")HigherSkuParam higherSkuParam);\n\n\n\n// \"<if test=\\\" null != higherSkuParam.categoryName and ''!=higherSkuParam.categoryName \\\" >\",\n// \" AND c.categoryName LIKE \\\"%#{higherSkuParam.categoryName}%\\\" \",\n// \"</if>\",\n// \"<if test=\\\" null != higherSkuParam.skuName \\\" >\",\n// \"AND s.skuName LIKE \\\"%#{higherSkuParam.skuName}%\\\" \",\n// \"</if>\",\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface PerformerMapper extends EntityMapper<PerformerDTO, Performer> {\n\n\n\n default Performer fromId(Long id) {\n if (id == null) {\n return null;\n }\n Performer performer = new Performer();\n performer.setId(id);\n return performer;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TarifLineMapper extends EntityMapper <TarifLineDTO, TarifLine> {\n \n \n default TarifLine fromId(Long id) {\n if (id == null) {\n return null;\n }\n TarifLine tarifLine = new TarifLine();\n tarifLine.setId(id);\n return tarifLine;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {ProvinciaMapper.class})\npublic interface CodigoPostalMapper extends EntityMapper<CodigoPostalDTO, CodigoPostal> {\n\n @Mapping(source = \"provincia.id\", target = \"provinciaId\")\n @Mapping(source = \"provincia.nombreProvincia\", target = \"provinciaNombreProvincia\")\n CodigoPostalDTO toDto(CodigoPostal codigoPostal);\n\n @Mapping(source = \"provinciaId\", target = \"provincia\")\n CodigoPostal toEntity(CodigoPostalDTO codigoPostalDTO);\n\n default CodigoPostal fromId(Long id) {\n if (id == null) {\n return null;\n }\n CodigoPostal codigoPostal = new CodigoPostal();\n codigoPostal.setId(id);\n return codigoPostal;\n }\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface TemplateFormulaireMapper extends EntityMapper<TemplateFormulaireDTO, TemplateFormulaire> {\n\n\n @Mapping(target = \"questions\", ignore = true)\n TemplateFormulaire toEntity(TemplateFormulaireDTO templateFormulaireDTO);\n\n default TemplateFormulaire fromId(Long id) {\n if (id == null) {\n return null;\n }\n TemplateFormulaire templateFormulaire = new TemplateFormulaire();\n templateFormulaire.setId(id);\n return templateFormulaire;\n }\n}", "public sealed interface EntityMapper<D, E>permits CarMapper,\n ModelMapper, ModelOptionMapper, PricingClassMapper, UserInfoMapper,\n TownMapper, AddressMapper, RoleMapper, BookingMapper, RentMapper {\n\n E toEntity(D dto);\n\n D toDto(E entity);\n\n Collection<E> toEntity(Collection<D> dtoList);\n\n Collection<D> toDto(Collection<E> entityList);\n\n @Named(\"partialUpdate\")\n @BeanMapping(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)\n void partialUpdate(@MappingTarget E entity, D dto);\n}", "public interface EntitySource extends IdentifiableTypeSource, ToolingHintContextContainer, EntityNamingSourceContributor {\n\t/**\n\t * Obtain the primary table for this entity.\n\t *\n\t * @return The primary table.\n\t */\n\tpublic TableSpecificationSource getPrimaryTable();\n\n\t/**\n\t * Obtain the secondary tables for this entity\n\t *\n\t * @return returns an iterator over the secondary tables for this entity\n\t */\n\tpublic Map<String,SecondaryTableSource> getSecondaryTableMap();\n\n\tpublic String getXmlNodeName();\n\n\t/**\n\t * Obtain the named custom tuplizer classes to be used.\n\t *\n\t * @return The custom tuplizer class names\n\t */\n\tpublic Map<EntityMode,String> getTuplizerClassMap();\n\n\t/**\n\t * Obtain the name of a custom persister class to be used.\n\t *\n\t * @return The custom persister class name\n\t */\n\tpublic String getCustomPersisterClassName();\n\n\t/**\n\t * Is this entity lazy (proxyable)?\n\t *\n\t * @return {@code true} indicates the entity is lazy; {@code false} non-lazy.\n\t */\n\tpublic boolean isLazy();\n\n\t/**\n\t * For {@link #isLazy() lazy} entities, obtain the interface to use in constructing its proxies.\n\t *\n\t * @return The proxy interface name\n\t */\n\tpublic String getProxy();\n\n\t/**\n\t * Obtain the batch-size to be applied when initializing proxies of this entity.\n\t *\n\t * @return returns the the batch-size.\n\t */\n\tpublic int getBatchSize();\n\n\t/**\n\t * Is the entity abstract?\n\t * <p/>\n\t * The implication is whether the entity maps to a database table.\n\t *\n\t * @return {@code true} indicates the entity is abstract; {@code false} non-abstract; {@code null}\n\t * indicates that a reflection check should be done when building the persister.\n\t */\n\tpublic Boolean isAbstract();\n\n\t/**\n\t * Did the source specify dynamic inserts?\n\t *\n\t * @return {@code true} indicates dynamic inserts will be used; {@code false} otherwise.\n\t */\n\tpublic boolean isDynamicInsert();\n\n\t/**\n\t * Did the source specify dynamic updates?\n\t *\n\t * @return {@code true} indicates dynamic updates will be used; {@code false} otherwise.\n\t */\n\tpublic boolean isDynamicUpdate();\n\n\t/**\n\t * Did the source specify to perform selects to decide whether to perform (detached) updates?\n\t *\n\t * @return {@code true} indicates selects will be done; {@code false} otherwise.\n\t */\n\tpublic boolean isSelectBeforeUpdate();\n\n\t/**\n\t * Obtain the name of a named-query that will be used for loading this entity\n\t *\n\t * @return THe custom loader query name\n\t */\n\tpublic String getCustomLoaderName();\n\n\t/**\n\t * Obtain the custom SQL to be used for inserts for this entity\n\t *\n\t * @return The custom insert SQL\n\t */\n\tpublic CustomSql getCustomSqlInsert();\n\n\t/**\n\t * Obtain the custom SQL to be used for updates for this entity\n\t *\n\t * @return The custom update SQL\n\t */\n\tpublic CustomSql getCustomSqlUpdate();\n\n\t/**\n\t * Obtain the custom SQL to be used for deletes for this entity\n\t *\n\t * @return The custom delete SQL\n\t */\n\tpublic CustomSql getCustomSqlDelete();\n\n\t/**\n\t * Obtain any additional table names on which to synchronize (auto flushing) this entity.\n\t *\n\t * @return Additional synchronized table names or 0 sized String array, never return null.\n\t */\n\tpublic String[] getSynchronizedTableNames();\n\n\t/**\n\t * Get the actual discriminator value in case of a single table inheritance\n\t *\n\t * @return the actual discriminator value in case of a single table inheritance or {@code null} in case there is no\n\t * explicit value or a different inheritance scheme\n\t */\n\tpublic String getDiscriminatorMatchValue();\n\n\t/**\n\t * @return returns the source information for constraints defined on the table\n\t */\n\tpublic Collection<ConstraintSource> getConstraints();\n\n\t/**\n\t * Obtain the filters for this entity.\n\t *\n\t * @return returns an array of the filters for this entity.\n\t */\n\tpublic FilterSource[] getFilterSources();\n\n\tpublic List<JaxbHbmNamedQueryType> getNamedQueries();\n\n\tpublic List<JaxbHbmNamedNativeQueryType> getNamedNativeQueries();\n\n\tpublic TruthValue quoteIdentifiersLocalToEntity();\n\n}", "@Mapper\npublic interface ProductMapper {\n\n @Select(\"select * from t_product\")\n List<Product> findAll();\n\n void save(String productName, Integer productInventory);\n\n void save(Product product);\n}", "@JsonGetter(\"price_money\")\r\n public Money getPriceMoney() {\r\n return priceMoney;\r\n }", "public interface ApiBaseUserRolePostSwitchPoService extends feihua.jdbc.api.service.ApiBaseService<BaseUserRolePostSwitchPo, BaseUserRolePostSwitchDto, String> {\n\n /**\n * 根据用户查询\n * @param userId\n * @return\n */\n BaseUserRolePostSwitchPo selectByUserId(String userId);\n}", "public interface AutoParamsRepository {\n AvtoParams getAvtoParamsById(@Param(\"id\")UUID id);\n /* void addAvtoParams(@Param(\"avtoParams\") AvtoParams avtoParams);\n void updateAvtoParams(@Param(\"avtoParams\") AvtoParams avtoParams);\n void deleteAvtoParams(@Param(\"id\")UUID id);*/\n}", "@Bean\n\tpublic ExtendedMetadata extendedMetadata() {\n\t\tExtendedMetadata extendedMetadata = new ExtendedMetadata();\n\t\textendedMetadata.setIdpDiscoveryEnabled(true);\n\t\textendedMetadata.setSignMetadata(false);\n\t\textendedMetadata.setEcpEnabled(true);\n\t\treturn extendedMetadata;\n\t}", "@Mapper(componentModel = \"spring\", uses = {ClientMapper.class, UserAppMapper.class, DistrictMapper.class})\npublic interface CampusMapper extends EntityMapper<CampusDTO, Campus> {\n\n @Mapping(source = \"client\", target = \"clientDto\")\n @Mapping(source = \"district\", target = \"districtDto\")\n CampusDTO toDto(Campus campus);\n\n @Mapping(source = \"clientDto\", target = \"client\")\n @Mapping(source = \"districtDto\", target = \"district\")\n @Mapping(target = \"fields\", ignore = true)\n Campus toEntity(CampusDTO campusDTO);\n\n default Campus fromId(Long id) {\n if (id == null) {\n return null;\n }\n Campus campus = new Campus();\n campus.setId(id);\n return campus;\n }\n}", "public interface OrderMasterRepository extends JpaRepository<OrderMaster,String> {\n\n\n\n\n\n}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Repository(value = \"userMapper\")\npublic interface UserMapper {\n public UserVO getUserInfo(String username);\n public List<String> readAuthority(String username);\n public String test();\n}", "public interface ValueSetter<TEntity, T> {\n void setValue(TEntity entity, T value);\n}", "@Mapper(componentModel = \"spring\", uses = {})\npublic interface OrderPaymentMapper extends EntityMapper<OrderPaymentDTO, OrderPayment> {\n\n\n\n default OrderPayment fromId(Long id) {\n if (id == null) {\n return null;\n }\n OrderPayment orderPayment = new OrderPayment();\n orderPayment.setId(id);\n return orderPayment;\n }\n}", "@JsonGetter(\"salary\")\n public int getSalary ( ) { \n return this.salary;\n }", "@Mapper(componentModel = \"spring\", uses = {UserMapper.class, CustomerMapper.class})\npublic interface WorkDayMapper extends EntityMapper<WorkDayDTO, WorkDay> {\n\n @Mapping(source = \"user.id\", target = \"userId\")\n @Mapping(source = \"user.login\", target = \"userLogin\")\n @Mapping(source = \"customer.id\", target = \"customerId\")\n WorkDayDTO toDto(WorkDay workDay);\n\n @Mapping(source = \"userId\", target = \"user\")\n @Mapping(source = \"customerId\", target = \"customer\")\n WorkDay toEntity(WorkDayDTO workDayDTO);\n\n default WorkDay fromId(Long id) {\n if (id == null) {\n return null;\n }\n WorkDay workDay = new WorkDay();\n workDay.setId(id);\n return workDay;\n }\n}", "@Test\n\tpublic void testGettersAddress() {\n\t\tassertTrue(beanTester.testGetters());\n\t}", "@RooJpaRepository(entity = ProductTaxRates.class)\npublic interface ProductTaxRatesRepository {\n}", "public interface WhereHqlGetter {\n /**\n * 生成查询的hql语句\n *\n * @param entityName 要查询的实体名称\n * @param modelName 实体在查询中的别名\n * @param enableSort 启用排序\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getWhereHql(String entityName, String modelName, boolean enableSort);\n\n /**\n * 生成查询条数的语句\n * @param entityName\n * @param modelName\n * @return\n */\n KeyValuePair<String, Map<String, Object>> getCountHql(String entityName, String modelName);\n}", "public interface MetaRepository extends JpaRepository<T_metas, Integer> {\n\n}", "public interface EmployeeRepository extends CrudRepository<Employee, Long>{\n}", "public interface IEntity {\n\n Location getLocation();\n\n void setLocation(Location newLocation);\n\n}", "@Test\n\tpublic void testGettersAndSetters() {\n\t\tnew BeanTester().testBean(ShortestPathOutput.class, configuration);\n\t}", "@Mapper\npublic interface BCategoriesMapper {\n\n @Select(\"select * from t_categories\")\n List<CategoriesPo> findAll();\n\n @Select(\"select id,categoriesName,cAbbreviate from t_categories where id=#{id}\")\n CategoriesPo getById(@Param(\"id\") int id);\n\n @Insert(\"insert ignore into t_categories(categoriesName,cAbbreviate) values(#{categoriesName},#{cAbbreviate})\")\n boolean save(@Param(\"categoriesName\") String categoriesName, @Param(\"cAbbreviate\") String cAbbreviate);\n\n @Update(\"update t_categories set categoriesName=#{categoriesName},cAbbreviate=#{cAbbreviate} where id=#{id}\")\n boolean edit(@Param(\"id\") int id, @Param(\"categoriesName\") String categoriesName, @Param(\"cAbbreviate\") String cAbbreviate);\n\n @Delete(\"delete from t_categories where id=#{id}\")\n boolean deleteById(@Param(\"id\") int id);\n}", "@RooJpaRepositoryCustom(entity = LoanItem.class)\npublic interface LoanItemRepositoryCustom {\n}", "@SuppressWarnings(\"deprecation\")\npublic interface SyntheticModelProviderPlugin extends Plugin<ModelContext> {\n /**\n * Creates a synthetic model\n *\n * @param context - context to create the model from\n * @return model - when the plugin indicates it supports it, it must return a model\n */\n springfox.documentation.schema.Model create(ModelContext context);\n\n /**\n * Creates a synthetic model properties\n *\n * @param context - context to create the model properties from\n * @return model - when the plugin indicates it supports it, it must provide properties by name\n */\n List<springfox.documentation.schema.ModelProperty> properties(ModelContext context);\n\n\n /**\n * Creates a synthetic model\n *\n * @param context - context to create the model from\n * @return model - when the plugin indicates it supports it, it must return a model\n */\n ModelSpecification createModelSpecification(ModelContext context);\n\n /**\n * Creates a synthetic model properties\n *\n * @param context - context to create the model properties from\n * @return model - when the plugin indicates it supports it, it must provide properties by name\n */\n List<PropertySpecification> propertySpecifications(ModelContext context);\n\n /**\n * Creates a dependencies for the synthetic model\n *\n * @param context - context to create the model dependencies from\n * @return model - when the plugin indicates it supports it, it may return dependent model types.\n */\n Set<ResolvedType> dependencies(ModelContext context);\n}", "@Override\n public Entity getEntity() {\n return super.getEntity();\n }", "public interface WarehouseService {\n\n /**\n * This method returns all warehouses data from database by calling respective repository methods.\n *\n * @return set of {@link Warehouse}s\n */\n Set<Warehouse> getAllWarehouses();\n\n}", "@Override\n public void loadEntityDetails() {\n \tsuper.loadEntityDetails();\n }" ]
[ "0.62918586", "0.6070626", "0.5624308", "0.55707645", "0.5542136", "0.5499789", "0.54704744", "0.54322296", "0.54183644", "0.53788567", "0.53535837", "0.5329865", "0.5316571", "0.52932686", "0.52802354", "0.52791643", "0.5273476", "0.52728873", "0.5265326", "0.5250299", "0.52486444", "0.5246695", "0.52451116", "0.52246445", "0.5224334", "0.5212614", "0.51979995", "0.5192258", "0.5188875", "0.5186623", "0.5182999", "0.51760554", "0.516158", "0.51538235", "0.5149779", "0.5149053", "0.5130562", "0.5124816", "0.5123885", "0.51163465", "0.51116854", "0.51097196", "0.510531", "0.5100704", "0.5098756", "0.5093789", "0.5081758", "0.5079948", "0.5079451", "0.5078827", "0.5073812", "0.5073102", "0.50687516", "0.50647384", "0.50612396", "0.5061121", "0.5056036", "0.50559765", "0.5053647", "0.5053439", "0.50504637", "0.50475407", "0.50440663", "0.5041713", "0.50323486", "0.50317115", "0.50277066", "0.50223887", "0.5022175", "0.50195056", "0.50129944", "0.5012259", "0.5011199", "0.50103503", "0.50090843", "0.5005412", "0.5005219", "0.49999064", "0.4989339", "0.498916", "0.49886513", "0.49835443", "0.49815464", "0.4979241", "0.49768957", "0.49757135", "0.49740416", "0.4973741", "0.49706674", "0.49658066", "0.49639645", "0.49588543", "0.49543446", "0.49513358", "0.49448678", "0.4942735", "0.49339324", "0.49339297", "0.49308175", "0.49304715", "0.49271443" ]
0.0
-1
Creates a new instance of ProtoVehicle
public ProtoVehicle() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "Vehicle createVehicle();", "Vehicle createVehicle();", "public Vehicle(){}", "public Vehicle() {}", "public Vehicle() {\n\n\t}", "public Vehicle() {\n }", "VehicleClass() {}", "private Vehicle(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public VehicleType() {\n }", "public VehicleType() { }", "public Vehicle2D() {\n }", "public ProtoVehicle(int size) {\n super(size);\n }", "public VehicleTypeTO()\r\n {\r\n }", "public Vehicle() {\r\n\t\tthis.numOfDoors = 4;\r\n\t\tthis.price = 1;\r\n\t\tthis.yearMake = 2019;\r\n\t\tthis.make = \"Toyota\";\r\n\t}", "public Vehicle(VehicleType type) {\n\t\tthis.type = type;\n\t}", "public Vehicle(Vehicle vehicle) {\r\n\r\n\t\tthis.make = vehicle.make;\r\n\t\tthis.yearMake = vehicle.yearMake;\r\n\t\tthis.numOfDoors = vehicle.numOfDoors;\r\n\t\tthis.price = vehicle.price;\r\n\t}", "public Vehicle()\n {\n name = \"none\";\n cost = 0;\n }", "public VehicleInfoAvro() {}", "public AbstractVehicle() {\n // Dispatcher is a singleton\n this.dispatcher = StoreDispatcher.getInstance();\n this.distanceFromEachStore = this.dispatcher.registerVehicle(this);\n this.availableForDelivery = true;\n VIN = UUID.randomUUID();\n }", "public Vehicle(String vehicleName, int vehiclePerformance, int vehiclePrice) {\n\n super(vehicleName, vehiclePerformance, vehiclePrice);\n }", "private VehicleType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public <T extends Vehicle> T getVehicle(Class<T> tClass){\n try {\n return tClass.getConstructor().newInstance();\n } catch (Exception e){\n throw new RuntimeException(\"Cannot create a vehicle of type: \" + tClass, e);\n }\n }", "public Vehicle(String carClass, BigDecimal price) {\n this.carClass = carClass;\n this.price = price;\n }", "private static Vehicle GetNewVehicle()\n {\n System.out.println(\"What type of vehicle is this?\");\n System.out.println(\" - Enter 1 for 'Car'\");\n System.out.println(\" - Enter 2 for 'Truck'\");\n System.out.println(\" - Enter 3 for 'Motorcycle'\");\n int vType = in.nextInt();\n in.nextLine(); //clear buffer or loop will break\n Vehicle v = null;\n switch (vType)\n {\n case 1:\n v = new Car();\n break;\n case 2:\n v = new Truck();\n System.out.println(\"Is this a four wheel drive?\");\n String s = in.nextLine();\n if (s.toUpperCase().indexOf(\"Y\") == 0)\n {\n Truck t = (Truck)v;\n t.toggleFourWheelDrive(true);\n }\n break;\n case 3:\n v = new Motorcycle();\n break;\n }\n System.out.println(\"What is the VIN?\");\n v.setVIN(in.nextLine());\n System.out.println(\"What is the Make?\");\n v.setMake(in.nextLine());\n System.out.println(\"What is the Model?\");\n v.setModel(in.nextLine());\n System.out.println(\"What is the Year\");\n v.setYear(in.nextInt());\n in.nextLine(); //clear buffer\n System.out.println(\"What is the Mileage\");\n v.setMileage(in.nextDouble());\n in.nextLine(); //clear buffer\n return v;\n }", "public static NewVehiclePG newVehiclePG(VehiclePG prototype) {\n return new VehiclePGImpl(prototype);\n }", "public Vehicle(String vin, VehicleType vehicleType, String model, Double amount) {\r\n if (vin == null || vin.length() < 1 || vin.length() > 17 || vehicleType == null || model == null || model.length() < 1 || amount < 0) {\r\n throw new RuntimeException(\"Constructor Vehicle: insertion not valid.\");\r\n }\r\n this.vin = vin;\r\n this.vehicleType = vehicleType;\r\n this.model = model;\r\n this.amount = amount;\r\n }", "public Vehicle(){\n System.out.println(\"Parking a unknown model Vehicle\");\n numberOfVehicle++;\n }", "public Vehicle getVehicle() {\n\t\treturn new Vehicle(\"越野车\",\"LSW12333\",\"通用凯迪拉克\");\r\n\t}", "public Vehicle(int id) \n\t{\n\t\t// each vehicle has a different identifying number\n\t\tthis.id = id;\n\t}", "private Car(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "Vehicle(int p, int f, int m) {\n\t\tpassengers = p;\n\t\tfuelcap = f;\n\t\tmpg = m;\n\t}", "public Servos() {\n\n }", "public VehicleFragment() {\r\n }", "public TurnoVOClient() {\r\n }", "protected Vehicle() {\n setColor(Color.WHITE);\n setEnginePower(100);\n }", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "@Override\n public JokerVehicle clone(){\n return new JokerVehicle();\n }", "Instance createInstance();", "public Vehicle(int year, String make, String model, BigDecimal msrp) {\n\t\tthis.year = year; \n\t\tthis.make = cleanMake(make);\n\t\tthis.model = cleanModel(model);\n\t\tthis.msrp = msrp; \n\t}", "public Vehicle(String make, int yearMake, int numOfDoors, double price) {\r\n\r\n\t\tthis.yearMake = yearMake;\r\n\t\tthis.make = make;\r\n\t\tthis.numOfDoors = numOfDoors;\r\n\t\tthis.price = price;\r\n\t}", "public Car(){\n\t\t\n\t}", "public static Vehicle newCar(TimeServer ts, VehicleAcceptor va) {\n\t\t\n\t\tCar c = new Car(ts, va);\n\t\treturn c;\n\t\t\n\t}", "Parcelle createParcelle();", "public Car() {\n }", "public Partage() {\n }", "public static com.datawhisperers.restfulexample.avromodel.VehicleInfoAvro.Builder newBuilder() {\n return new com.datawhisperers.restfulexample.avromodel.VehicleInfoAvro.Builder();\n }", "Vehicle() \n {\n System.out.println(\"Constructor of the Super class called\");\n noOfTyres = 5;\n accessories = true;\n brand = \"X\";\n counter++;\n }", "public Vehicle(int year, String make, String model) {\n\t\tsuper();\n\t\tYear = year;\n\t\tMake = make;\n\t\tModel = model;\n\t}", "public static Vehicle createVehicle(String color) {\n\t\tVehicle newVehicle = vehiclesCache.computeIfAbsent(color, newColor -> {\n\t\t\t// Creates the new car.\n\t\t\tEngine newEngine = new Engine();\n\t\t\treturn new Car(newEngine, newColor);\n\t\t});\n\t\treturn newVehicle;\n\t}", "public Car() {\n }", "public VibrationalStructureInfo() {\n }", "private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public VehicleViewRecord() {\n super(VehicleView.VEHICLE_VIEW);\n }", "public VehicleList() {\n\t\tvehicles = new ArrayList<Vehicle>();\n\t}", "public Carrier() {\n }", "public static BII createEntity() {\n BII bII = new BII()\n .name(DEFAULT_NAME)\n .type(DEFAULT_TYPE)\n .biiId(DEFAULT_BII_ID)\n .detectionTimestamp(DEFAULT_DETECTION_TIMESTAMP)\n .sourceId(DEFAULT_SOURCE_ID)\n .detectionSystemName(DEFAULT_DETECTION_SYSTEM_NAME)\n .detectedValue(DEFAULT_DETECTED_VALUE)\n .detectionContext(DEFAULT_DETECTION_CONTEXT)\n .etc(DEFAULT_ETC)\n .etcetc(DEFAULT_ETCETC);\n return bII;\n }", "public static Price fromProto(CreateRequest proto) {\n Price price = new Price();\n price.setPrice(proto.getPrice());\n price.setProduct_id(proto.getProductId());\n return price;\n }", "public Car() {\r\n super();\r\n }", "public BasicDriveTeleOp() {\n\n }", "public void create(){}", "public EmoticonBO()\n {}", "public PedometerEntity() {\n }", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public VehicleManagement(String VE_FILE) throws VehicleException {\n if (VE_FILE.equals(\"\")) {\n throw new VehicleException(\"The URL of Vehicle data file can't be empty!\");\n } else {\n //Inits the URL of data file that stores Vehicle bank\n this.VE_FILE = VE_FILE;\n\n //Creates empty Vehicle bank\n this.vehicles = new ArrayList<Vehicle>();\n\n //So, the number of Vehicle is 0\n this.numberOfVehicle = 0;\n }\n }", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public Car() {\n super();\n }", "public boolean createVehicle(Vehicle incomingVehicle){\n if(incomingVehicle.isWellFormed()){\n try {\n incomingVehicle.save();\n return true;\n } catch (ParseException ex) {\n String message = \"VehicleParseEngine - We failed to create the Vehicle!\";\n Logger.getLogger(MotoLogEngine.class.getName()).log(Level.SEVERE, message, ex);\n return false;\n } \n }else{\n String message = \"VehicleParseEngine - Vehicle object was not well formed, not creating vehicle!\";\n Logger.getLogger(MotoLogEngine.class.getName()).log(Level.WARNING, message);\n return false;\n }\n }", "public Vehicle(boolean vertical, boolean direction, int x, int y) {\n\t\tthis.vertical = vertical;\n\t\tthis.direction = direction;\n\t\tspeed = (int)(Math.random()*10) + 20;\n\t\tid = (int)(Math.random()*carNumbers);\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public VisionSubsystem() {\n\n }", "public Vehicle addVehicle(NewVehicle newVehicle){\n\t\tif (newVehicle.getId()==null || newVehicle.getOriginId()==null ||\n\t\t\tnewVehicle.getDestinationId()==null || newVehicle.getType()==null)\n\t\t\treturn null;\n\t\t\n\t\tVehicle v = (new ObjectFactory()).createVehicle();\n\t\t\n\t\tv.setId(newVehicle.getId());\n\t\tv.setSelf(buildVehicleUriFromId(v.getId()));\n\t\tXMLGregorianCalendar now = getNow();\n\n\t\tv.setEntryTime(now);\n\t\tv.setOriginUri(this.buildPlaceUriFromId(newVehicle.getOriginId()));\n\t\tv.setDestinationUri(this.buildPlaceUriFromId(newVehicle.getDestinationId()));\n\t\tv.setPositionUri(v.getOriginUri());\n\t\tv.setType(newVehicle.getType());\n\t\tv.setState(VehicleState.IN_TRANSIT);\n\t\tv.setPlacePathUri(v.getSelf() + \"/suggestedPath\");\n\t\tsetLastModifiedDateNow(v);\n\t\tsynchronized(this.getVehicleLock()){\n\t\t\tthis.addVehicle(v);\n\t\t\treturn v;\n\t\t}\n\t}", "Flight() {}", "public PetrinetmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "InstanceModel createInstanceOfInstanceModel();", "public VOCSesame () {\n }", "public RailRoad() {}", "public static Vehicle getVehicle(VehicleAbstractFactory abstractFactory){\n\t\t\n\t\treturn abstractFactory.createVehicle();\n\t}", "public static VendingMachine create(VendingMachineType type)\n {\n VendingMachine machine = null;\n\n if (type == VendingMachineType.STANDARD) {\n machine = new StandardVendingMachine();\n }\n\n return machine;\n }", "public PersonaVO() {\n }", "public VehmonService() {\n }", "public VancarrierModel() {\r\n\t\tthis(null, \"VCModel\", true, true);\r\n\t}", "private TbusRoadGraph() {}", "public XpeDccNewContractSetupROVORowImpl() {\n }", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "Vaisseau_Vaisseau createVaisseau_Vaisseau();", "public Telefone() {\n\t}", "private VegetableFactory() {\n }", "public HotSpot(HotSpot source) {\n\t\tsuper(source);\n\t\t\n\t\tnumberOfVehicles = source.numberOfVehicles;\n\t\tcolor = new Color(source.color.getRGB());\n\t\t\n\t\tarea = new Ellipse2DExt(source.area);\n\t\tcenter = new Point2DExt(source.center);\n\t\tradiusx = source.radiusx;\n\t\tradiusy = source.radiusy;\n\t\t\n\t\tDirectionIn = source.DirectionIn;\n\t\tdirectionInBeginTime = source.directionInBeginTime;\n\t\tdirectionInEndTime = source.directionInEndTime;\n\t\t\n\t\tDirectionInType = source.DirectionInType;\n\t\t\n\t\tDirectionOut = source.DirectionOut;\n\t\tdirectionOutBeginTime = source.directionOutBeginTime;\n\t\tdirectionOutEndTime = source.directionOutEndTime;\n\t\t\n\t\tvehicleSelection = new TypeSelection<VehicleType>(source.vehicleSelection);\n\t}", "public HotSpot(HotSpot source) {\n\t\tsuper(source);\n\t\t\n\t\tnumberOfVehicles = source.numberOfVehicles;\n\t\tcolor = new Color(source.color.getRGB());\n\t\t\n\t\tarea = new Ellipse2DExt(source.area);\n\t\tcenter = new Point2DExt(source.center);\n\t\tradiusx = source.radiusx;\n\t\tradiusy = source.radiusy;\n\t\t\n\t\tDirectionIn = source.DirectionIn;\n\t\tdirectionInBeginTime = source.directionInBeginTime;\n\t\tdirectionInEndTime = source.directionInEndTime;\n\t\t\n\t\tDirectionInType = source.DirectionInType;\n\t\t\n\t\tDirectionOut = source.DirectionOut;\n\t\tdirectionOutBeginTime = source.directionOutBeginTime;\n\t\tdirectionOutEndTime = source.directionOutEndTime;\n\t\t\n\t\tvehicleSelection = new TypeSelection<VehicleType>(source.vehicleSelection);\n\t}", "public Car createCar(String name, String modelName, String type) {\r\n return new Car(name, modelName, type);\r\n }", "public Vehicle(String regNbr, String productName, String type,\n\t\t\t\t String licenseReq, int price, String infoTxt, boolean hasHook,\n\t\t\t\t String expiryDate, Warehouse warehouse) {\n\t\t\n\t\tsuper(productName, infoTxt, price); // Heritage...\n\t\t\n\t\tthis.regNbr = regNbr;\n\t\tthis.type = type;\n\t\tthis.licenseReq = licenseReq;\n\t\tthis.hasHook = hasHook;\n\t\tthis.expiryDate = expiryDate;\n\t\tthis.warehouse = warehouse;\n\t}", "abstract public Vcard createVcard();", "public ObjectFactory() {\n super(grammarInfo);\n }", "public VITACareer()\r\n {\r\n }", "public static void create(StreetPanel streetPanel, VehiclePanel vehiclePanel) {\n streetPanel.setSize(FRAME_SIZE);\n vehiclePanel.setSize(FRAME_SIZE);\n\n // Simulator Frame\n JFrame simFrame = new JFrame(\"Traffic Simulator\");\n simFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n simFrame.pack();\n simFrame.setLocation(0, 0);\n simFrame.setSize(FRAME_SIZE);\n simFrame.setVisible(true);\n\n // Add Panels to Frame\n simFrame.add(vehiclePanel);\n simFrame.add(streetPanel);\n }", "public DriveSubsystem() {\n }", "private Builder(com.datawhisperers.restfulexample.avromodel.VehicleInfoAvro other) {\n super(SCHEMA$);\n if (isValidValue(fields()[0], other.vehicleType)) {\n this.vehicleType = data().deepCopy(fields()[0].schema(), other.vehicleType);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.fuelType)) {\n this.fuelType = data().deepCopy(fields()[1].schema(), other.fuelType);\n fieldSetFlags()[1] = true;\n }\n }", "void create(T instance) throws IOException;" ]
[ "0.7946125", "0.7859736", "0.7859736", "0.74477345", "0.7425552", "0.740157", "0.72644097", "0.7034357", "0.6821787", "0.67524636", "0.67491025", "0.66199946", "0.6553327", "0.653172", "0.6501125", "0.640917", "0.63751537", "0.6361469", "0.6146879", "0.6109922", "0.6086626", "0.606977", "0.60455346", "0.5965273", "0.5915678", "0.59022224", "0.5883803", "0.5868754", "0.58201545", "0.5814975", "0.58092254", "0.5785396", "0.57815456", "0.5717615", "0.5656036", "0.5641266", "0.5631034", "0.56192213", "0.55973536", "0.55752045", "0.55730045", "0.55642635", "0.55640256", "0.5558885", "0.554044", "0.5536549", "0.55118024", "0.55060524", "0.5497096", "0.54964507", "0.5488273", "0.54613477", "0.5452691", "0.54397243", "0.5432229", "0.54258215", "0.542473", "0.5423767", "0.542137", "0.54167426", "0.54055494", "0.5398962", "0.53854805", "0.5383538", "0.5378512", "0.5374936", "0.53685194", "0.5367819", "0.5363584", "0.536332", "0.5357257", "0.5351063", "0.5346951", "0.5344219", "0.5328535", "0.5328302", "0.5321708", "0.53182966", "0.5313098", "0.53079015", "0.53071064", "0.52902603", "0.528823", "0.52777153", "0.52777153", "0.52777153", "0.52777153", "0.5276542", "0.52728766", "0.5271368", "0.5271368", "0.52678555", "0.5267702", "0.5262826", "0.52565277", "0.52545923", "0.52438706", "0.52396286", "0.523559", "0.52346736" ]
0.8160116
0
Creates a new instance of ProtoVehicle with a specified size
public ProtoVehicle(int size) { super(size); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ProtoVehicle() {\n super();\n }", "public SpaceStub(int size) {\n super(size);\n this.size = size;\n }", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public void createNew(int size);", "Vehicle createVehicle();", "Vehicle createVehicle();", "private Vehicle(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Vehicle parkVehicle(VehicleSize size) {\n Vehicle vehicle = this.vehicleFactories[size.getValue()].allocateVehicle();\n for (ParkingLevel level : this.levels) {\n if (level.parkVehicle(vehicle)) {\n return vehicle;\n }\n }\n return null;\n }", "@ProtoFactory\n public LinkedList<E> create(int size) {\n return new LinkedList<>();\n }", "public abstract VehicleSize getSize();", "public void initialize(int size) {\n setMaxSize(size);\n }", "public TaxiStation(final int size) {\n this.carPark = createCarPark(size);\n }", "public BoardImpl(int size)\r\n {\r\n if (size != 9 && size != 13 && size != 19)\r\n throw new WrongBoardSizeException(\"Board could not be created. GO board must be size 9, 13 or 19\");\r\n setSize(size);\r\n setBoard(new ArrayList<List<Field>>());\r\n setHistory(new ArrayList<Move>());\r\n createFields();\r\n }", "public Television(String Brand, int size)\r\n {\r\n Manufacturer = Brand;\r\n SCREEN_SIZE = size;\r\n powerOn = false;\r\n volume = 20;\r\n channel = 2;\r\n }", "private void createBin(int size) \n\t{\n\t// create an array of the appropriate type\n\tfBin = (Object[]) Array.newInstance(fClass, size);\t\n\t}", "public VOIVector(int initialsize) {\r\n super(initialsize);\r\n }", "@Test\n public void TruckTest(){\n Size trucksize =new Size(190,450);\n Truck truck = new Truck(\"ABC123\",trucksize);\n Assert.assertEquals(\"Should be ABC123\",\"ABC123\",truck.getLicense_plate());\n Assert.assertEquals(\"should be trucksize\",trucksize,truck.getSize_truck());\n Assert.assertEquals(\"Should be ABC123\",\"ABC123\",truck.licensePlate());\n Assert.assertEquals(\"Should be Truck\",\"Truck\",truck.type());\n Assert.assertEquals(\"Should be 0\",0,truck.vehicleCharacteristic().size());\n Assert.assertEquals(\"Should be Truck\",\"Truck\",truck.getType());\n\n }", "public Vehicle(){}", "public final com.francetelecom.admindm.model.Parameter createSize()\n\t\t\tthrows Fault {\n\t\tcom.francetelecom.admindm.model.Parameter param;\n\t\tparam = data.createOrRetrieveParameter(basePath + \"Size\");\n\t\tparam.setNotification(0);\n\t\tparam.setStorageMode(StorageMode.DM_ONLY);\n\t\tparam.setActiveNotificationDenied(true);\n\t\tparam.setType(ParameterType.UINT);\n\t\tparam.addCheck(new CheckMinimum(0));\n\t\tparam.addCheck(new CheckMaximum(4294967295L));\n\t\tparam.setValue(new Long(0));\n\t\tparam.setWritable(false);\n\t\treturn param;\n\t}", "public Car(char id,int size,Orientation orientation,\r\n Position currentPosition){\r\n if (size<=0) {\r\n throw new IllegalArgumentException(\"The size is not valid\"); \r\n }\r\n this.id=id;\r\n this.size=size;\r\n this.currentPosition=currentPosition;\r\n this.orientation=orientation;\r\n }", "public Vehicle() {}", "private void initWithSize(int size) {\r\n this.size = size;\r\n if (size == 0) {\r\n size = 1; //Prevents memory allocation problem on GPU\r\n }\r\n\r\n normalX = new double[size];\r\n normalY = new double[size];\r\n normalZ = new double[size];\r\n\r\n vertexAX = new double[size];\r\n vertexAY = new double[size];\r\n vertexAZ = new double[size];\r\n\r\n edgeBAX = new double[size];\r\n edgeBAY = new double[size];\r\n edgeBAZ = new double[size];\r\n\r\n edgeCAX = new double[size];\r\n edgeCAY = new double[size];\r\n edgeCAZ = new double[size];\r\n\r\n centerX = new double[size];\r\n centerY = new double[size];\r\n centerZ = new double[size];\r\n\r\n area = new double[size];\r\n }", "public SizeLOVConverter() {\n }", "public Bathroom(int size) {\n this.size = size;\n myBathtub = new Bathtub(100); //instantiate bathtub object during Bathroom object creation\n }", "AbstractBaseWheel(BigDecimal size){\n this.diameter = size;\n }", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final Builder size(long size) {\n this.size = size;\n return this;\n }", "public Vehicle() {\n\n\t}", "public Builder<V, E> vectorSize(int vectorSize) {\n this.vectorSize = vectorSize;\n return this;\n }", "public Vehicle() {\r\n\t\tthis.numOfDoors = 4;\r\n\t\tthis.price = 1;\r\n\t\tthis.yearMake = 2019;\r\n\t\tthis.make = \"Toyota\";\r\n\t}", "private VehicleType(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Vehicle(String carClass, BigDecimal price) {\n this.carClass = carClass;\n this.price = price;\n }", "public Vehicle() {\n }", "public Vehicle(String vehicleName, int vehiclePerformance, int vehiclePrice) {\n\n super(vehicleName, vehiclePerformance, vehiclePrice);\n }", "public void setSize(int size){\n this.size = size;\n }", "@Override\n\t\tpublic Bpartner[] newArray(int size) {\n\t\t\treturn new Bpartner[size];\n\t\t}", "public CarVo(String band, int size) {\n this.band = band;\n this.size = size;\n }", "private Car(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public PacketBuilder() {\n\t\tthis(1024);\n\t}", "public Car(char id, int size, Orientation orientation,\n Position currentPosition) {\n if (size <= 0)\n throw new IllegalArgumentException(\"The size must be positive\");\n\n this.id = id;\n this.size = size;\n this.orientation = orientation;\n this.currentPosition = currentPosition;\n }", "@SuppressWarnings(\"unused\")\r\n public static VehicleFragment newInstance(int columnCount) {\r\n VehicleFragment fragment = new VehicleFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_COLUMN_COUNT, columnCount);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "public void setObjectSize(short size) { this.objectSize=size; }", "public Disk(int size){\n this.size = size;\n }", "public void setSize(String size) {\n this.size = size;\n }", "public ItemSerializer(int size) {\n this(size, SerializerOutputType.RAW);\n }", "public Vehicle2D() {\n }", "public void setLocalSize(int size);", "public void setSize(VideoSize size) {\n this.size = size;\n }", "public godot.wire.Wire.Vector3.Builder getSizeBuilder() {\n \n onChanged();\n return getSizeFieldBuilder().getBuilder();\n }", "public godot.wire.Wire.Vector2.Builder getSizeBuilder() {\n \n onChanged();\n return getSizeFieldBuilder().getBuilder();\n }", "public Chromosome(int size, int valueSize) {\n this.valueSize = valueSize;\n \n numberValue = ((size*valueSize)/8);\n if (((((float)size*valueSize)/8)*10)%10 > 0) //arrondis au superieur\n numberValue++;\n \n this.chromosome = new byte[numberValue];\n }", "VehicleClass() {}", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\n this.size = size;\n }", "public void setSize(int size) {\r\n this.size = size;\r\n }", "public void initialize(int size);", "public Builder setSize(godot.wire.Wire.Vector3 value) {\n if (sizeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n size_ = value;\n onChanged();\n } else {\n sizeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setStructureSize(int size) {\n\t\tmStructureSize = size;\n\t\tvalidateSize();\n\t\trepaint();\n\t\t}", "public static Price fromProto(CreateRequest proto) {\n Price price = new Price();\n price.setPrice(proto.getPrice());\n price.setProduct_id(proto.getProductId());\n return price;\n }", "public Company(int size) {\n employees = new Person[size];\n }", "public void setSize(int size) {\n this.size = size;\n }", "public int getSize() {\n return this.numberOfVehicle;\n }", "public static void create(StreetPanel streetPanel, VehiclePanel vehiclePanel) {\n streetPanel.setSize(FRAME_SIZE);\n vehiclePanel.setSize(FRAME_SIZE);\n\n // Simulator Frame\n JFrame simFrame = new JFrame(\"Traffic Simulator\");\n simFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n simFrame.pack();\n simFrame.setLocation(0, 0);\n simFrame.setSize(FRAME_SIZE);\n simFrame.setVisible(true);\n\n // Add Panels to Frame\n simFrame.add(vehiclePanel);\n simFrame.add(streetPanel);\n }", "protected ValueGenerationBlock<String> reserveBlock(long size)\r\n {\r\n Object[] ids = new Object[(int) size];\r\n for (int i = 0; i < size; i++)\r\n {\r\n ids[i] = getIdentifier();\r\n }\r\n if (NucleusLogger.VALUEGENERATION.isDebugEnabled())\r\n {\r\n NucleusLogger.VALUEGENERATION.debug(Localiser.msg(\"040004\", \"\" + size));\r\n }\r\n return new ValueGenerationBlock(ids);\r\n }", "public static void setRecorderVideoSize(Size size){\n\t}", "public GoLBoard(int boardSize)\n\t{\n \tthis(new GoLRandomInitializer(boardSize), boardSize);\n \tsetSize = boardSize;\n\t}", "protected Pot createPot(int knobSize, String label, String labelsString) {\r\n\r\n\t\tPot p = new Pot();\r\n\t\tconfigPot(p, knobSize, label, labelsString);\r\n\t\treturn p;\r\n\t}", "public void setSize(int size) {\r\n _size = size;\r\n }", "public Television(String brand, int size) {\r\n\t\tMANUFACTURER = brand;\r\n\t\tSCREEN_SIZE = size;\r\n\t\tpowerOn = false;\r\n\t\tvolume = 20;\r\n\t\tchannel = 2;\r\n\t\t// To do - Task 1 step 4\r\n\t}", "public BuildYourOwn(String size, ArrayList<String> toppings)\r\n {\r\n super(BYO_STYLE, size, toppings);\r\n }", "public PacketBuilder(int capacity) {\n\t\tbuffer = ByteBuffer.allocate(capacity);\n\t}", "private MsgInstantiateContract(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public void setSize(long size) {\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(Integer size) {\n this.size = size;\n }", "public Table(int size) {\n\t\tsuper(size);\n\t}", "public VehicleType() { }", "public VehicleType() {\n }", "public MyRoom(String name, String building, int size) {\r\n this.name = name;\r\n this.building = building;\r\n this.size = size;\r\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector3, godot.wire.Wire.Vector3.Builder, godot.wire.Wire.Vector3OrBuilder> \n getSizeFieldBuilder() {\n if (sizeBuilder_ == null) {\n sizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector3, godot.wire.Wire.Vector3.Builder, godot.wire.Wire.Vector3OrBuilder>(\n getSize(),\n getParentForChildren(),\n isClean());\n size_ = null;\n }\n return sizeBuilder_;\n }", "public Vehicle(){\n System.out.println(\"Parking a unknown model Vehicle\");\n numberOfVehicle++;\n }", "public Builder setSize(godot.wire.Wire.Vector2 value) {\n if (sizeBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n size_ = value;\n onChanged();\n } else {\n sizeBuilder_.setMessage(value);\n }\n\n return this;\n }", "public abstract Fruit generateFruit(int size, FruitType fruitType);", "private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "public Ship(String name, int size) {\r\n this.name = name;\r\n this.size = size;\r\n this.livesLeft = size;\r\n this.isSunk = false;\r\n }", "public Vehicle()\n {\n name = \"none\";\n cost = 0;\n }", "@Override\n public long generateNewContractDuration(long size) {\n return new Random().nextInt(5) + 1 + (size / 1000000);\n }", "@Element \n public void setSize(String size) {\n this.size = size;\n }", "Graph(int size) {\n n = size;\n V = new Vertex[size + 1];\n // create an array of Vertex objects\n for (int i = 1; i <= size; i++)\n V[i] = new Vertex(i);\n }", "public void setSize(double size) \n {\n this.size = size;\n }", "public VBOShapeList(int initialSize) {\r\n\t\tnumElements = initialSize;\r\n\t\tIntBuffer bufferIds = BufferUtils.createIntBuffer(1);\r\n\t\tARBVertexBufferObject.glGenBuffersARB(bufferIds);\r\n\t\tvboVertexId = bufferIds.get(0);\r\n\t\tresizeArrays();\r\n\t}", "public static com.datawhisperers.restfulexample.avromodel.VehicleInfoAvro.Builder newBuilder() {\n return new com.datawhisperers.restfulexample.avromodel.VehicleInfoAvro.Builder();\n }", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\tthis.size = size;\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector2, godot.wire.Wire.Vector2.Builder, godot.wire.Wire.Vector2OrBuilder> \n getSizeFieldBuilder() {\n if (sizeBuilder_ == null) {\n sizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector2, godot.wire.Wire.Vector2.Builder, godot.wire.Wire.Vector2OrBuilder>(\n getSize(),\n getParentForChildren(),\n isClean());\n size_ = null;\n }\n return sizeBuilder_;\n }", "public BodyPart(int x, int y, int size){\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.size = size;\n\t}", "public Vector(int initialCapacity) {\n construct(initialCapacity);\n }", "public Hylle(int size) {\n a = (T[]) new Object[size];\n this.size = size;\n }", "public Vehicle(VehicleType type) {\n\t\tthis.type = type;\n\t}" ]
[ "0.6265049", "0.60462123", "0.60365963", "0.59505737", "0.57756966", "0.57756966", "0.5745867", "0.57236546", "0.57161707", "0.5704962", "0.562769", "0.56206286", "0.5579952", "0.55327034", "0.54546803", "0.5444205", "0.54236996", "0.534558", "0.53287905", "0.5296217", "0.5289865", "0.5270757", "0.5252039", "0.52356493", "0.5227663", "0.52225167", "0.5207692", "0.51878995", "0.51832837", "0.5182643", "0.5150049", "0.51485866", "0.5145662", "0.51405656", "0.510385", "0.5103823", "0.50759816", "0.50673574", "0.5067278", "0.5065084", "0.5061804", "0.5061687", "0.5054345", "0.50512105", "0.5043362", "0.50372756", "0.50366443", "0.5026756", "0.50146294", "0.5009741", "0.5005785", "0.50029606", "0.50029606", "0.4996235", "0.49947724", "0.4992036", "0.498577", "0.4985635", "0.4985578", "0.49759105", "0.49741313", "0.49711287", "0.49664834", "0.4962844", "0.4958795", "0.4950668", "0.49243847", "0.49060163", "0.4901569", "0.49005544", "0.48955992", "0.4895563", "0.48951542", "0.4894728", "0.48918772", "0.48858467", "0.48747393", "0.4874059", "0.48720172", "0.48698887", "0.48628196", "0.48585767", "0.48566473", "0.48538768", "0.48490566", "0.48486638", "0.48466003", "0.48453104", "0.48442677", "0.4843746", "0.48416683", "0.48385367", "0.48385367", "0.48385367", "0.48385367", "0.48339206", "0.48279", "0.48272502", "0.48245257", "0.48128098" ]
0.83516955
0
One time step. Get the sensor readings; calculate the outputs.
public AbstractDriveOutput step(AbstractWorld theWorld) { double right = theWorld.getStimulusStrength(rightSensorLocation()); double left = theWorld.getStimulusStrength(leftSensorLocation()); if (mySensors.theSensors.size() > 1) { System.out.println("okay... time to generalize ProtoVehicle:step to sum all the drives!!"); assert (false); } // only one sensor... for (AbstractSensor nextSensor : mySensors.theSensors) { if (nextSensor.getCrossed()) { return new MyDriveOutput(right, left); // backwards } } return new MyDriveOutput(left, right); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pollAndProcessInput() {\n\tlong time ;\n int index ;\n\n\t// Set button values. In the Trackd implementation there is only one\n\t// set of buttons for all sensors and valuators.\n for (int i = 0 ; i < buttons.length ; i++) {\n buttons[i] = getButton(i) ;\n }\n\n\t// Set 6DOF sensor values.\n for (index = 0 ; index < trackerCount ; index++) {\n getMatrix(trackerMatrix, index) ;\n t3d[index].set(trackerMatrix) ;\n\t time = System.currentTimeMillis() ;\n sensors[index].setNextSensorRead(time, t3d[index], buttons) ;\n }\n\n\t// Set 2D/3D sensor values from available valuators.\n\tif (valuatorCount > 0) {\n\t for (int i = 0 ; i < valuatorCount && i < 3 ; i++) {\n\t\t// Put values in matrix translational components.\n\t\tvaluatorMatrix[(i*4) + 3] = getValuator(i) ;\n\t }\n\n t3d[index].set(valuatorMatrix) ;\n\t time = System.currentTimeMillis() ;\n sensors[index].setNextSensorRead(time, t3d[index], buttons) ;\n }\n }", "public void recordSensors2(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n\t\t\t\t\tSystem.out.println(\"OdTheta\" + sd.getOdTheta());\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getOdLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getOdTheta())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getOdLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getOdTheta()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n \n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}", "private void updateSensors()\r\n\t{\t\t\r\n\t\tthis.lineSensorRight\t\t= perception.getRightLineSensor();\r\n\t\tthis.lineSensorLeft \t\t= perception.getLeftLineSensor();\r\n\t\t\r\n\t\tthis.angleMeasurementLeft \t= this.encoderLeft.getEncoderMeasurement();\r\n\t\tthis.angleMeasurementRight \t= this.encoderRight.getEncoderMeasurement();\r\n\r\n\t\tthis.mouseOdoMeasurement\t= this.mouseodo.getOdoMeasurement();\r\n\r\n\t\tthis.frontSensorDistance\t= perception.getFrontSensorDistance();\r\n\t\tthis.frontSideSensorDistance = perception.getFrontSideSensorDistance();\r\n\t\tthis.backSensorDistance\t\t= perception.getBackSensorDistance();\r\n\t\tthis.backSideSensorDistance\t= perception.getBackSideSensorDistance();\r\n\t}", "public void updateOscilloscopeData() {\n rmsSum = 0;\n boolean overshoot = false;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFrequency = getControlFrequency().intValue();\n int controlAmplitude = getControlAmplitude().intValue();\n double controlPhase = getControlPhase().doubleValue();\n for (int i = 0; i < 40; i++) { \n Double reactorValue = reactorAmplitude * Math.sin(2 * Math.PI * reactorFrequency * ((double) i * 5 / 10000) + reactorPhase);\n Double controlValue = controlAmplitude * Math.sin(2 * Math.PI * controlFrequency * ((double) i * 5 / 10000) + controlPhase);\n if (reactorValue + controlValue > 150) {\n this.outputData.get(0).getData().get(i).setYValue(149);\n overshoot = true;\n } else if (reactorValue + controlValue < -150) {\n this.outputData.get(0).getData().get(i).setYValue(-149);\n overshoot = true;\n } else {\n this.outputData.get(0).getData().get(i).setYValue(reactorValue + controlValue);\n }\n if (this.online == true) {\n this.rmsSum = this.rmsSum + Math.pow(reactorValue + controlValue, 2);\n }\n }\n calculateOutputPower();\n checkForInstability(overshoot);\n }", "public void readSampless(){\n\t\tif (loop) {\n\t\t\treadBytesLoop();\n\t\t} else {\n\t\t\treadBytes();\n\t\t}\n\t\t// convert them to floating point\n\t\t// hand those arrays to our effect\n\t\t// and convert back to bytes\n\t\tprocess();\n\t\t\n\t\t// write to the line.\n\t\twriteBytes();\n\t\t// send samples to the listener\n\t\t// these will be what we just put into the line\n\t\t// which means they should be pretty well sync'd\n\t\t// with the audible result\n\t\tbroadcast();\n\t}", "public abstract void runSensors() throws Exception;", "public void refresh()\n\t{\n\t\t// loop all sensors with calling read(), test() method of sensors\n\t\tfor(int i=0; i<SensorControl.MAX_SENSOR; i++)\n\t\t{\n\t\t\tif(SecurityZone.getDeviceUnit(DeviceUnit.TYPE_WINDOW_SENSOR, i+1).getUsing()){\n\t\t\t\tif(MainDemo.sensorController.testWinDoorSensor(i))\n\t\t\t\t{\n\t\t\t\t\ttestW[i].setForeground(Color.RED);\n\t\t\t\t\ttestW[i].setText(\"enable\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttestW[i].setForeground(Color.BLACK);\n\t\t\t\t\ttestW[i].setText(\"disable\");\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif(MainDemo.sensorController.readWinDoorSensor(i))\n\t\t\t\t{\n\t\t\t\t\treadW[i].setForeground(Color.RED);\n\t\t\t\t\treadW[i].setText(\"open\");\n\t\t\t\t\tdsensor[i] = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treadW[i].setForeground(Color.BLACK);\n\t\t\t\t\treadW[i].setText(\"close\");\n\t\t\t\t\tdsensor[i] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdsensor[i] = false;\n\t\t\t}\n\n\t\t\tif(SecurityZone.getDeviceUnit(DeviceUnit.TYPE_MOTION_SENSOR, i+1).getUsing()){\n\t\t\t\tif(MainDemo.sensorController.testMotionDetector(i))\n\t\t\t\t{\n\t\t\t\t\ttestM[i].setForeground(Color.RED);\n\t\t\t\t\ttestM[i].setText(\"enable\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttestM[i].setForeground(Color.BLACK);\n\t\t\t\t\ttestM[i].setText(\"disable\");\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif(MainDemo.sensorController.readMotionDetector(i))\n\t\t\t\t{\n\t\t\t\t\treadM[i].setForeground(Color.RED);\n\t\t\t\t\treadM[i].setText(\"detect\");\n\t\t\t\t\tdsensor[i+5] = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treadM[i].setForeground(Color.BLACK);\n\t\t\t\t\treadM[i].setText(\"clear\");\n\t\t\t\t\tdsensor[i+5] = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdsensor[i+5] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tMainDemo.alarmController.detect(dsensor);\n\t}", "@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\tint entropyAccuracy = SensorDescInformation.entropyAccuracy;\n\t\t\tSensorQueriesAccelerometer accQuery = new SensorQueriesAccelerometer(SensorDescInformation.earliest, SensorDescInformation.latest, context.getFilesDir());\n\t\t\tint count = accQuery.getCount();\n\t\t\tif (accQuery.containsReadings()){\n\t\t\t\tfloat min = accQuery.getMinValue().getAccX();\n\t\t\t\tfloat max = accQuery.getMaxValue().getAccX();\n\t\t\t\tfloat interval = max-min;\n\t\t\t\tList<SensorData> data = accQuery.list;\n\t\t\t\tint [][] counter = new int [entropyAccuracy][3];\n\t\t\t\tfor (SensorData temp : data) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint joX = (int) ((temp.getValueFloat(0)-min)*entropyAccuracy/interval);\n\t\t\t\t\t\tint joY = (int) ((temp.getValueFloat(1)-min)*entropyAccuracy/interval);\n\t\t\t\t\t\tint joZ = (int) ((temp.getValueFloat(2)-min)*entropyAccuracy/interval);\n\t\t\t\t\t\tcounter [joX][0]++;\n\t\t\t\t\t\tcounter [joY][1]++;\n\t\t\t\t\t\tcounter [joZ][2]++;\n\t\t\t\t}\n\t\t\t\tfloat entroX = 0, entroY = 0, entroZ = 0;\n\t\t\t\tfor (int i = 0; i < entropyAccuracy; i++ ){\n\t\t\t\t\tentroX += (counter[i][0]/count)*Math.log10(counter[i][0]/count);\n\t\t\t\t\tentroY += (counter[i][1]/count)*Math.log10(counter[i][1]/count);\n\t\t\t\t\tentroZ += (counter[i][2]/count)*Math.log10(counter[i][2]/count);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfloat changeRateX = 0, changeRateY = 0, changeRateZ = 0;\n\t\t\t\n\t\t\t\tfor (int i = 0; i< data.size(); i++){\n\t\t\t\t\tchangeRateX += (data.get(i+1).getValueFloat(0) - data.get(i).getValueFloat(0))/(data.get(i+1).getRecordTime()-data.get(i).getRecordTime());\n\t\t\t\t\tchangeRateY += (data.get(i+1).getValueFloat(1) - data.get(i).getValueFloat(1))/(data.get(i+1).getRecordTime()-data.get(i).getRecordTime());\n\t\t\t\t\tchangeRateZ += (data.get(i+1).getValueFloat(2) - data.get(i).getValueFloat(2))/(data.get(i+1).getRecordTime()-data.get(i).getRecordTime());\n\t\t\t\t}\n\t\t\t\tchangeRateX /= data.size();\n\t\t\t\tchangeRateY /= data.size();\n\t\t\t\tchangeRateZ /= data.size();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfinal SharedPreferences settings = context.getSharedPreferences(NervousStatics.SENSOR_PREFS, 0);\n\t\t\t\t\n\t\t\t\tfloat freq = (int)context.getSharedPreferences(NervousStatics.SENSOR_FREQ, 0).getInt(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_freqValue\", 30) * 1000;\n\t\t\t\tboolean isLo = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doMeasure\", true);\n\t\t\t\tboolean isSh = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doShare\", true);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdataReady(System.currentTimeMillis(), entroX, entroY, entroZ, freq, changeRateX, changeRateY, changeRateZ, isLo, isSh);\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\n\t\t\t\tfinal SharedPreferences settings = context.getSharedPreferences(NervousStatics.SENSOR_PREFS, 0);\n\t\t\t\t\n\t\t\t\tfloat freq = (int)context.getSharedPreferences(NervousStatics.SENSOR_FREQ, 0).getInt(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_freqValue\", 30) * 1000;\n\t\t\t\tboolean isLo = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doMeasure\", true);\n\t\t\t\tboolean isSh = settings.getBoolean(Long.toHexString(SensorDescInformation.targetSENSOR_ID) + \"_doShare\", true);\n\t\t\t\tdataReady(System.currentTimeMillis(), 0, 0, 0, freq, 0, 0, 0, isLo, isSh);\n\t\t\t};\n\t\t\treturn null;\n\t\t}", "public void control() {\n int i = 1;\n while (i <= 20) {\n //Temperature generate +obtaining result\n tmps.getValue();\n System.out.println(\"Temperature location \" + tmps.getLocation() + \" second \" + i + \":\" + tmps.readValue());\n //Temperature generate +obtaining result\n ls.getValue();\n System.out.println(\"Light location \" + ls.getLocation() + \" second \" + i + \":\" + ls.readValue());\n System.out.println(\"\\r\\n\");\n i++;\n }\n }", "@Override\n\tvoid performReading() {\n\t\tthis.humiditySensorMeasurements.setAbsHumidity(this.varibles.get(\"absHumidity\"));\n\t\tthis.humiditySensorMeasurements.setRelHumidity(this.varibles.get(\"relHumidity\"));\n\t\tSensorResults hum = this.humiditySensorMeasurements.measurements();\n\t\n\t/*if (hum == SensorResults.HIGH && temp == SensorResults.HIGH) {\n\t\t\t// System.out.println(\"abnormal temp\");\n\t\t\tthis.creatMessage(\"abnormal hight Humidity\");\n\t\t}\n\t\tif (hum == SensorResults.LOW) {\n\t\t\t// System.out.println(\"abnormal Light\");\n\t\t\tthis.creatMessage(\"abnormal low Humidity\");\n\t\t}/**/\n\t\tmap.put(\"Light\", hum);\n\t\tthis.observer.update();\n\t}", "public void loop() {\n a0 = analogRead(A0);\n a1 = analogRead(A1);\n a2 = analogRead(A2);\n a3 = analogRead(A3);\n println(UART6,\"A0: \"+a0+\" A1: \"+a1+\" A2: \"+a2+\" A3: \"+a3); // this goes to the Serial port\n println(\"A0: \"+a0+\" A1: \"+a1+\" A2: \"+a2+\" A3: \"+a3); // this goes to the Android Monitor in Android Studio\n\n\n // read I2C accelerometer and print to UART\n try {\n xyz = accelerometer.readSample();\n println(UART6,\"X: \"+xyz[0]+\" Y: \"+xyz[1]+\" Z: \"+xyz[2]);\n println(\"X: \"+xyz[0]+\" Y: \"+xyz[1]+\" Z: \"+xyz[2]);\n\n //use this line instead for unlabeled numbers separated by tabs that work with Arduino's SerialPlotter:\n //println(UART6,xyz[0]+\"\\t\"+xyz[1]+\"\\t\"+xyz[2]); // this goes to the Serial port\n\n } catch (IOException e) {\n Log.e(\"HW3Template\",\"loop\",e);\n }\n\n\n delay(100);\n\n }", "@Override\n\tpublic void setupSensors() {\n\t\t\n\t}", "public void recordSensors(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\tSystem.out.println(\"Yaw\" + sd.getYaw());\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getYaw())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getYaw()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n int drawline1 = (int)Math.round((sd.getLocationX() * scale) + width/2);\n int drawline2 = (int)Math.round((sd.getLocationY() * scale) + height/2);\n g2d.setColor(Color.green);\n g2d.drawLine(drawline1, drawline2, x, y);\n g2d.setColor(Color.black);\n g2d.fillRect(x,y,2,2);\n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}", "public void run() {\n\t\tGenRandomString generator = new GenRandomString();\n\t\tStringToInt converter = new StringToInt();\n\t\t\n\t\tint rawData;\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\trawData = converter.convert(generator.generate());\n\t\t\t\n\t\t\t//synchronization to make sure that queue is filled up in the correct order.\n\t\t\tsynchronized(GlobalInfo.enqueueLock){\n\t\t\t\tSystem.out.format(\"%d got the lock.\\n\",deviceNumber);\n\t\t\t\tGlobalInfo.inputs[deviceNumber] = rawData;\n\t\t\t\tGlobalInfo.pipeLine.add(GlobalInfo.inputs);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep(10000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void run() {\n // Main loop:\n // Perform simulation steps of 64 milliseconds\n // and leave the loop when the simulation is over\n while (step(64) != -1) {\n // Read the _distanceSensors:\n // Enter here functions to read sensor data, like:\n // double val = distanceSensor.getValue();\n\n // Process sensor data here\n\n // Enter here functions to send actuator commands, like:\n // led.set(1);\n };\n }", "private void getTemperature() {\r\n \t\r\n \t//Get the date from the DateService class\r\n \tDate theDate = theDateService.getDate(); \r\n \t\r\n \t//Increment the number of readings\r\n \tlngNumberOfReadings ++;\r\n \tdouble temp = 0.0;\r\n \tString rep = \"\";\r\n \t\r\n \t//Assume that the TMP36 is connected to AIN4\r\n \trep = this.theTemperatureService.readTemperature(\"4\");\r\n \tpl(rep);\r\n \ttemp = this.theTemperatureService.getTheTemperature();\r\n \t\r\n \t//All details necessary to send this reading are present so create a new TemperatureReading object\r\n \tTemperatureReading theReading = new TemperatureReading(temp, theDate, lngNumberOfReadings);\r\n \tthis.send(theReading);\r\n \t\r\n }", "private void readNextSensor(BluetoothGatt gatt) {\n BluetoothGattCharacteristic characteristic;\n switch (mState) {\n case 0:\n Log.d(TAG, \"Reading pressure cal\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_CAL_CHAR);\n break;\n case 1:\n Log.d(TAG, \"Reading pressure\");\n characteristic = gatt.getService(PRESSURE_SERVICE)\n .getCharacteristic(PRESSURE_DATA_CHAR);\n break;\n case 2:\n Log.d(TAG, \"Reading humidity\");\n characteristic = gatt.getService(HUMIDITY_SERVICE)\n .getCharacteristic(HUMIDITY_DATA_CHAR);\n break;\n default:\n mHandler.sendEmptyMessage(MSG_DISMISS);\n Log.i(TAG, \"All Sensors Enabled\");\n return;\n }\n\n gatt.readCharacteristic(characteristic);\n }", "@Override\n\tpublic void run() {\n\n\t\tURLConnection connection = null;\n\t\ttry {\n\t\t\tIterator<String> iterator = targetSensor.iterator();\n\t\t\tfor (int i = 0; i < targetSensor.size(); i++) {\n\t\t\t\tString sensorName = iterator.next();\n\n\t\t\t\tURL oracle = new URL(\"http://localhost:8081/fakeDataSource/sensors/\" + sensorName + \"/data\");\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream()));\n\t\t\t\tString inputLine;\n\n\t\t\t\tString res = \"\";\n\n\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n//System.out.println(\"Received\" + inputLine);\n\t\t\t\t\tres += inputLine;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"Thread [%s] - Tracking sensor %s and received %s\\n\", this.getName(), sensorName, res);\n\n\t\t\t\tin.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n // Send data to phone\n if (count == 5) {\n count = 0;\n// Log.d(\"hudwear\", \"send accel data to mobile...\"\n// + \"\\nx-axis: \" + event.values[0]\n// + \"\\ny-axis: \" + event.values[1]\n// + \"\\nz-axis: \" + event.values[2]\n// );\n// Log.d(\"hudwear\", \"starting new task.\");\n\n if (connected)\n Log.d(\"atest\", \"values: \" + event.values[0] + \", \" + event.values[1] + \", \" + event.values[2]);\n// new DataTask().execute(new Float[]{event.values[0], event.values[1], event.values[2]});\n }\n else count++;\n }\n }", "public void calculate(){\n double totalFlow = this.mFarm.getCompFlow() * this.mFarm.getNumComps();\n double activeOutlets = this.mFarm.getChanPerPen() * this.mFarm.getActivePens()\n + this.mFarm.getActiveChnlWalk();\n double flowPerChnl = totalFlow / activeOutlets;\n double calcPressure = calculateCalcPressure();\n double pressCorr = Math.sqrt((this.mFarm.getReadPressure() + 14.7)/(calcPressure + 14.7));\n double stdCorr = Math.sqrt((this.mFarm.getReadPressure() + 14.7)/(0.0 + 14.7));\n double targetReadingFlow = flowPerChnl / pressCorr;\n double stdReading = flowPerChnl / stdCorr;\n final double MAXSTANDARDFLOW = 16;\n double maxFlowRate = MAXSTANDARDFLOW * pressCorr;\n double targetReadingPercent = Math.round(100 * flowPerChnl / maxFlowRate);\n\n this.mFarm.setTargetFlowDisplay((this.mFarm.getPanelGen() == 4) ? targetReadingPercent : targetReadingFlow);\n\n this.mFarm.setStdReading(stdReading);\n\n }", "private void startSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.startListening();\n }\n }", "private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }", "private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n }\n }", "public void run() {\n\n EV3ColorSensor sensor = new EV3ColorSensor(usPort); // usSensor is the instance\n SampleProvider sensorProvider = sensor.getMode(\"Red\");\n MeanFilter filter = new MeanFilter(sensorProvider, 4);\n float[] sample = new float[sensor.sampleSize()];\n boolean inLine = false; // Flags whether the sensor is currently seeing a line\n boolean makeCorrection = false; // Tells the class to correct the odometer values\n double[] position = odometer.getXYT(); // Current odometer values\n Direction direction = Direction.INIT; // Direction of the robot's movement\n\n long correctionStart, correctionEnd;\n\n while (true) {\n correctionStart = System.currentTimeMillis();\n\n // Trigger correction (When do I have information to correct?)\n filter.fetchSample(sample, 0);\n boolean lineDetected = sample[0] < LINE_COLOR_VALUE;\n\n if (lineDetected) {\n if (!inLine) {\n inLine = true;\n makeCorrection = true;\n lineCount++;\n Sound.beep();\n }\n } else\n inLine = false;\n\n // Calculate new (accurate) robot position\n if (makeCorrection && lineCount < ((SQUARE_SIZE - 1) * 4)) {\n makeCorrection = false;\n position = odometer.getXYT();\n\n // Get the direction of movement according to the angle\n double theta = position[2];\n if (theta > 45 && theta < 135) {\n direction = Direction.EAST;\n } else if (theta > 135 && theta < 225) {\n direction = Direction.SOUTH;\n } else if (theta > 225 && theta < 315) {\n direction = Direction.WEST;\n } else {\n direction = Direction.NORTH;\n }\n\n // Update odometer with new calculated (and more accurate) vales\n double correctedX, correctedY;\n switch (direction) {\n case NORTH:\n correctedY = (YN * TILE_SIZE) - SENSOR_OFFSET;\n YN++;\n odometer.setXYT(position[0], correctedY, position[2]);\n // System.out.println(\"Correcting Y to: \" + correctedY);\n break;\n case EAST:\n correctedX = (XE * TILE_SIZE) - SENSOR_OFFSET;\n XE++;\n odometer.setXYT(correctedX, position[1], position[2]);\n // System.out.println(\"Correcting X to: \" + correctedX);\n break;\n case SOUTH:\n YS--;\n correctedY = (YS * TILE_SIZE) + SENSOR_OFFSET;\n odometer.setXYT(position[0], correctedY, position[2]);\n // System.out.println(\"Correcting Y to: \" + correctedY);\n break;\n case WEST:\n XW--;\n correctedX = (XW * TILE_SIZE) + SENSOR_OFFSET;\n odometer.setXYT(correctedX, position[1], position[2]);\n // System.out.println(\"Correcting X to: \" + correctedX);\n break;\n }\n }\n\n // this ensure the odometry correction occurs only once every period\n correctionEnd = System.currentTimeMillis();\n if (correctionEnd - correctionStart < CORRECTION_PERIOD) {\n try {\n Thread.sleep(CORRECTION_PERIOD - (correctionEnd - correctionStart));\n } catch (InterruptedException e) {\n // there is nothing to be done here\n }\n }\n }\n }", "@Override\r\n public final void onSensorChanged(SensorEvent event) {\n double a0 = (double) event.values[0];\r\n double a1 = (double) event.values[1];\r\n double a2 = (double) event.values[2];\r\n\r\n double a = sqrt(a0*a0+a1*a1+a2*a2);\r\n\r\n // Do something with this sensor value.\r\n\r\n TextView textView = (TextView) findViewById(R.id.text_box2);\r\n textView.setText(Double.toString(a));\r\n\r\n if(count<size_accels) {\r\n accelerations[count] = a;\r\n times[count] = event.timestamp;\r\n }\r\n count = count + 1;\r\n }", "public void sensorSystem() {\n\t}", "public void run(){\n \t\t\n \t\t//make a fresh list, set gate as closed, register listener\n \t\tmeasurements = new myLL();\n \t\tgate = new CountDownLatch(1);\n \t\tmSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_FASTEST);\t\n \t\t\t\n \t\t//Wait until the stop-measuring-signal. In the mean time,\n \t\t//onSensorChanged events should be firing and measuring.\n\t\t/*\n \t\ttry {\n \t\t\tgate.await();\n \t\t} catch (InterruptedException e) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te.printStackTrace();\n \t\t}\n\t\t*/\n \t\t\n \t\t//stop measuring\n \t\tmSensorManager.unregisterListener(this);\n \t\t\n \t\tdouble x = Distance(measurements.getxData(), \n \t\t\t\t\t\tmeasurements.getyData(),\n \t\t\t\t\t\tmeasurements.getzData(),\n \t\t\t\t\t\tmeasurements.gettData());\n \t\t\n \t\t}", "public void onSensorChanged(SensorEvent event) {\n if (event.sensor.getType() != Sensor.TYPE_ACCELEROMETER && event.sensor.getType() != Sensor.TYPE_GYROSCOPE)\n return;\n\n if(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n sensorCount++;\n\n if (sensorFirstRead) {\n nanotime = System.nanoTime();\n sensorFirstRead = false;\n } else {\n\n if (sensorCount > 0 && sensorCount % 10 == 0) {\n differenceNanoTime = System.nanoTime() - nanotime;\n if (differenceNanoTime > sensorCounterIntervalDelay) {\n differenceSeconds = (double) differenceNanoTime / 1000000000f;\n\n sensorAverageCount = sensorCount / differenceSeconds;\n sensorAverageCountTextView.setText(String.format(\"Read/s: %.2f\", sensorAverageCount));\n\n if (sensorFirstAverageCycle || Math.abs(sensorAverageCount - accValuesLimit * 2) > accValuesLimit * 0.2) {\n if (sensorFirstAverageCycle)\n sensorFirstAverageCycle = false;\n\n accValuesLimit = (int) sensorAverageCount / 2;\n gyroValuesLimit = accValuesLimit / 2;\n sensorCountLimitTextView.setText(String.format(\"Sensor count limit: %d\", accValuesLimit));\n\n stats.get(\"accX\").setLimit(accValuesLimit);\n stats.get(\"accY\").setLimit(accValuesLimit);\n stats.get(\"accZ\").setLimit(accValuesLimit);\n stats.get(\"accDegreeZ\").setLimit(accValuesLimit);\n stats.get(\"accDegreeX\").setLimit(accValuesLimit);\n stats.get(\"accDegreeY\").setLimit(accValuesLimit);\n stats.get(\"accTotalAcceleration\").setLimit(accValuesLimit);\n stats.put(\"gyroX\", new StatisticList(gyroValuesLimit));\n stats.put(\"gyroY\", new StatisticList(gyroValuesLimit));\n stats.put(\"gyroZ\", new StatisticList(gyroValuesLimit));\n }\n\n sensorCount = 0;\n nanotime = System.nanoTime();\n }\n }\n }\n }\n\n if(event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n\n mAccelerometerSensorX = event.values[0];\n mAccelerometerSensorY = event.values[1];\n mAccelerometerSensorZ = event.values[2];\n\n mAccelerometerTotalAcceleration = Math.sqrt(Math.pow(mAccelerometerSensorX, 2) + Math.pow(mAccelerometerSensorY, 2) + Math.pow(mAccelerometerSensorZ, 2));\n\n stats.get(\"accX\").addValue(mAccelerometerSensorX);\n stats.get(\"accY\").addValue(mAccelerometerSensorY);\n stats.get(\"accZ\").addValue(mAccelerometerSensorZ);\n stats.get(\"accTotalAcceleration\").addValue(mAccelerometerTotalAcceleration);\n\n tmp_y = stats.get(\"accY\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage(); // g\n tmp_x = stats.get(\"accX\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage();\n tmp_z = stats.get(\"accZ\").getAverage() / stats.get(\"accTotalAcceleration\").getAverage();\n\n mRotationDegreeZ = Math.asin(tmp_x) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeZ))\n mRotationDegreeZ = stats.get(\"accDegreeZ\").getAverage() > 0 ? 90 : -90;\n\n mRotationDegreeX = Math.asin(tmp_z) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeX))\n mRotationDegreeX = stats.get(\"accDegreeX\").getAverage() > 0 ? 90 : -90;\n\n mRotationDegreeY = Math.asin(tmp_y) * 180 / Math.PI;\n if (Double.isNaN(mRotationDegreeY))\n mRotationDegreeY = stats.get(\"accDegreeY\").getAverage() > 0 ? 90 : -90;\n\n stats.get(\"accDegreeZ\").addValue(mRotationDegreeZ);\n stats.get(\"accDegreeX\").addValue(mRotationDegreeX);\n stats.get(\"accDegreeY\").addValue(mRotationDegreeY);\n\n updateLog(Sensor.TYPE_ACCELEROMETER);\n }\n else\n if(event.sensor.getType()==Sensor.TYPE_GYROSCOPE)\n {\n mGyroX = event.values[0];\n mGyroY = event.values[1];\n mGyroZ = event.values[2];\n\n stats.get(\"gyroX\").addValue(mGyroX);\n stats.get(\"gyroY\").addValue(mGyroY);\n stats.get(\"gyroZ\").addValue(mGyroZ);\n\n updateLog(Sensor.TYPE_GYROSCOPE);\n }\n }", "@Override\n public void onSensorChanged(SensorEvent event)\n {\n // Get the sensor which has triggered the event\n\n Sensor sensor = event.sensor;\n\n // Perform differing functionality depending upon\n // the sensor type (caller)\n\n switch (event.sensor.getType())\n {\n case Sensor.TYPE_STEP_COUNTER:\n\n if (reportedSteps < 1){\n\n // Log the initial value\n\n reportedSteps = (int)event.values [0];\n }\n\n // Calculate steps taken based on\n // first value received.\n\n stepsTaken = (int)event.values [0] - reportedSteps;\n\n // Output the value to the simple GUI\n\n countText.setText(\"Cnt: \" + stepsTaken);\n\n break;\n\n case Sensor.TYPE_STEP_DETECTOR:\n\n // Increment the step detector count\n\n stepDetector++;\n\n // Output the value to the simple GUI\n\n detectText.setText(\"Det: \" + stepDetector);\n\n break;\n\n case Sensor.TYPE_ACCELEROMETER:\n\n // Get the accelerometer values and set them to a string with 2dp\n\n String x = String.format(\"%.02f\", event.values[0]);\n String y = String.format(\"%.02f\", event.values[1]);\n String z = String.format(\"%.02f\", event.values[2]);\n\n // Output the string to the GUI\n\n accelText.setText(\"Acc:\" + x + \",\" + y + \",\" + z);\n\n break;\n }\n }", "public void calculateOutputs()\n {\n numberOfOutputs = outputs.size();\n }", "public void run() {\r\n /*try {\r\n AudioSystem.write(m_audioInputStream, m_targetType, outFile);\r\n } catch(IOException e) {\r\n e.printStackTrace();\r\n }*/\r\n //diagram.display();\r\n \r\n final java.util.List<Double> samples=new ArrayList<Double>();\r\n int nBytesRead=0;\r\n final int EXTERNAL_BUFFER_SIZE=(int)Math.pow(2, 13); //128000;\r\n byte[] abData=new byte[EXTERNAL_BUFFER_SIZE];\r\n //boolean isOn=false;\r\n while(nBytesRead != -1 && !stopped) {\r\n try {\r\n nBytesRead=m_audioInputStream.read(abData, 0, abData.length);\r\n } catch(IOException e) {\r\n e.printStackTrace();\r\n }\r\n if(nBytesRead > 0) {\r\n //System.err.println(\"data captured: \"+nBytesRead);\r\n final double[] in=new double[nBytesRead / 2+1]; // >>> 16 bit\r\n int j=0;\r\n for(int i=0; i < nBytesRead - 1; i+=2) {\r\n byte left=abData[i];\r\n int right=abData[i + 1];\r\n right<<=8;\r\n right|=(left & 0xFF);\r\n in[j+1]=right / 65536.0; // >>>65535=2^16\r\n j++;\r\n }\r\n\r\n double averageIntensity=0;\r\n try {\r\n final Sound intensitySound=Sound.Sound_createSimple(1, (in.length-1) / (double)SAMPLE_RATE, SAMPLE_RATE);\r\n intensitySound.z[1]=in;\r\n final SoundEditor edit=SoundEditor.SoundEditor_create(\"\", intensitySound);\r\n edit.computeIntensity();\r\n averageIntensity=edit.computeAverageIntensity();\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n continue; //>>>?\r\n }\r\n final double ai=averageIntensity;\r\n SwingUtilities.invokeLater(new Runnable() { //>>> not good\r\n public void run() {\r\n for(IntensityListener lis: itenListener) {\r\n lis.gotIntensity(ai); //notify listeners\r\n }\r\n }\r\n });\r\n\r\n /*if(INTENSITY_THRESHOLD<0) {\r\n INTENSITY_THRESHOLD=(int)ai+20;\r\n System.err.println(\"t:\"+ai);\r\n } else {*/\r\n//System.err.println(ai);\r\n if(ai>=settings.noiseLevel) { //filter weak noises\r\n //>>> too long? \r\n for(int i=1; i<in.length; i++) {\r\n samples.add(in[i]);\r\n }\r\n } else {\r\n analyzePitch(samples);\r\n samples.clear();\r\n }\r\n //}\r\n }\r\n }\r\n //System.err.println(\"got sample\");\r\n \r\n \r\n//System.err.println(\"done\");\r\n }", "public void sensorReader() {\n try {\n Log.i(TAG, \"wants to read from Arduino\");\n this.inputStream = socket.getInputStream();\n this.inputStreamReader = new InputStreamReader(inputStream);\n Log.i(TAG, \"inputstream ready\");\n this.bufferedReader = new BufferedReader(inputStreamReader);\n Log.i(TAG, \"buffered reader ready\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void loop() {\n telemetry.addData(\"Status\", \"Running: \" + runtime.toString());\n\n //zAccumulated = mrGyro.getIntegratedZValue(); //Set variables to gyro readings\n\n heading = 360 - mrGyro.getHeading(); //Reverse direction of heading to match the integrated value\n if (heading == 360)\n {\n heading = 0;\n }\n\n xVal = mrGyro.rawX() / 128; //Lowest 7 bits are noise\n yVal = mrGyro.rawY() / 128;\n zVal = mrGyro.rawZ() / 128;\n\n //The below two if() statements ensure that the mode of the color sensor is changed only once each time the touch sensor is pressed.\n //The mode of the color sensor is saved to the sensor's long term memory. Just like flash drives, the long term memory has a life time in the 10s or 100s of thousands of cycles.\n //This seems like a lot but if your program wrote to the long term memory every time though the main loop, it would shorten the life of your sensor.\n\n if (!buttonState && gamepad1.x) { //If the touch sensor is just now being pressed (was not pressed last time through the loop but now is)\n buttonState = true; //Change touch state to true because the touch sensor is now pressed\n LEDState = !LEDState; //Change the LEDState to the opposite of what it was\n if(LEDState)\n {\n BallSensorreader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else\n {\n BallSensorreader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n }\n\n if (!gamepad1.x) //If the touch sensor is now pressed\n buttonState = false; //Set the buttonState to false to indicate that the touch sensor was released\n\n BallSensorcache = BallSensorreader.read(0x04, 1);\n\n if (gamepad2.a)\n liftSpeed = 1;\n if (gamepad2.b)\n liftSpeed = 0.5;\n\n driveSpeed = 1;\n\n if (gamepad1.right_bumper)\n driveSpeed = 0.5;\n\n if (gamepad1.left_bumper)\n driveSpeed = 0.25;\n\n // Run wheels in tank mode (note: The joystick goes negative when pushed forwards, so negate it)\n frontLeft = ( gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front right\n frontRight = ( gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Front left\n backLeft = (-gamepad1.left_stick_x - gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back right\n backRight = (-gamepad1.left_stick_x + gamepad1.left_stick_y - gamepad1.right_stick_x)/2 * driveSpeed; //Back left\n Lift = gamepad2.left_stick_y * liftSpeed;\n\n robot.FL_drive.setPower(frontLeft);\n robot.FR_drive.setPower(frontRight);\n robot.BL_drive.setPower(backLeft);\n robot.BR_drive.setPower(backRight);\n robot.Lift.setPower(Lift);\n\n // Left servo going in means more\n if (gamepad2.left_bumper)\n leftPosition += LEFT_SPEED;\n else if (gamepad2.y)\n leftPosition = LEFT_MIN_RANGE;\n\n // Right servo going in means less\n if (gamepad2.right_bumper)\n rightPosition -= RIGHT_SPEED;\n else if (gamepad2.y)\n rightPosition = RIGHT_MAX_RANGE;\n\n if (gamepad2.x)\n {\n rightPosition = 0.96;\n leftPosition = 0.44;\n }\n\n if (gamepad1.a)\n target = target + 45;\n if (gamepad1.b)\n target = target - 45;\n\n //turnAbsolute(target);\n\n // Move both servos to new position.\n leftPosition = Range.clip(leftPosition, robot.LEFT_MIN_RANGE, robot.LEFT_MAX_RANGE);\n robot.Left.setPosition(leftPosition);\n rightPosition = Range.clip(rightPosition, robot.RIGHT_MIN_RANGE, robot.RIGHT_MAX_RANGE);\n robot.Right.setPosition(rightPosition);\n\n // Send telemetry message to signify robot running;\n telemetry.addData(\"Left\", \"%.2f\", leftPosition);\n telemetry.addData(\"Right\", \"%.2f\", rightPosition);\n telemetry.addData(\"frontLeft\", \"%.2f\", frontLeft);\n telemetry.addData(\"frontRight\", \"%.2f\", frontRight);\n telemetry.addData(\"backLeft\", \"%.2f\", backLeft);\n telemetry.addData(\"backRight\", \"%.2f\", backRight);\n telemetry.addData(\"Lift\", \"%.2f\", Lift);\n\n //display values\n telemetry.addData(\"1 #A\", BallSensorcache[0] & 0xFF);\n\n telemetry.addData(\"3 A\", BallSensorreader.getI2cAddress().get8Bit());\n\n telemetry.addData(\"1. heading\", String.format(\"%03d\", heading)); //Display variables to Driver Station Screen\n telemetry.addData(\"2. target\", String.format(\"%03d\", target));\n telemetry.addData(\"3. X\", String.format(\"%03d\", xVal));\n telemetry.addData(\"4. Y\", String.format(\"%03d\", yVal));\n telemetry.addData(\"5. Z\", String.format(\"%03d\", zVal));\n\n telemetry.update(); //Limited to 100x per second\n\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (Minutes*60+Seconds==time){\n switch(event.sensor.getType()) {\n case Sensor.TYPE_STEP_DETECTOR:\n values[0]++;\n break;\n case Sensor.TYPE_ACCELEROMETER:\n values[1]+=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n values[1]/=2;\n break;\n case Sensor.TYPE_GYROSCOPE:\n values[2]+=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n values[2]/=2;\n break;\n }\n }\n else{\n if(values[0]==0||values[1]==0||values[2]==0){\n prediction.setText(\"00:00:00\");\n }\n else{\n predictionValue = Math.round(doInference(values));\n prediction.setText(\"00:\" + String.valueOf(predictionValue/60) + \":\" + String.valueOf(predictionValue%60));\n if(predictionValue>1.1*Double.parseDouble(target.getText().toString())){ //too slow\n pace.setBackgroundColor(Color.GREEN);\n pace.setText(\"SPEED UP!\");\n }\n else if(predictionValue<0.9*Double.parseDouble(target.getText().toString())){ //too fast\n pace.setBackgroundColor(Color.RED);\n pace.setText(\"SLOW DOWN!\");\n }\n else{\n pace.setBackgroundColor(Color.YELLOW);\n pace.setText(\"GOOD JOB!\");\n }\n }\n switch(event.sensor.getType()) {\n case Sensor.TYPE_STEP_DETECTOR:\n values[0]=1;\n values[1]=0;\n values[2]=0;\n break;\n case Sensor.TYPE_ACCELEROMETER:\n values[0]=0;\n values[1]=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n values[2]=0;\n break;\n case Sensor.TYPE_GYROSCOPE:\n values[0]=0;\n values[1]=0;\n values[2]=(Math.sqrt(\n event.values[0]*event.values[0]+\n event.values[1]*event.values[1]+\n event.values[2]*event.values[2])\n );\n break;\n }\n time = Minutes*60+Seconds;\n }\n\n }", "private void readMeasurementData() {\n if (choice == 1){\n readImperialData();\n } \n if (choice == 2){\n readMetricData();\n }\n }", "private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }", "public boolean setup() {\n\t\tmakeStream(EVENT, EVENT_BUFFER_SIZE);\n\t\t\n\t\tmakeStream(BAROMETER, BAROMETER_BUFFER_SIZE);\n\t\trocket.barometer.setListener(new MS5611.MS5611Listener() {\n\t\t\t@Override\n\t\t\tpublic void onData(int P /* mbar */, int TEMP /* C */) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(BAROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + BAROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeInt(P);\n\t\t\t\t\t\t\tstream.writeInt(TEMP);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + BAROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(String message) {}\n\t\t});\n\t\t\n//\t\tmakeStream(GYRO, GYRO_BUFFER_SIZE);\n//\t\trocket.gyro.setListener(new ITG3205.ITG3205Listener() {\n//\t\t\t@Override\n//\t\t\tpublic void onDeviceId(byte deviceId) {}\n//\t\t\t\n//\t\t\t@Override\n//\t\t\tpublic void onData(int x, int y, int z, int temperature) {\n//\t\t\t\tif (enabled) {\n//\t\t\t\t\tDataOutputStream stream = out.get(GYRO);\n//\t\t\t\t\t\n//\t\t\t\t\tif (stream == null) {\n//\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + GYRO + \".\");\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n//\t\t\t\t\t\t\tstream.writeInt(x);\n//\t\t\t\t\t\t\tstream.writeInt(y);\n//\t\t\t\t\t\t\tstream.writeInt(z);\n//\t\t\t\t\t\t\tstream.writeInt(temperature);\n//\t\t\t\t\t\t} catch (IOException e) {\n//\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + GYRO + \" values to output stream.\");\n//\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t\treturn;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\t@Override\n//\t\t\tpublic void onError(String message) {}\n//\t\t});\n\t\t\n\t\tmakeStream(LOX_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.loxPressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(LOX_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + LOX_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + LOX_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(ETHANOL_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.ethanolPressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ETHANOL_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ETHANOL_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ETHANOL_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(ENGINE_PRESSURE, PRESSURE_BUFFER_SIZE);\n\t\trocket.enginePressure.setListener(new P51500AA1365V.P51500AA1365VListener() {\n\t\t\t@Override\n\t\t\tpublic void onVoltage(float voltage) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ENGINE_PRESSURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ENGINE_PRESSURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(voltage);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ENGINE_PRESSURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(ACCELEROMETER, ACCELEROMETER_BUFFER_SIZE);\n\t\trocket.accelerometer.setListener(new ADXL345.ADXL345Listener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onDeviceId(byte deviceId) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onMultiplier(float multiplier) {\n\t\t\t\tbyte[] data = new byte[4];\n\t\t\t\tByteBuffer.wrap(data).putFloat(multiplier);\n\t\t\t\tevent(Event.ACCELEROMETER_MULTIPLIER, data);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(int x, int y, int z) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(ACCELEROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + ACCELEROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeInt(x);\n\t\t\t\t\t\t\tstream.writeInt(y);\n\t\t\t\t\t\t\tstream.writeInt(z);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + ACCELEROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onError(String message) {}\n\t\t\t\n\t\t});\n\t\t\n\t\tmakeStream(INTERNAL_ACCELEROMETER, ACCELEROMETER_BUFFER_SIZE);\n\t\trocket.internalAccelerometer.setListener(new PhoneAccelerometer.PhoneAccelerometerListener() {\n\t\t\t@Override\n\t\t\tpublic void onPhoneAccelerometer(float x, float y, float z) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(INTERNAL_ACCELEROMETER);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + INTERNAL_ACCELEROMETER + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(x);\n\t\t\t\t\t\t\tstream.writeFloat(y);\n\t\t\t\t\t\t\tstream.writeFloat(z);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + INTERNAL_ACCELEROMETER + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(LOX_TEMPERATURE, TEMPERATURE_BUFFER_SIZE);\n\t\trocket.loxTemperature.setListener(new MAX31855.MAX31855Listener() {\n\t\t\t@Override\n\t\t\tpublic void onFault(byte fault) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(float internal, float thermocouple) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(LOX_TEMPERATURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + LOX_TEMPERATURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(internal);\n\t\t\t\t\t\t\tstream.writeFloat(thermocouple);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + LOX_TEMPERATURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tmakeStream(IGNITOR_TEMPERATURE, TEMPERATURE_BUFFER_SIZE);\n\t\trocket.ignitorTemperature.setListener(new MAX31855.MAX31855Listener() {\n\t\t\t@Override\n\t\t\tpublic void onFault(byte fault) {}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onData(float internal, float thermocouple) {\n\t\t\t\tif (enabled) {\n\t\t\t\t\tDataOutputStream stream = out.get(IGNITOR_TEMPERATURE);\n\t\t\t\t\t\n\t\t\t\t\tif (stream == null) {\n\t\t\t\t\t\tApp.log.e(App.TAG, \"Output stream not available for \" + IGNITOR_TEMPERATURE + \".\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tstream.writeFloat(App.elapsedTime());\n\t\t\t\t\t\t\tstream.writeFloat(internal);\n\t\t\t\t\t\t\tstream.writeFloat(thermocouple);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tApp.log.e(App.TAG, \"Failed to write \" + IGNITOR_TEMPERATURE + \" values to output stream.\");\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn true;\n\t}", "public void run() {\n\t\ttry {\n\n\t\t\tString input = in.readLine();\n\t\t\tSystem.out.println(input);\n\t\t\t\n\t\t\tif (input.equalsIgnoreCase(\"a\")) {\n\t\t\t\t//input = in.readLine();\n\t\t\t\tsensor.changeState(input);\n\t\t\t\t//out.println(sensor.getOutputValue());\n\t\t\t\t// out.println(\"led settato correttamente\");\n\t\t\t\t//out.flush();\n\t\t\t} else if (input.equals(\"Presenze\")) {\n\t\t\t\t//input = in.readLine();\n\t\t\t\tString attendences = sensor.returnAttendences();\n\t\t\t\tSystem.out.println(attendences);\n\t\t\t\tout.println(attendences);\n\t\t\t\tout.flush();\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createDataSet(){\n final Thread thread = new Thread(new Runnable() {\r\n public void run(){\r\n while(true){//we want this running always, it is ok running while robot is disabled.\r\n whileCount++;\r\n currentVoltage = angleMeter.getVoltage(); //gets the non-average voltage of the sensor\r\n runningTotalVoltage[currentIndex] = currentVoltage;//store the new data point\r\n currentIndex = (currentIndex + 1) % arraySize;//currentIndex is the index to be changed\r\n if (bufferCount < arraySize) {\r\n bufferCount++;//checks to see if the array is full of data points\r\n }\r\n }\r\n }\r\n });\r\n thread.start();\r\n }", "public void run() {\n\t\tboolean flag = true;\n\t\t\n\t\t//Testing if all the threads are initialized with some random value.\n\t\twhile(flag) {\n\t\t\tflag = false;\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tif(GlobalInfo.inputs[i]==-1)\n\t\t\t\t\tflag = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint[] snapshot = new int[10];\n\t\tint[] sortedSnapshot;\n\t\t\t\t\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\t//Checking if queue is empty or not\n\t\t\tif(GlobalInfo.pipeLine.peek() != null)\n\t\t\t{\n\t\t\t\tsnapshot = GlobalInfo.pipeLine.poll();\n\t\t\t\t\n\t\t\t\t//printing snapshot\n\t\t\t\tSystem.out.format(\"The snapshot is: \");\n\t\t\t\tfor (int i = 0; i < snapshot.length; i++) {\n\t\t\t\t\tSystem.out.format(\"%d,\", snapshot[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\tsortedSnapshot = Arrays.copyOf(snapshot, snapshot.length);\n\t\t\t\t\n\t\t\t\tSortHelper.sortForkAndJoin(sortedSnapshot);\n\t\t\t\t\n\t\t\t\t//printing sorted snapshot\n\t\t\t\tSystem.out.format(\"The sorted snapshot is: \");\n\t\t\t\tfor (int i = 0; i < sortedSnapshot.length; i++) {\n\t\t\t\t\tSystem.out.format(\"%d,\", sortedSnapshot[i]);\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\tGlobalInfo.completeThreads=0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Performing fusion of data and validating results\n\t\t\t\tfuseAdd1 adder = new fuseAdd1(sortedSnapshot);\n\t\t\t\tThread adderThread = new Thread(adder);\n\t\t\t\tadderThread.start();\n\t\t\t\t\n\t\t\t\tfuseMultiply1 multiplier = new fuseMultiply1(sortedSnapshot);\n\t\t\t\tThread multiplierThread = new Thread(multiplier);\n\t\t\t\tmultiplierThread.start();\n\t\t\t\t\n\t\t\t\tfuseAverage1 averager = new fuseAverage1(sortedSnapshot);\n\t\t\t\tThread averagerThread = new Thread(averager);\n\t\t\t\taveragerThread.start();\n\t\t\t\t\n\t\t\t\twhile(GlobalInfo.completeThreads < 3){\n\t\t\t\t\t//wait for all three fusions to take place.\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException, InterruptedException\n {\n String sensor1 = null;\n String sensor2 = null;\n String sensor1ID = \"28-03168c10ddff\";\n String sensor2ID = \"28-03168c3c82ff\";\n String sensor1data;\n String sensor2data;\n float sensor1converted;\n float sensor2converted;\n \n Statement statement = null; \n ResultSet result = null;\n \n String sensor1sql = \"\";\n String sensor2sql = \"\";\n \n \n DatabaseConnectionPi connection = new DatabaseConnectionPi();\n HeatingController LEDcontroller = new HeatingController();\n LEDcontroller.setHeatingInitialStatus(); \n \n while(true)\n {\n W1Master sensorsMaster = new W1Master();\n List<W1Device> sensorsList = sensorsMaster.getDevices(TmpDS18B20DeviceType.FAMILY_CODE);\n for(W1Device sensor : sensorsList)\n {\n //System.out.println(\"SENSOR ID: \" + sensor.getId());\n //float sensortemp = (float)((TemperatureSensor)sensor).getTemperature();\n \n //System.out.println(\"SENSOR TEMP: \" + sensortemp);\n String s = sensor.getId();\n String formattedSensorString = s.substring(0, s.length()-1); //removing last character from the sensor.getId() returned value\n if(formattedSensorString.equals(\"28-03168c10ddff\"))\n {\n float sensor1temp = (float)((TemperatureSensor)sensor).getTemperature();\n connection.sendSensor1Data(sensor.getId(), sensor1temp, getDate(), getTime());\n System.out.println(\"Sensor 1(Room): \" + sensor1temp);\n }\n \n else if(formattedSensorString.equals(\"28-03168c3c82ff\"))\n {\n float sensor2temp = (float)((TemperatureSensor)sensor).getTemperature(); \n connection.sendSensor2Data(sensor.getId(), sensor2temp, getDate(), getTime());\n System.out.println(\"Sensor 2(Outdoor): \" + sensor2temp);\n }\n }\n if(connection.getHeatingState() == 1)\n {\n LEDcontroller.setHeatingOn();\n }\n else if (connection.getHeatingState() == 0)\n {\n LEDcontroller.setHeatingOff();\n }\n TimeUnit.SECONDS.sleep(1);\n }\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_m[0] = event.values[0];\r\n\t\t\t\ttemp_m[1] = event.values[1];\r\n\t\t\t\ttemp_m[2] = event.values[2];\r\n\t\t\t}", "public void startSensors() {\n // Register listeners for each sensor\n sensorManager.registerListener(sensorEventListener, accelerometer, SensorManager.SENSOR_DELAY_GAME);\n }", "@Override\n public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {\n readNextSensor(gatt);\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n\n long currentTimeUnix = System.currentTimeMillis() / 1000L;\n long nSeconds = 30L;\n\n // send heartrate data and create new intent\n if (event.sensor.getType() == SENS_HEARTRATE && event.values.length > 0 && event.accuracy > 0) {\n int newValue = Math.round(event.values[0]);\n\n if(newValue!=0 && lastTimeSentUnixHR < (currentTimeUnix-nSeconds)) {\n lastTimeSentUnixHR = System.currentTimeMillis() / 1000L;\n currentValue = newValue;\n\n Log.d(TAG, \"Broadcast HR.\");\n Intent intent = new Intent();\n intent.setAction(\"com.example.Broadcast\");\n intent.putExtra(\"HR\", event.values);\n intent.putExtra(\"ACCR\", event.accuracy);\n intent.putExtra(\"TIME\", event.timestamp);\n sendBroadcast(intent);\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n\n }\n }\n // also send motion/humidity/step data to know when NOT to interpret hr data\n\n if (event.sensor.getType() == SENS_STEP_COUNTER && event.values[0]-currentStepCount!=0) {\n\n if(lastTimeSentUnixSC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixSC = System.currentTimeMillis() / 1000L;\n currentStepCount = event.values[0];\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n\n }\n\n if (event.sensor.getType() == SENS_ACCELEROMETER) {\n\n if(lastTimeSentUnixACC < (currentTimeUnix-nSeconds)){\n lastTimeSentUnixACC = System.currentTimeMillis() / 1000L;\n\n client.sendSensorData(event.sensor.getType(), event.accuracy, event.timestamp, event.values);\n }\n }\n\n }", "private void printActualSensorData() throws IOException , InterruptedException{\n\n System.out.println(\"*----------------------------\");\n for (SensorData sensorData : actualSensorDatas) {\n System.out.println(\"Received a packet: IP:Port: \" + sensorData.printSensorData());\n }\n //Thread.sleep(10000);\n //System.out.print(\"\\033[H\\033[2J\");\n System.out.println(\"----------------------------*\");\n\n }", "public void run() {\n\t\tString result;\n\t\tthis.running = true;\n\t\tdouble position[] = new double[3];\n\t\tdouble measures[] = new double[360];\n\n\t\twhile (running) {\n\t\t\ttry {\n\t\t\t\tPipedInputStream pipeIn = new PipedInputStream();\n\t\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(pipeIn));\n\t\t\t\tPrintWriter output = new PrintWriter(new PipedOutputStream(pipeIn), true);\n\t\t\t\trobot.setOutput(output);\n\n\t\t\t\t//ases where a variable value is never used after its assignment, i.e.:\n\t\t\t\tSystem.out.println(\"intelligence running\");\n\n\t\t\t\trobot.sendCommand(\"R1.GETPOS\");\n\t\t\t\tresult = input.readLine();\n\t\t\t\tparsePosition(result, position);\n\t\t\t\trecords.clear();\n\t\t\t\trobot.sendCommand(\"L1.SCAN\");\n\t\t\t\tresult = input.readLine();\n\t\t\t\tif (result.substring(0, 4).equalsIgnoreCase(\"SCAN\")) {\n\t\t\t\t\tparseMeasures(result, measures);\n\t\t\t\t}\n\t\t\t\trobot.sendCommand(\"S1.SCAN\");\n\t\t\t\tresult = input.readLine();\n\t\t\t\tif (result.substring(0, 4).equalsIgnoreCase(\"SCAN\")) {\n\t\t\t\t\tparseMeasures(result, measures);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tif (result.substring(0, 4).equalsIgnoreCase(\"SCAN\")) {\n\t\t\t\t\t\t//addCommandToRobot(result,measures);\n\t\t\t\t\t\t//parseMeasures(result, measures);\n\t\t\t\t\t\tif (!addCommand()) //If it doesn't add any command go forward\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trobot.sendCommand(\"P1.MOVEFW 15\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"E! :(\");\n\t\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\t}\n\t\t\t\tmap.drawLaserScan(position, measures);\n\n\t\t\t\tpipeIn.close();\n\t\t\t\tinput.close();\n\t\t\t\toutput.close();\n\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tSystem.err.println(\"IOE! :(\");\n\t\t\t\tSystem.err.println(\"execution stopped\");\n\t\t\t\trunning = false;\n\t\t\t}\n\t\t}\n\t}", "public void handleSensorEvents(){\n\t}", "public void process(){\n\n for(int i = 0; i < STEP_SIZE; i++){\n String tmp = \"\" + accData[i][0] + \",\" + accData[i][1] + \",\"+accData[i][2] +\n \",\" + gyData[i][0] + \",\" + gyData[i][1] + \",\" + gyData[i][2] + \"\\n\";\n try{\n stream.write(tmp.getBytes());\n }catch(Exception e){\n //Log.d(TAG,\"!!!\");\n }\n\n }\n\n /**\n * currently we don't apply zero-mean, unit-variance operation\n * to the data\n */\n // only accelerator's data is using, currently 200 * 3 floats\n // parse the 1D-array to 2D\n\n if(recognizer.isInRecognitionState() &&\n recognizer.getGlobalRecognitionTimes() >= Constants.MAX_GLOBAL_RECOGNITIOME_TIMES){\n recognizer.resetRecognitionState();\n }\n if(recognizer.isInRecognitionState()){\n recognizer.removeOutliers(accData);\n recognizer.removeOutliers(gyData);\n\n double [] feature = new double [FEATURE_SIZE];\n recognizer.extractFeatures(feature, accData, gyData);\n\n int result = recognizer.runModel(feature);\n String ret = \"@@@\";\n if(result != Constants.UNDEF_RET){\n if(result == Constants.FINISH_RET){\n mUserWarningService.playSpeech(\"Step\" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO);\n waitForPlayout(2000);\n mUserWarningService.playSpeech(Constants.FINISH_INFO);\n waitForPlayout(1);\n recognizer.resetLastGesutre();\n recognizer.resetRecognitionState();\n ret += \"1\";\n }else if(result == Constants.RIGHT_RET){\n mUserWarningService.playSpeech(\"Step\" + Integer.toString(recognizer.getLastGesture()) + Constants.RIGHT_GESTURE_INFO);\n waitForPlayout(2000);\n mUserWarningService.playSpeech(\"Now please do Step \" + Integer.toString(recognizer.getExpectedGesture()));\n waitForPlayout(1);\n ret += \"1\";\n }else if(result == Constants.ERROR_RET){\n mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getExpectedGesture());\n waitForPlayout(1);\n ret += \"0\";\n }else if(result == Constants.ERROR_AND_FORWARD_RET){\n mUserWarningService.playSpeech(Constants.WRONG_GESTURE_WARNING + recognizer.getLastGesture());\n waitForPlayout(1);\n if(recognizer.getExpectedGesture() <= Constants.STATE_SPACE){\n mUserWarningService.playSpeech(\n \"Step \" + recognizer.getLastGesture() + \"missing \" +\n \". Now please do Step\" + Integer.toString(recognizer.getExpectedGesture()));\n waitForPlayout(1);\n }else{\n recognizer.resetRecognitionState();\n mUserWarningService.playSpeech(\"Recognition finished.\");\n waitForPlayout(1);\n }\n\n\n ret += \"0\";\n }\n ret += \",\" + Integer.toString(result) + \"@@@\";\n\n Log.d(TAG, ret);\n Message msg = new Message();\n msg.obj = ret;\n mWriteThread.writeHandler.sendMessage(msg);\n }\n }\n\n }", "protected void postSensorValues(Sensor[] s) { sensors = s; }", "@Override\n\tpublic void Update(float temperature, float humidity, float pressure) {\n\t\ttemperatureSum += temperature;\n\t\tnumReadings++;\n\t\t\n\t\tif (temperature > maxTemp) {\n\t\t\tmaxTemp = temperature;\n\t\t}\n\t\t\n\t\tif (temperature < minTemp) {\n\t\t\tminTemp = temperature;\n\t\t}\n\t}", "private boolean loop() throws Exception{\n\t\treadSensors(100);\r\n\t\tint[] lightBumpReadings = getLightBumps();\r\n\t\tdriveDirect(300, 300);\r\n\t\t//driveDirect(500,350);\r\n\t\t\r\n\t\tif(lightBumpReadings[0]>0){\r\n\t\t\tdriveDirect(175,100);\r\n\t\t\tsleep(300);\r\n\t\t\t\r\n\t\t}\r\n\t\tif(lightBumpReadings[1]>0){\r\n\t\t\tdriveDirect(150,100);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[2]>0){\r\n\t\t\tdriveDirect(125,100);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[3]>0){\r\n\t\t\tdriveDirect(100,125);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[4]>0){\r\n\t\t\tdriveDirect(100,150);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\tif(lightBumpReadings[5]>0){\r\n\t\t\tdriveDirect(100,175);\r\n\t\t\tsleep(300);\r\n\t\t}\r\n\t\t\r\n\t\tif(lightBumpReadings[2]>0 && lightBumpReadings[3]>0){\r\n\t\t\tdriveDirect(0,500);\r\n\t\t\tsleep(750);\r\n\t\t\tif(lightBumpReadings[2]>0 && lightBumpReadings[3]>0){\r\n\t\t\t\tdriveDirect(0,500);\r\n\t\t\t\tsleep(1500);\r\n\t\t\t\tif(lightBumpReadings[2]>0 && lightBumpReadings[3]>0){\r\n\t\t\t\t\tdriveDirect(0,500);\r\n\t\t\t\t\tsleep(750);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdriveDirect(300,300);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tdriveDirect(300,300);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public void run() {\n on_mode = true;\n while(on_mode) {\n try {\n leftColorSensor.getRedMode().fetchSample(leftRgbArr, 0);\n rightColorSensor.getRedMode().fetchSample(rightRgbArr, 0);\n leftRedVal = leftRgbArr[0] * 100;\n rightRedVal = rightRgbArr[0] * 100;\n Thread.sleep(50);\n \n } catch(InterruptedException e) {\n if (on_mode == false)\n break;\n } \n }\n }", "public void run(){\n this.p_absoluteTemperature = 0.001;\n //this.p_temperatureFactor = 7.5;\n this.p_temperatureFactor = 10;\n \n // Set original and current temperature\n this.temperatureInitial = 100;\n this.temperature = 100;\n \n runAlgorithm();\n }", "@Override\n public void run() {\n TSimInterface tsi = TSimInterface.getInstance();\n\n try {\n tsi.setSpeed(id, speed);\n while(true) {\n SensorEvent e = tsi.getSensor(id);\n passSensor(e);\n }\n } catch (CommandException e) {\n e.printStackTrace(); // or only e.getMessage() for the error\n System.exit(1);\n } catch (InterruptedException e) {\n e.printStackTrace(); // or only e.getMessage() for the error\n System.exit(1);\n }\n }", "@Override\n public void onSensorChanged (SensorEvent event) {\n\n Sensor mySensor = event.sensor;\n\n if (mySensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n float x = event.values[0];\n float y = event.values[1];\n float z = event.values[2];\n\n// output.setText(\"x=\" + x + \"y=\" + y + \"z=\" + z);\n // Log.i(\"acc\",(\"x=\" + x + \"y=\" + y + \"z=\" + z));\n// try {\n// String value=String.valueOf(x)+\",\"+String.valueOf(y)+\",\"+ String.valueOf(z);\n// // outvalue.write(value.getBytes());\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// Log.i(\"acc\", Float.toString(x) + Float.toString(y)+Float.toString(z));\n\n }\n }", "private void calculateOutputPower() { \n if (this.online == true) {\n this.rms = Math.sqrt(this.rmsSum / 40);\n if (this.inputPower - this.rms >= 0) {\n setOutputPower(this.inputPower - this.rms);\n } else {\n setOutputPower(0);\n }\n }\n channel.updateOutput();\n }", "private int syncEnergyData() throws IOException {\n\n // initialize some useful dates\n Calendar today = Calendar.getInstance();\n //today.add(Calendar.MINUTE, -15);\n Calendar year_ago = Calendar.getInstance();\n year_ago.add(Calendar.YEAR, -1);\n Calendar week_ago = Calendar.getInstance();\n week_ago.add(Calendar.MONTH, -1);\n Calendar day_ago = Calendar.getInstance();\n day_ago.add(Calendar.DATE, -1);\n\n\n String consumption_point = \"carleton_campus_en_use\";\n String production_point = \"carleton_wind_production\";\n\n //get the two live data points for first screen\n\n String quarter_hourly_consumption = readEnergyJSON(day_ago.getTime(), today.getTime(), \"quarterhour\", consumption_point);\n Log.i(\"quarter_hourly_consumption\", quarter_hourly_consumption);\n // update liveConsumption based on data from most recent complete 1/4 hour\n String[] consumption_list = quarter_hourly_consumption.split(\"[\\n|\\r]\");\n String recent_consumption_line = consumption_list[consumption_list.length - 2];\n liveConsumption = (Double.parseDouble(recent_consumption_line.substring(recent_consumption_line.indexOf(';') + 1, recent_consumption_line.length())));\n\n // quarter-hourly windmill1 production for past 24 hours\n String quarter_hourly_production1 = readEnergyJSON(day_ago.getTime(), today.getTime(), \"quarterhour\", production_point);\n // update liveProduction based on data from most recent complete 1/4 hour\n String[] production1_list = quarter_hourly_production1.split(\"[\\n|\\r]\");\n String recent_production1_line = production1_list[production1_list.length - 2];\n liveProduction1 = (Double.parseDouble(recent_production1_line.substring(recent_production1_line.indexOf(';') + 1, recent_production1_line.length())));\n\n // update values stored in sharedPref for next time app loads\n SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor ed = sharedPref.edit();\n ed.putFloat(\"liveConsumption\", (float)liveConsumption);\n ed.putFloat(\"liveProduction1\", (float)liveProduction1);\n ed.commit();\n\n\n // get all the graph data and save in files\n String[] time_units = {\"day\", \"hour\", \"quarterhour\"};\n Date[] start_dates = {year_ago.getTime(), week_ago.getTime(), day_ago.getTime()};\n String[] points = {consumption_point, production_point};\n String[] dependent_variables = {\"consumption\", \"production1\"};\n\n for (int i = 0; i < time_units.length; i++) {\n String increment = time_units[i];\n Date start = start_dates[i];\n\n for (int j = 0; j < points.length; j++) {\n String data = readEnergyJSON(start, today.getTime(), increment, points[j]);\n\n try {\n DataOutputStream out = new DataOutputStream(\n context.openFileOutput(increment + \"_\" + dependent_variables[j] +\n \"_data\", Context.MODE_PRIVATE));\n out.writeUTF(data);\n out.close();\n } catch (IOException e) {\n Log.i(\"syncEnergyData\", \"I/O Error\");\n }\n }\n }\n return 0;\n }", "protected Sensor[] getSensorValues() { return sensors; }", "private void startReading() {\r\n\r\n isReading = true;\r\n Thread readingThread = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n while (isReading) {\r\n synchronized (this) {\r\n int ret;\r\n\r\n // Fetch the data here\r\n if(mUsbDeviceConnection != null && mUsbEndpointIn != null){\r\n byte[] bytes = new byte[mUsbEndpointIn.getMaxPacketSize()];\r\n ret = mUsbDeviceConnection.bulkTransfer(mUsbEndpointIn, bytes, bytes.length, 1000);\r\n\r\n if (ret >= 64) {\r\n if(bytes[1] == (byte)0xc8){\r\n // USB_COMMAND_ACK\r\n }\r\n else{\r\n // DATA Frame, bytes[1] should be 0x65\r\n float[] accSensorData = new float[3];\r\n float[] gyroSensorData = new float[3];\r\n float[] magSensorData = new float[3];\r\n\r\n // ACC\r\n accSensorData[0] = byte2float(bytes, 4);\r\n accSensorData[1] = byte2float(bytes, 8);\r\n accSensorData[2] = byte2float(bytes, 12);\r\n\r\n // Gyro\r\n gyroSensorData[0] = byte2float(bytes, 16) * (float)Math.PI / 180.0f;\r\n gyroSensorData[1] = byte2float(bytes, 20) * (float)Math.PI / 180.0f;\r\n gyroSensorData[2] = byte2float(bytes, 24) * (float)Math.PI / 180.0f;\r\n\r\n // Mag, not used so far\r\n magSensorData[0] = (float) (byte2float(bytes, 28) * Math.PI / 180.0f);\r\n magSensorData[1] = (float) (byte2float(bytes, 32) * Math.PI / 180.0f);\r\n magSensorData[2] = (float) (byte2float(bytes, 36) * Math.PI / 180.0f);\r\n\r\n String[] msgData = new String[3];\r\n msgData[0] = String.format(\"%.2f\", accSensorData[0]) + \", \" + String.format(\"%.2f\", accSensorData[1]) + \", \" + String.format(\"%.2f\", accSensorData[2]);\r\n msgData[1] = String.format(\"%.2f\", gyroSensorData[0]) + \", \" + String.format(\"%.2f\", gyroSensorData[1]) + \", \" + String.format(\"%.2f\", gyroSensorData[2]);\r\n msgData[2] = String.format(\"%.2f\", magSensorData[0]) + \", \" + String.format(\"%.2f\", magSensorData[1]) + \", \" + String.format(\"%.2f\", magSensorData[2]);\r\n\r\n Message msg = new Message();\r\n msg.obj = msgData;\r\n msg.what = 0;\r\n mHandler.sendMessage(msg);\r\n }\r\n }\r\n else{\r\n Log.d(TAG, \"No data from USB device.\");\r\n }\r\n }\r\n else{\r\n isReading = false;\r\n Log.d(TAG, \"USB connection is not available.\");\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n Log.d(TAG, \"Start the reading thread here to retrieve sensors(acc, gyro, mag)\");\r\n readingThread.start();\r\n }", "@Override\n\tpublic Number filteredReading() {\t\n\t// Check we have any readings.\n\tif (buffer.size() == 0) return new Double(0.0);\n\n\tSensorReading reading = null;\n\tdouble sum = 0.0;\n\tdouble avge = 0.0;\n\tint index = 0;\n\n\t// Loop over buffered samples.\n\tIterator it = buffer.iterator();\n\twhile (it.hasNext()) {\n\t reading = (SensorReading)it.next();\n\t avge = avge + reading.getContinuousReading();\n\t index++;\n\t}\n\tlogger.log(2, \"Av-Filter\", name, \"filteredReading\",\"Returned: \"+\n\t\t (avge/index)+\" using \"+index+\" samples.\");\n\treturn new Double(avge / index);\n }", "public void loop() {\n telemetry.addData(\"loop count:\", mLoopCount++);\n telemetry.addData(\"version: \", \"1.3\");\n\n int[] topScan;\n int[] middleScan;\n int[] bottomScan;\n\n // get most recent frame from camera (may be same as last time or null)\n CameraLib.CameraImage frame = mCamAcqFr.loop();\n\n // log debug info ...\n if (frame != null) {\n\n // process the current frame\n // ... \"move toward the light...\"\n\n // log data about the most current image to driver station every loop so it stays up long enough to read\n Camera.Size camSize = frame.cameraSize();\n telemetry.addData(\"preview camera size: \", String.valueOf(camSize.width) + \"x\" + String.valueOf(camSize.height));\n telemetry.addData(\"preview data size:\", frame.dataSize());\n telemetry.addData(\"preview rgb(center):\", String.format(\"%08X\", frame.getPixel(camSize.width / 2, camSize.height / 2)));\n telemetry.addData(\"frame number: \", mCamAcqFr.frameCount());\n\n // log text representations of several significant scanlines\n\n topScan = frame.scanlineValue(camSize.height / 3);\n middleScan = frame.scanlineValue(camSize.height / 2);\n bottomScan = frame.scanlineValue(camSize.height * 2 / 3);\n\n //telemetry.addData(\"value a(1/3): \", topScan);\n //telemetry.addData(\"value b(1/2): \", middleScan);\n //telemetry.addData(\"value c(2/3): \", bottomScan);\n\n final int bandSize = 10;\n telemetry.addData(\"hue a(1/3): \", frame.scanlineHue(camSize.height / 3, bandSize));\n telemetry.addData(\"hue b(1/2): \", frame.scanlineHue(camSize.height / 2, bandSize));\n telemetry.addData(\"hue c(2/3): \", frame.scanlineHue(2*camSize.height / 3, bandSize));\n\n int topThresh = threshFind(topScan);\n int middleThresh = threshFind(middleScan);\n int bottomThresh = threshFind(bottomScan);\n\n telemetry.addData(\"Top Thresh\", topThresh);\n telemetry.addData(\"Middle Thresh\", middleThresh);\n telemetry.addData(\"Bottom Thresh\", bottomThresh);\n\n int topPos = findAvgOverThresh(topScan, topThresh);\n int middlePos = findAvgOverThresh(middleScan, middleThresh);\n int bottomPos = findAvgOverThresh(bottomScan, bottomThresh);\n\n telemetry.addData(\"Top Pos\", topPos);\n telemetry.addData(\"Middle Pos\", middlePos);\n telemetry.addData(\"Bottom Pos\", bottomPos);\n }\n }", "public double getReading() {\r\n\t\tresult = clicks;\r\n\t\tif(metric) result *= 0.2;\r\n\t\telse result *= 0.01;\r\n\t\treturn result;\r\n\t\t\r\n\t}", "public void onSensorChanged(SensorEvent event) {\n\t\t\tint type = event.sensor.getType();\n\t\t\tif (type == Sensor.TYPE_ACCELEROMETER) {\n\t\t\t\tlong curTime = System.currentTimeMillis();\n\t\t\t\t// only allow one update every 100ms, otherwise updates\n\t\t\t\t// come way too fast and the phone gets bogged down\n\t\t\t\t// with garbage collection\n\t\t\t\t//Log.d(TAG, \"onSensorChanged(\"+type+\")\");\t\t\t\t\n\t\t\t\tif (lastUpdate == -1 || (curTime - lastUpdate) > 40) {\n\t\t\t\t\tlastUpdate = curTime;\t\t\t\t\n\t\t\t\t\tsynchronized (LOCK){\n\t\t\t\t\t\tmLastAccOrientation = calculateAngle(event);\n\t\t\t\t\t\tmLastSample.x = event.values[0];\n\t\t\t\t\t\tmLastSample.y = event.values[1];\n\t\t\t\t\t\tmLastSample.z = event.values[2];\n\t\t\t\t\t\tmLastSample.angle = mLastAccOrientation.angle;\t\t\n\t\t\t\t\t\t//mLastSample.orientation = mLastAccOrientation.orientation;\n\t\t\t\t\t\tmLastSample.orientation = mLastAccOrientation.rotation*90;\n\t\t\t\t\t\tmLastSample.threshold = mLastAccOrientation.threshold;\n\t\t\t\t\t\tmBuffer = mLastSample.x+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.y+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.z+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.angle+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.orientation+\",\"+\n\t\t\t\t\t\t\t\t mLastSample.threshold;\n\t\t\t\t\t\tif (mShowLog)\n\t\t\t\t\t\t\tLog.d(TAG, mBuffer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "protected abstract void provideObjectReading(List<SensedObject> objects, List<Double> output);", "public void run() {\n\t\t\t\t\t\tint success;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Building Parameters\r\n\t\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\r\n\t\t\t\t\t\t\tparams.add(new BasicNameValuePair(TAG_NAME, \"TempSensor\"));\r\n\t\t\t\t\t\t\t// getting product details by making HTTP request\r\n\t\t\t\t\t\t\t// Note that product details url will use GET request\r\n\t\t\t\t\t\t\tJSONObject json = jsonParser.makeHttpRequest(\r\n\t\t\t\t\t\t\t\t\turl_read_sensor, \"GET\", params);\r\n\t\t\t\t\t\t// check your log for json response\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\",\"===========sensor value=================\");\r\n\t\t\t\t\t\t\tLog.d(\"Smart Home\",json.toString());\r\n\t\t\t\t\t\t\tString result = \"CurrentValue \" + json.getString(TAG_SENSOR) + \"\\n\";\r\n\t\t\t\t\t\t\twelcome.append(myUI.getStyle(result, 12, 15, \"GREEN\") );\t\t\t\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tcatch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "public void getInformation() throws IOException {\n\t\tList<Fire> listFeux = new ArrayList<Fire>();\n\t listFeux = this.collectData();\n\t \n\t if(this.previousIntensity > this.real_intensity) {\n\t \tthis.previousIntensity = this.real_intensity;\n\t }\n\t\t\n\t\tthis.alerte.resetIntensity();\t//on reset l'intensite\n\t\tthis.real_intensity = 0;\n\t\t\n\t for (Fire feu: listFeux) {\t\t//on recalcul l'intensite\n\t \tfor (CoordEntity coord: feu.getLocation()) {\n\t\t \tif ( (Math.abs(coord.getX() - this.localisation.x) < this.range) &&\n\t\t \t\t\t(Math.abs(coord.getY() - this.localisation.y) < this.range) ) {\n\t\t \t\tint intensity = this.getIntensityFromFire(feu);\n\t\t \t\tthis.addRealIntensity(intensity);\n\t\t \t\tif (this.isDetectable(feu) == true) {\n\t\t \t\t\tSystem.out.println(\"Detectable\");\n\t\t\t \t\tif (this.applyErrors() == true) {\n\t\t\t \t\t\tthis.alerte.setIntensity(intensity);\t\n\t\t\t \t\t}\n\t\t \t\t}\n\t }\t\t\n\t }\n\t }\n\t System.err.println(previousIntensity + \"/\" + this.real_intensity + \"/\" + this.alerte.getIntensity() );\n\t\t if (this.alerte.getIntensity() > previousIntensity) {\n\t\t \tthis.previousIntensity = this.real_intensity;\t//on recupere l'intensite mesuree precedement\n\t\t \tSystem.err.println(\"Alarme\");\n\t\t \tthis.triggerAlarm();\t//si il y a eu aggravation de l'etat du feu\n\t\t }\n\t}", "@Override\n public void onSensorChanged(SensorEvent event) {\n float[] valuesCopy = event.values.clone();\n\n if (uptime == 0) {\n uptime = event.timestamp;\n }\n\n double x = (double) ((event.timestamp - uptime))/1000000000.0;\n this.addValues(x, valuesCopy);\n\n TextView xAxisValue = (TextView) findViewById(R.id.xAxisValue);\n xAxisValue.setText(Float.toString(valuesCopy[0]) + \" \" + STI.getUnitString(sensorType));\n\n if (STI.getNumberValues(sensorType) > 1) {\n //set y value to textfield\n TextView yAxisValue = (TextView) findViewById(R.id.yAxisValue);\n yAxisValue.setText(Float.toString(valuesCopy[1]) + \" \" + STI.getUnitString(sensorType));\n\n //set z value to textfield\n TextView zAxisValue = (TextView) findViewById(R.id.zAxisValue);\n zAxisValue.setText(Float.toString(valuesCopy[2]) + \" \" + STI.getUnitString(sensorType));\n }\n }", "public double getOutput()\n {\n //\n // Read from input device without holding a lock on this object, since this could\n // be a long-running call.\n //\n final double currentInputValue = pidInput.get();\n\n synchronized (this)\n {\n final String funcName = \"getOutput\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n double prevError = currError;\n double currTime = TrcUtil.getCurrentTime();\n double deltaTime = currTime - prevTime;\n prevTime = currTime;\n currInput = currentInputValue;\n currError = setPoint - currInput;\n if (inverted)\n {\n currError = -currError;\n }\n\n if (pidCoefficients.kI != 0.0)\n {\n //\n // Make sure the total error doesn't get wound up too much exceeding maxOutput.\n //\n double potentialGain = (totalError + currError * deltaTime) * pidCoefficients.kI;\n if (potentialGain >= maxOutput)\n {\n totalError = maxOutput / pidCoefficients.kI;\n }\n else if (potentialGain > minOutput)\n {\n totalError += currError * deltaTime;\n }\n else\n {\n totalError = minOutput / pidCoefficients.kI;\n }\n }\n\n pTerm = pidCoefficients.kP * currError;\n iTerm = pidCoefficients.kI * totalError;\n dTerm = deltaTime > 0.0 ? pidCoefficients.kD * (currError - prevError) / deltaTime : 0.0;\n fTerm = pidCoefficients.kF * setPoint;\n double lastOutput = output;\n output = pTerm + iTerm + dTerm + fTerm;\n\n output = TrcUtil.clipRange(output, minOutput, maxOutput);\n\n if (rampRate != null)\n {\n if (prevOutputTime != 0.0)\n {\n double dt = currTime - prevOutputTime;\n double maxChange = rampRate * dt;\n double change = output - lastOutput;\n change = TrcUtil.clipRange(change, -maxChange, maxChange);\n output = lastOutput + change;\n }\n prevOutputTime = currTime;\n }\n\n if (debugTracer != null)\n {\n printPidInfo(debugTracer);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", output);\n }\n\n return output;\n }\n }", "@Override\n public void start() {\n runtime.reset();\n\n while (mrGyro.isCalibrating()) { //Ensure calibration is complete (usually 2 seconds)\n }\n\n if(LEDState){\n BallSensorreader.write8(3, 0); //Set the mode of the color sensor using LEDState\n }\n else{\n BallSensorreader.write8(3, 1); //Set the mode of the color sensor using LEDState\n }\n //Active - For measuring reflected light. Cancels out ambient light\n //Passive - For measuring ambient light, eg. the FTC Color Beacon\n }", "void postProcessData(){\n collectData = false;\n blueNumSteps = 0;\n List<double[]> inputListBlue = new ArrayList<>();\n List<double[]> outputListBlue = new ArrayList<>();\n for(int i = 0; i < blueList.size();i++){\n inputListBlue.add(new double[]{blueList.get(i).getYPos(), blueList.get(i).frame});\n }\n //Reset to zero\n while(blueList.size()>0){\n blueList.remove(0);\n }\n //Reset to zero\n for (int i = 0; i < outputListBlue.size(); i++) {\n outputListBlue.remove(0);\n }\n\n\n outputListBlue = cmwa(inputListBlue);\n outputListBlue = cmwa(outputListBlue);\n outputListBlue = cmwa(outputListBlue);\n outputListBlue = cmwa(outputListBlue);\n outputListBlue = cmwa(outputListBlue);\n\n\n blueNumSteps = findMax(outputListBlue);\n\n //Reset to zero\n for (int i = 0; i < inputListBlue.size(); i++) {\n inputListBlue.remove(0);\n }\n\n //Process red steps\n redNumSteps = 0;\n List<double[]> outputListRed = new ArrayList<>();\n List<double[]> inputListRed = new ArrayList<>();\n\n for(int i = 0; i < redList.size();i++){\n inputListRed.add(new double[]{redList.get(i).getYPos(), redList.get(i).frame});\n }\n //Reset to zero\n while(redList.size()>0){\n redList.remove(0);\n }\n //Reset to zero\n for (int i = 0; i < outputListRed.size(); i++) {\n outputListRed.remove(0);\n }\n\n outputListRed = cmwa(inputListRed);\n outputListRed = cmwa(outputListRed);\n outputListRed = cmwa(outputListRed);\n outputListRed = cmwa(outputListRed);\n outputListRed = cmwa(outputListRed);\n\n redNumSteps = findMax(outputListRed);\n\n //Reset to zero\n for (int i = 0; i < inputListRed.size(); i++) {\n inputListRed.remove(0);\n }\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n enableVideo = false;\n System.out.println(\"RED STEPS:\"+ redNumSteps);\n System.out.println(\"BLUE STEPS:\"+ blueNumSteps);\n if(Math.abs(blueNumSteps - redNumSteps) < 2 && Math.abs(stepCount - (blueNumSteps + redNumSteps))<2) {\n stepText.setText(USER_NAME + \"'s step length: \" + String.format(\"%.3f\", STEP_LENGTH) + \"m\" + \"\\n\" + \"Number of Steps: \" + totalNumSteps + \"\\n\" + \"Collection Complete!\");\n saveData();\n }\n else{\n stepText.setText(USER_NAME + \"'s step length: \" + String.format(\"%.3f\", STEP_LENGTH) + \"m\"+\"\\n\" + \"Data Collection Error: Steps do not Match\");\n }\n }\n });\n }", "protected void registerSensors() {\n\n Handler handler = new Handler();\n\n SensorManager sm = (SensorManager) getSystemService(SENSOR_SERVICE);\n List<Sensor> sensorList = sm.getSensorList(Sensor.TYPE_ALL);\n for (int i = 0; i < sensorList.size(); i++) {\n int type = sensorList.get(i).getType();\n if (type == Sensor.TYPE_ACCELEROMETER) {\n accelerometerResultReceiver = new SensorResultReceiver(handler);\n accelerometerResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_GYROSCOPE) {\n gyroscopeResultReceiver = new SensorResultReceiver(handler);\n gyroscopeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_MAGNETIC_FIELD) {\n magnitudeResultReceiver = new SensorResultReceiver(handler);\n magnitudeResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_ROTATION_VECTOR) {\n rotationVectorResultReceiver = new SensorResultReceiver(handler);\n rotationVectorResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_LIGHT) {\n lightResultReceiver = new LightResultReceiver(handler);\n lightResultReceiver.setReceiver(new LightReceiver());\n\n } else if (type == Sensor.TYPE_GRAVITY) {\n gravityResultReceiver = new SensorResultReceiver(handler);\n gravityResultReceiver.setReceiver(new SensorDataReceiver());\n\n } else if (type == Sensor.TYPE_PRESSURE) {\n pressureResultReceiver = new PressureResultReceiver(handler);\n pressureResultReceiver.setReceiver(new PressureReceiver());\n\n }\n }\n /*if(magnitudeResultReceiver!= null && gyroscopeResultReceiver!=null) {\n orientationResultReceiver = new SensorResultReceiver(handler);\n orientationResultReceiver.setReceiver(new SensorDataReceiver());\n }*/\n }", "@Override\n\tpublic void run() {\n\n\t\t// create array of values to add, before we start the timer\n\t\tDouble[] values = new Double[ARRAY_SIZE];\n\t\tfor (int i = 0; i < ARRAY_SIZE; i++)\n\t\t\tvalues[i] = new Double(i + 1);\n\n\t\tsum = new Double(0.0);\n\t\t// count = loop counter, i = array index\n\t\tfor (int count = 0, i = 0; count < counter; count++, i++) {\n\t\t\tif (i >= values.length)\n\t\t\t\ti = 0;\n\t\t\tsum = sum + values[i];\n\t\t}\n\n\t}", "private void UI_RefreshSensorData ()\r\n\t{\r\n\t\t\t\t\r\n\t\tlong now = System.currentTimeMillis();\r\n\t\t\r\n\t\tif (now-ts_last_rate_calc>1000)\r\n\t\t{\r\n\t\t\tsensor_event_rate=last_nAccVal/((now-ts_last_rate_calc)/1000.0);\r\n\t\t\tts_last_rate_calc=now;\r\n\t\t}\r\n\t}", "private void processData() {\n\t\tfloat S, M, VPR, VM;\n\t\tgetCal();\n\t\tgetTimestamps();\n\t\t\n \n\t\tfor(int i = 0; i < r.length; i++) {\n\t\t\t//get lux\n\t\t\tlux[i] = RGBcal[0]*vlam[0]*r[i] + RGBcal[1]*vlam[1]*g[i] + RGBcal[2]*vlam[2]*b[i];\n \n\t\t\t//get CLA\n\t\t\tS = RGBcal[0]*smac[0]*r[i] + RGBcal[1]*smac[1]*g[i] + RGBcal[2]*smac[2]*b[i];\n\t\t\tM = RGBcal[0]*mel[0]*r[i] + RGBcal[1]*mel[1]*g[i] + RGBcal[2]*mel[2]*b[i];\n\t\t\tVPR = RGBcal[0]*vp[0]*r[i] + RGBcal[1]*vp[1]*g[i] + RGBcal[2]*vp[2]*b[i];\n\t\t\tVM = RGBcal[0]*vmac[0]*r[i] + RGBcal[1]*vmac[1]*g[i] + RGBcal[2]*vmac[2]*b[i];\n \n\t\t\tif(S > CLAcal[2]*VM) {\n\t\t\t\tCLA[i] = M + CLAcal[0]*(S - CLAcal[2]*VM) - CLAcal[1]*683*(1 - pow((float)2.71, (float)(-VPR/4439.5)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCLA[i] = M;\n\t\t\t}\n\t\t\tCLA[i] = CLA[i]*CLAcal[3];\n\t\t\tif(CLA[i] < 0) {\n\t\t\t\tCLA[i] = 0;\n\t\t\t}\n \n\t\t\t//get CS\n\t\t\tCS[i] = (float) (.7*(1 - (1/(1 + pow((float)(CLA[i]/355.7), (float)1.1026)))));\n \n\t\t\t//get activity\n\t\t\ta[i] = (float) (pow(a[i], (float).5) * .0039 * 4);\n\t\t}\n\t}", "public void step() {\n // method 1 of Temperature randomness\n enPrice = 1.1 * enPrice;\n\n TempChange = Temperature * (0.1 * (1 - 2 * r.nextDouble()));\n // method 2 of Temperature\n// TempChange = temperature_list.get(count);\n// count+=1;\n\n Temperature += TempChange;\n year_num+=1;\n }", "public void readSensor() {\n try {\n Log.i(TAG, \"trying to read from sensors\");\n distance = this.bufferedReader.readLine();\n // if (distance != null && distance != \"0\") {\n Log.i(TAG, distance);\n\n // MainActivity.distance.setText(distance);\n Log.i(TAG, \"done with sensors\");\n //setBackgroundColor(Integer.parseInt(distance));\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void updateLightSensorValues()\n {\n sendMessage((byte)Constants.LIGHTSENSVAL,(byte)Constants.REQ);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.POTVAL, (byte)Constants.REQ);\n if(progPotToggleButton.isChecked())\n {\n int x =0;\n try {\n x = Integer.parseInt(progValueEditText.getText().toString());\n if(x>=0 && x<256)\n sendMessage((byte)Constants.PROGVAL,(byte)x);\n try {\n Thread.sleep(4000);\n } catch(InterruptedException ex) {\n Thread.currentThread().interrupt();\n }\n sendMessage((byte)Constants.USEPOT,(byte)Constants.NO);\n } catch (NumberFormatException e) {\n messageView.append(\"int för helvete\");\n }\n }else\n sendMessage((byte)Constants.USEPOT,(byte)Constants.YES);\n\n }", "public void runOpMode() throws InterruptedException {\n leftWheel = hardwareMap.dcMotor.get(\"leftWheel\");\n rightWheel = hardwareMap.dcMotor.get(\"rightWheel\");\n leftArm = hardwareMap.dcMotor.get(\"leftArm\");\n rightArm = hardwareMap.dcMotor.get(\"rightArm\");\n rightDistance = hardwareMap.get(DistanceSensor.class, \"rightDistance\");\n leftColor = hardwareMap.colorSensor.get(\"leftColor\");\n rightWheel.setDirection(DcMotorSimple.Direction.REVERSE);\n count = 21;\n step = 3;\n subStep = 0;\n\n sample_ready = false;\n lander_unlatched = false;\n\n //prepares and resets robot by resetting encoders\n resetDriveEncoders();\n\n //prepares robot for arm movement by setting arm motors to go to a certain position-modifiable by user input (the d-pad)\n// leftArm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n// rightArm.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n\n //HSV value array\n\n //Sends color sensor input values to the phone\n waitForStart();\n\n while (opModeIsActive()) {\n telemetry.update();\n\n\n telemetry.addLine()\n .addData(\"step\", step)\n .addData(\"subStep\", subStep)\n .addData(\"count\", count);\n telemetry.addLine()\n .addData(\"RightWheel: \", rightWheel.getCurrentPosition())\n .addData(\"LeftWheel: \", leftWheel.getCurrentPosition())\n .addData(\"TICKS_PER_WHEEL_ROTATION: \", TICKS_PER_WHEEL_ROTATION);\n\n\n//sets the step of where we are in the process to one\n // step = 1;\n//enables the if statement for lander_unlatched\n lander_unlatched = true;\n//moves the robot from the lander to where the samples are\n if (step == 1) {\n// leftWheel.setPower(0.7);\n// rightWheel.setPower(0.5);\n// leftWheel.setTargetPosition(1621);\n// rightWheel.setTargetPosition(820);\n step = 2;\n }\n if (step == 2) {\n// if (hsvValues[0] > 50) {\n// leftWheel.setPower(-0.7);\n// rightWheel.setPower(-0.5);\n// leftWheel.setTargetPosition(1221);\n step = 3;\n }\n// if step 2 is finished, makes the robot turn toward the wall, then drives against the wall.\n if (step == 3) {\n moveToDepot();\n }\n //1150 Target Units == about 1 foot, 96 Units/inch\n//sets the wheel power to 0 to limit movement\n// if (rightWheel.getCurrentPosition() == -rotation) {\n // rightWheel.setPower(0);\n //leftWheel.setPower(0);\n// }\n// if (leftWheel.getCurrentPosition() == 100) {\n// leftWheel.setPower(0);\n// rightWheel.setPower(0);\n// }\n\n sample_ready = true;\n\n// if (sample_ready) {\n//\n }\n }", "@Override\n public void run()\n {\n storage.unblock(Storage.Type.PRIMARY);\n sensorsOn = true;\n\n h.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n //shade starts a few seconds later; frameWidth / 2\n storage.unblock(Storage.Type.SHADE);\n }\n }, shadeLatency);\n System.out.println(\"X\");\n //put 2 workers to obtain and send data and refresh connection\n h.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n System.out.println(\"X1\");\n if (!experiment) {//if it is experiment, do it only once - dont put next job\n storage.sendToQualify();\n h.postDelayed(this, frameWidth); //6 seconds of data obtanining\n }\n else {\n storage.block(Storage.Type.PRIMARY);\n storage.writeToFile(getApplicationContext(), filename.toLowerCase(), Storage.Type.PRIMARY);\n }\n }\n }, frameWidth); //a few seconds later\n h.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n System.out.println(\"X2\");\n if (!experiment) {\n storage.sendShadeToQualify();\n h.postDelayed(this, frameWidth); //6 seconds of data obtanining\n }\n else { //if it is experiment, do it only once - dont put next job\n storage.block(Storage.Type.SHADE);\n storage.writeToFile(getApplicationContext(), filename.concat(\"2\"), Storage.Type.SHADE);\n //after experiment change flag and stop drawing chart\n experiment = false;\n sensorsOn = false;\n }\n }\n }, frameWidth + shadeLatency); //a few seconds later, frame + latency seconds\n if (!experiment)\n h.postDelayed(new Runnable()\n {\n @Override\n public void run()\n {\n System.out.println(\"X3\");\n requestSensor();\n h.postDelayed(this, sensorRefreshTime); //request sensor every 35 seconds\n }\n }, sensorRefreshTime);\n }", "public void emitLoop() {\n /*\n r14 = this;\n L_0x0000:\n monitor-enter(r14)\n long r0 = r14.missedRequested // Catch:{ all -> 0x0061 }\n long r2 = r14.missedProduced // Catch:{ all -> 0x0061 }\n rx.Producer r4 = r14.missedProducer // Catch:{ all -> 0x0061 }\n r5 = 0\n int r7 = (r0 > r5 ? 1 : (r0 == r5 ? 0 : -1))\n if (r7 != 0) goto L_0x0018\n int r8 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r8 != 0) goto L_0x0018\n if (r4 != 0) goto L_0x0018\n r0 = 0\n r14.emitting = r0 // Catch:{ all -> 0x0061 }\n monitor-exit(r14) // Catch:{ all -> 0x0061 }\n return\n L_0x0018:\n r14.missedRequested = r5 // Catch:{ all -> 0x0061 }\n r14.missedProduced = r5 // Catch:{ all -> 0x0061 }\n r8 = 0\n r14.missedProducer = r8 // Catch:{ all -> 0x0061 }\n monitor-exit(r14) // Catch:{ all -> 0x0061 }\n long r9 = r14.requested\n r11 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n int r13 = (r9 > r11 ? 1 : (r9 == r11 ? 0 : -1))\n if (r13 == 0) goto L_0x0048\n long r9 = r9 + r0\n int r13 = (r9 > r5 ? 1 : (r9 == r5 ? 0 : -1))\n if (r13 < 0) goto L_0x0045\n int r13 = (r9 > r11 ? 1 : (r9 == r11 ? 0 : -1))\n if (r13 != 0) goto L_0x0035\n goto L_0x0045\n L_0x0035:\n long r9 = r9 - r2\n int r2 = (r9 > r5 ? 1 : (r9 == r5 ? 0 : -1))\n if (r2 < 0) goto L_0x003d\n r14.requested = r9\n goto L_0x0048\n L_0x003d:\n java.lang.IllegalStateException r0 = new java.lang.IllegalStateException\n java.lang.String r1 = \"more produced than requested\"\n r0.<init>(r1)\n throw r0\n L_0x0045:\n r14.requested = r11\n r9 = r11\n L_0x0048:\n if (r4 == 0) goto L_0x0057\n rx.Producer r0 = NULL_PRODUCER\n if (r4 != r0) goto L_0x0051\n r14.currentProducer = r8\n goto L_0x0000\n L_0x0051:\n r14.currentProducer = r4\n r4.request(r9)\n goto L_0x0000\n L_0x0057:\n rx.Producer r2 = r14.currentProducer\n if (r2 == 0) goto L_0x0000\n if (r7 == 0) goto L_0x0000\n r2.request(r0)\n goto L_0x0000\n L_0x0061:\n r0 = move-exception\n monitor-exit(r14) // Catch:{ all -> 0x0061 }\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p030rx.internal.producers.ProducerArbiter.emitLoop():void\");\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\t\ttemp_r[0] = event.values[0];\r\n\t\t\t\ttemp_r[1] = event.values[1];\r\n\t\t\t\ttemp_r[2] = event.values[2];\r\n\t\t\t\t// TipsTextView.setText(String.valueOf(temp_r[0]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[1]) + \" \"\r\n\t\t\t\t// + String.valueOf(temp_r[2]));\r\n\t\t\t}", "public void onSensorChanged() {\n\t\tsensorChanged();\n\t}", "@Override\r\n\tpublic void run() {\n\t\tint preState;\r\n\t\twhile(true){\r\n\t\t\tpreState = this.state;\r\n\t\t\twhile(preState==this.state)\r\n\t\t\t\t;\r\n\t\t\tpreState = this.state;\r\n\t\t\tnotifySensor(this.state);\r\n\t\t}\r\n\t}", "public void startMeasurement(View view) {\n Button button = (Button) findViewById(R.id.start_button);\r\n\r\n if(!running_measurement) {\r\n mSensorManager.registerListener(this, accel, accel.getMinDelay());\r\n\r\n button.setText(\"Stop\");\r\n }\r\n else{\r\n mSensorManager.unregisterListener(this);\r\n\r\n button.setText(\"Start\");\r\n\r\n TextView textView = (TextView) findViewById(R.id.text_box1);\r\n textView.setText(calculateVertical());\r\n\r\n\r\n //TextView textView = (TextView) findViewById(R.id.text_box1);\r\n File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\r\n File filename = new File(path, \"_myfile2.txt\");\r\n String string = \"\";\r\n\r\n try {\r\n FileOutputStream outputStream = new FileOutputStream(filename, false);\r\n int max_i = min(count, size_accels);\r\n for(int i=0; i<max_i; i++) {\r\n string = Long.toString(times[i]);\r\n outputStream.write(string.getBytes());\r\n string = \",\";\r\n outputStream.write(string.getBytes());\r\n string = Double.toString(accelerations[i]);\r\n outputStream.write(string.getBytes());\r\n string = \",\";\r\n outputStream.write(string.getBytes());\r\n }\r\n outputStream.close();\r\n\r\n //textView.setText(Double.toString(accel.getMinDelay()));\r\n\r\n } catch (Exception e) {\r\n //textView.setText(\"Error\");\r\n e.printStackTrace();\r\n }\r\n\r\n Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\r\n intent.setData(Uri.fromFile(filename));\r\n sendBroadcast(intent);\r\n //*/\r\n\r\n accelerations = new double[100000];\r\n times = new long[100000];\r\n count = 0;\r\n }\r\n running_measurement = !running_measurement;\r\n\r\n //EditText editText = (EditText) findViewById(R.id.edit_message);\r\n //String message = editText.getText().toString();\r\n\r\n /*\r\n TextView textView = (TextView) findViewById(R.id.text_box1);\r\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null) {\r\n textView.setText(\"GOOD\");\r\n }\r\n else {\r\n textView.setText(\"NO ACCEL\");\r\n }\r\n */\r\n }", "private double readPressureSample() {\n return 6 * randomPressureSampleSimulator.nextDouble() * randomPressureSampleSimulator.nextDouble();\n }", "public void requestAllSensors() {\n mSensorManager.registerListener(this, mRotationSensor, SENSOR_DELAY_MICROS);\n }", "@Override\n public final void onSensorChanged(SensorEvent event) {\n linearAccelerations = event.values;\n linearAccelerations[0] = linearAccelerations[0]-xOff;\n linearAccelerations[1] = linearAccelerations[1]-yOff;\n linearAccelerations[2] = linearAccelerations[2]-zOff;\n xAccel = (float) round(linearAccelerations[0]/9.8, 3);\n yAccel = (float) round(linearAccelerations[1]/9.8, 3);\n zAccel = (float) round(linearAccelerations[2]/9.8, 3);\n// Log.i(appLabel, \"Acceleration: (\"+xAccel+\", \"+yAccel+\", \"+zAccel+\")\");\n xAccelSquared = (float) round(xAccel*xAccel, 3);\n yAccelSquared = (float) round(yAccel*yAccel, 3);\n zAccelSquared = (float) round(zAccel*zAccel, 3);\n //If they are negative accelerations, squaring them will have made them positive\n if (xAccel < 0) {\n xAccelSquared = xAccelSquared*-1;\n }\n if (yAccel < 0) {\n yAccelSquared = yAccelSquared*-1;\n }\n if (zAccel < 0) {\n zAccelSquared = zAccelSquared*-1;\n }\n xAccelOutput.setText(String.valueOf(xAccel));\n yAccelOutput.setText(String.valueOf(yAccel));\n zAccelOutput.setText(String.valueOf(zAccel));\n// Log.i(appLabel, \"Acceleration squares: \"+xAccelSquared+\", \"+yAccelSquared+\", \"+zAccelSquared);\n float accelsSum = xAccelSquared+yAccelSquared+zAccelSquared;\n double accelsRoot;\n if (accelsSum < 0) {\n accelsSum = accelsSum * -1;\n accelsRoot = Math.sqrt(accelsSum) * -1;\n } else {\n accelsRoot = Math.sqrt(accelsSum);\n }\n// Log.i(appLabel, \"Acceleration squares sum: \"+accelsSum);\n// Log.i(appLabel, \"Acceleration sqrt:\"+accelsRoot);\n cAccel = (float) round(accelsRoot, 3);\n// Log.i(appLabel, \"Net Acceleration: \"+cAccel);\n //Store the maximum acceleration\n if (cAccel > maxAccel) {\n maxAccel = cAccel;\n }\n accelOutput.setText(String.valueOf(cAccel));\n if (isRunning) {\n setSpeed();\n }\n if (speed >= 60) {\n timeToSixty = seconds;\n timeToSixtyOutput.setText(String.valueOf(timeToSixty));\n stopTimer();\n }\n }", "private void registerSensors()\n {\n // Double check that the device has the required sensor capabilities\n\n if(!HasGotSensorCaps()){\n showToast(\"Required sensors not supported on this device!\");\n return;\n }\n\n // Provide a little feedback via a toast\n\n showToast(\"Registering sensors!\");\n\n // Register the listeners. Used for receiving notifications from\n // the SensorManager when sensor values have changed.\n\n sensorManager.registerListener(this, senStepCounter, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senStepDetector, SensorManager.SENSOR_DELAY_NORMAL);\n sensorManager.registerListener(this, senAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);\n }", "void results() {\n Time t = new Time(System.currentTimeMillis());\n endTime = t;\n\n float t1gpslog, t2gpslog, t3gpslog, bhgpslog, mhgpslog, fhgpslog, nfgpslog,\n t1dtnlog, t2dtnlog, t3dtnlog, bhdtnlog, mhdtnlog, fhdtnlog, nfdtnlog;\n float t1logpercentage, t2logpercentage, t3logpercentage, bhlogpercentage,\n mhlogpercentage, fhlogpercentage, nflogpercentage;\n\n t1gpslog = t2gpslog = t3gpslog = bhgpslog = mhgpslog = fhgpslog = nfgpslog\n = t1dtnlog = t2dtnlog = t3dtnlog = bhdtnlog = mhdtnlog = fhdtnlog = nfdtnlog = 0;\n int xval, yval;\n\n for (int rbucklocationx = 0; rbucklocationx < MAX_X_GRID; rbucklocationx++) {\n for (int rbucklocationy = 0; rbucklocationy < MAX_Y_GRID; rbucklocationy++) {\n if (t1_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t1GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t1gpslog++;\n }\n\n if (t2_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t2GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t2gpslog++;\n }\n\n if (t3_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n t3GPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n t3gpslog++;\n }\n if (bh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n bhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n bhgpslog++;\n }\n if (mh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n mhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n mhgpslog++;\n }\n if (fh_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n fhGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n fhgpslog++;\n }\n if (nf_grazecoordinate[rbucklocationx][rbucklocationy] == 1) {\n nfgGPSLog.add(new GPSLog(rbucklocationx, rbucklocationy));\n nfgpslog++;\n }\n }\n }\n\n for (int resultloop = 0; resultloop < DATA_MAX_PACKETS; resultloop++)\n {\n if (d1_message[resultloop] != 0) {\n if ((d1_message[resultloop] >> 11) == t1_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t1DTNLog.add(new GPSLog(xval, yval));\n t1dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t2_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t2DTNLog.add(new GPSLog(xval, yval));\n t2dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == t3_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n t3DTNLog.add(new GPSLog(xval, yval));\n t3dtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == bh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n bhDTNLog.add(new GPSLog(xval, yval));\n bhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == mh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n mhDTNLog.add(new GPSLog(xval, yval));\n mhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == fh_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n fhDTNLog.add(new GPSLog(xval, yval));\n fhdtnlog++;\n }\n if ((d1_message[resultloop] >> 11) == nf_agentid) {\n xval = ((d1_message[resultloop] >> 6) & 31);\n yval = (d1_message[resultloop] & 63);\n nfgDTNLog.add(new GPSLog(xval, yval));\n nfdtnlog++;\n }\n }\n }\n\n if (t1gpslog != 0) {\n t1logpercentage = (t1dtnlog / t1gpslog) * 100;\n percentageLog.add(\"t1percentage is \" + t1logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T1\", t1logpercentage));\n });\n t1tp = t1logpercentage;\n }\n\n if (t2gpslog != 0) {\n t2logpercentage = (t2dtnlog / t2gpslog) * 100;\n percentageLog.add(\"t2percentage is \" + t2logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T2\", t2logpercentage));\n });\n t2tp = t2logpercentage;\n }\n\n if (t3gpslog != 0) {\n t3logpercentage = (t3dtnlog / t3gpslog) * 100;\n percentageLog.add(\"t3percentage is \" + t3logpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n tpslc.getData().add(new XYChart.Data(\"T3\", t3logpercentage));\n });\n t3tp = t3logpercentage;\n }\n\n if (bhgpslog != 0) {\n bhlogpercentage = (bhdtnlog / bhgpslog) * 100;\n percentageLog.add(\"bhpercentage is \" + bhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"BH\", bhlogpercentage));\n });\n bhtp = bhlogpercentage;\n }\n\n if (mhgpslog != 0) {\n mhlogpercentage = (mhdtnlog / mhgpslog) * 100;\n percentageLog.add(\"mhpercentage is \" + mhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"MH\", mhlogpercentage));\n });\n mhtp = mhlogpercentage;\n }\n\n if (fhgpslog != 0) {\n fhlogpercentage = (fhdtnlog / fhgpslog) * 100;\n percentageLog.add(\"fhpercentage is \" + fhlogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n tpslc.getData().add(new XYChart.Data(\"FH\", fhlogpercentage));\n });\n fhtp = fhlogpercentage;\n }\n\n if (nfgpslog != 0) {\n nflogpercentage = (nfdtnlog / nfgpslog) * 100;\n percentageLog.add(\"nfpercentage is \" + nflogpercentage);\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n tpslc.getData().add(new XYChart.Data(\"NF\", nflogpercentage));\n });\n nftp = nflogpercentage;\n }\n\n float gpslogSum = t1gpslog + t2gpslog + t3gpslog + bhgpslog + mhgpslog + fhgpslog + nfgpslog;\n float dtnlogSum = t1dtnlog + t2dtnlog + t3dtnlog + bhdtnlog + mhdtnlog + fhdtnlog + nfdtnlog;\n\n \n if (gpslogSum > 0)\n {\n float collectiveThroughput = ((dtnlogSum) / (gpslogSum)) * 100;\n Platform.runLater(()-> {\n tps.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n tpslc.getData().add(new XYChart.Data(\"CT\", collectiveThroughput));\n });\n ct = collectiveThroughput;\n }\n\n //Add the Radio Contact Ratio value to the series\n \n if (dtnlogSum > 0)\n {\n rcratio = radioContactLog.size()/dtnlogSum;\n }\n else\n {\n rcratio = 0;\n }\n Platform.runLater(()-> {\n rcrSeries.setYValue(rcratio);\n });\n updateGPSLogSeries();\n updateDataCenterSeries();\n\n //Update the binding properties \n Platform.runLater(()-> {\n simStarted.set(false);\n simInProgress.set(false);\n simCompleted.set(true);\n simNotInProgress.set(true);\n simPaused.set(false);\n simNotStarted.set(true);\n });\n packetModels.clear();\n packetModels.add(new PacktTallyModel(t1gpslog));\n packetModels.add(new PacktTallyModel(t2gpslog));\n packetModels.add(new PacktTallyModel(t3gpslog));\n packetModels.add(new PacktTallyModel(bhgpslog));\n packetModels.add(new PacktTallyModel(mhgpslog));\n packetModels.add(new PacktTallyModel(fhgpslog));\n packetModels.add(new PacktTallyModel(nfgpslog));\n packetModels.add(new PacktTallyModel(gpslogSum));\n packetModels.add(new PacktTallyModel(t1dtnlog));\n packetModels.add(new PacktTallyModel(t2dtnlog));\n packetModels.add(new PacktTallyModel(t3dtnlog));\n packetModels.add(new PacktTallyModel(bhdtnlog));\n packetModels.add(new PacktTallyModel(mhdtnlog));\n packetModels.add(new PacktTallyModel(fhdtnlog));\n packetModels.add(new PacktTallyModel(nfdtnlog));\n packetModels.add(new PacktTallyModel(dtnlogSum));\n packetModels.add(new PacktTallyModel(ct));\n packetModels.add(new PacktTallyModel(radioContactLog.size()));\n packetModels.add(new PacktTallyModel(rcratio));\n \n }", "public void run() {\r\n\t\twhile(true) {\r\n\t\t\twhile(base.isEnabled()){\r\n\t\t\t\tif(pressureSwitch.get() == false){\r\n\t\t\t\t\tcompressor.set(Value.kOn);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcompressor.set(Value.kOff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void calculate() {\n State outputState = State.ZERO;\n for(Input i: inputs){\n if(i.getState() == State.ONE) {\n outputState = State.ONE;\n break;\n }\n else if (i.getState() == State.NOT_CONNECTED) {\n state = State.NOT_CONNECTED;\n setImage();\n System.out.println(\"Invalid connection detected\");\n return;\n }\n }\n state = outputState;\n setImage();\n }", "@Path(\"sensorOutputs\")\n SensorOutputAPI sensorOutputs();", "public double getNextRawSample();", "public void logSensorData () {\n\t}", "public void run() {\r\n\t\ttry {\r\n\t\t\tmqttConn.connect();\r\n\t\t\tubidotsMqtt.connect();\r\n\t\t} catch (KeyManagementException | NoSuchAlgorithmException | MqttException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tmqttConn.subscribe(subscribeTopic, 2);\r\n\t\tmqttConn.subscribe(subscribeTopic2, 2);\r\n\t\tubidotsMqtt.subscribe(valveTopic, 2);\r\n\t\t\r\n//\t\tubidotsApi.sendPitchValue((double)360);\r\n\r\n\t\tint count=0;\r\n\t\twhile(enable) {\r\n\t\t\tenable = true;\r\n\t\t}\r\n\t}", "@Override\r\n public void runTests() {\r\n getTemperature();\r\n }", "private static synchronized void runLiftStageFromJoystick(ArmLiftMotorInfo mtrInfo) { //double stage1JoystickReading, double stage2JoystickReading) {\r\n\t\t\tdouble percentOut;\r\n\t\t\tsynchronized(armStage1.motorLock) {\r\n//\t\t\t\tsynchronized(armStage2.motorLock) {\t\t\t\t\t\r\n\t\t\t\t\t//joysticks give negative readings when pushed away from you, but we want that action to run\r\n\t\t\t\t\t//the motors in their forward direction (postive Percent Output values)\r\n\t\t\t\t\tdouble jsRdg = mtrInfo.jsNamedControl.getEnt().getAnalog();\r\n\t\t\t\t\tmtrInfo.lastJoystickReading = jsRdg;\r\n\t\t\t\t\t//squaring makes joysticks easier to use\r\n\t\t\t\t\tpercentOut = -Math.copySign(jsRdg*jsRdg, jsRdg);\r\n\t\t\t\t\tif(mtrInfo.operatingMode.equals(OperatingModesE.IDLE)) {mtrInfo.operatingMode = OperatingModesE.JOYSTICK;}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//check limit switches, encoders, 'useEncoder' flag, etc. and allow/forbid motion accordingly\r\n\t\t\t\t\tmtrInfo.handleJoystickPercentOut(percentOut);\r\n\t\t\t\t\t\r\n//\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public RainCollectorSensor() {\r\n\t\trecalibrateData();\r\n\t\tmetric = true; \r\n\t}", "private void run() {\n\t\tfor (int i = 0; i < 1000; i++){\n\t\t\t\n\t\t\tdouble sample = Math.random()*2.0;\n\t\t\tdataset.addObservation(sample);\n\t\t\t\n\t\t\t// stats\n\t\t\tsum += sample;\n\t\t\tn++;\n\t\t\tav = sum/n;\n\n\t\t\t// create new xy dataset\n\t\t\n\t\t\ttry {Thread.sleep(1000L);} catch (Exception e) {}\n\t\t\t\n\t\t}\n\t\t\n\t\t \n\t}", "@Override\n public void run() {\n System.out.println(\"The KWIC Index System contains:\");\n \n String outputFileName = \"output.txt\";\n BufferedWriter bw = null;\n \n try {\n bw = new BufferedWriter(new FileWriter(outputFileName));\n while (true) {\n if (isInputEmpty()) {\n delay();\n } else {\n Data data = pullFromInput();\n if (data.isLast()) {\n break;\n }\n bw.write(data.getValue());\n bw.newLine();\n System.out.println(data.getValue());\n }\n }\n bw.close();\n } catch (IOException e) {\n System.out.println(\"Error writing to output file.\");\n } finally {\n try {\n if (bw != null) {\n bw.close();\n }\n } catch (IOException e) {\n System.out.println(\"Unrecoverable error from Output::run()\");\n }\n }\n \n }" ]
[ "0.6475555", "0.6328373", "0.63280946", "0.6151415", "0.6120036", "0.6095264", "0.6070379", "0.60477716", "0.6032961", "0.6028382", "0.5972874", "0.5942488", "0.5937712", "0.59286845", "0.59265596", "0.59119016", "0.58901423", "0.58788323", "0.5863143", "0.58546734", "0.582098", "0.58123976", "0.58018655", "0.57853377", "0.57839924", "0.5755803", "0.5753081", "0.57528394", "0.5749965", "0.57410294", "0.5740775", "0.5737882", "0.5724903", "0.5717974", "0.5713202", "0.5685877", "0.56716526", "0.5664232", "0.5660377", "0.5657677", "0.56359416", "0.56133825", "0.56051", "0.55986047", "0.5598475", "0.5586246", "0.5573252", "0.5566544", "0.5565551", "0.5565316", "0.5545444", "0.55320364", "0.55138814", "0.5491463", "0.5483986", "0.5477078", "0.547427", "0.54739827", "0.5473768", "0.5467058", "0.54659206", "0.54623866", "0.5452574", "0.54522806", "0.545146", "0.5444077", "0.544187", "0.5441091", "0.54292375", "0.5428811", "0.54262865", "0.54237324", "0.5415045", "0.54005486", "0.53947586", "0.5392902", "0.5374348", "0.5371791", "0.53672326", "0.5356301", "0.5353383", "0.5347299", "0.53441393", "0.5339003", "0.5333484", "0.53310513", "0.53304684", "0.5328329", "0.5325277", "0.532419", "0.532328", "0.53129333", "0.5309081", "0.53084695", "0.5304868", "0.5298234", "0.5297773", "0.52913815", "0.52845836", "0.52830017", "0.528185" ]
0.0
-1
Calculate where the right sensor is.
private Point2D.Double rightSensorLocation() { double dx = getSize() * Math.cos(getOrientation() - Math.PI / 4); double dy = -getSize() * Math.sin(getOrientation() - Math.PI / 4); return new Point2D.Double(getX() + dx * 2, getY() + dy * 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Point2D.Double leftSensorLocation() {\n double dx = getSize() * Math.cos(getOrientation() + Math.PI / 4);\n double dy = -getSize() * Math.sin(getOrientation() + Math.PI / 4);\n return new Point2D.Double(getX() + dx * 2, getY() + dy * 2);\n }", "private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}", "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "public double getAverageEncoderPosition()\n {\n \treturn ( Math.abs(leftBackTalon.getSelectedSensorPosition(0)) + Math.abs(rightBackTalon.getSelectedSensorPosition(0))) / 2;\n }", "public int getCurrentFloor();", "public double getOffset(){\n\t\tdouble percentHeight = networkTableValues.get(\"height\")/cameraHeightPixel;\n\t\t//Get the height of the frame in inches\n\t\tdouble cameraHeightInches = networkTableValues.get(\"height\")/percentHeight;\n\t\t//Get the width of the frame in inches\n\t\tdouble cameraWidthInches = cameraHeightInches*(cameraWidthPixel/cameraHeightPixel);\n\t\t//Get the distanceFromTower from the camera to the goal\n\t\tdistanceFromTower = (cameraWidthInches/2)/Math.tan(cameraFOV*(Math.PI/180));\n\t\t//Get the distanceFromTower from the camera to the base of the tower\n\t\tdouble horizontalDistance = Math.sqrt(Math.pow(distanceFromTower, 2) - Math.pow(towerHeight, 2));\n\t\t//Get offset in inches\n\t\tdouble distanceFromCenterInches = (networkTableValues.get(\"centerX\") / cameraWidthPixel)*cameraWidthInches;\n\t\tdouble offset = Math.atan((distanceFromCenterInches/distanceFromTower)*(180/Math.PI));\n\t\t\n\t\tSystem.out.println(\"OFFSET: \" + offset);\n\t\treturn offset;\n\t}", "public double getWindChill() {\n float tempC;\n float windSpeed;\n double windChill = 0;\n double windChillr = 0;\n\n\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n windSpeed = readings.get(readings.size() - 1).windSpeed;\n windChill = 13.12 + (0.6215 * tempC) - (11.37 * Math.pow(windSpeed, 0.16)) + 0.3965 * 6 * Math.pow(2, 0.16);\n windChillr = Math.round(windChill * 10.0) / 10.0;\n } else {\n\n }\n return windChillr;\n }", "public double getAbsPosition() {\n double distCM = ToFSerial.get() - startDist;\n //System.out.println(\"Dist in CM \" + distCM);\n\n double distIn = distCM * Constants.k_CMtoIn;\n //System.out.println(\"Dist in In \" + distIn);\n\n return (int) (1000 * distIn); \n\n }", "private double measureTemp() {\n try {\n analog0 = blueTooth.sensor(0);\n analog1 = blueTooth.sensor(1);\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n } catch (TimeoutException ex) {\n Logger.getLogger(TempMeasure.class.getName()).log(Level.SEVERE, null, ex);\n }\n return ((analog0 - analog1) * 5 * 100) / 1024.0;\n }", "public double getValue() {\n\t\treturn sensorval;\n\t}", "double getStation();", "public double getLocation(){\n\t\treturn location;\n\t}", "public double getRightCurrent() {\n return rightMotor.getOutputCurrent();\n }", "public double calculate() {\n\t\treturn area*1800;\r\n\t}", "private int calculateTemp(){\n\n int time = (int) Bukkit.getServer().getWorld(worldName).getTime();\n\n // Calculate temp (y value) on a manipulated sine wave\n return (int) Math.round(\n Math.sin( (time * 0.000262) - ( (peakTime/24000.0) * Math.PI * 2 ) + (0.5 * Math.PI) ) * ((maxTemp-minTemp)/2.0)\n + (minTemp + ((maxTemp-minTemp)/2.0))\n );\n }", "@Override\r\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\t\r\n\t\tax = - event.values[0] / 7;\r\n\t\tay = event.values[1] / 7;\r\n\t}", "public double getCurrentPercentageError() {\n\t\tdouble returnValue = 0.0;\n\t\tint currentValue = this.readSensorValue();\n\t\tint optimum = getOptimumSensorValue(currentValue);\n\t\tif (currentValue > optimum) {\n\t\t\treturnValue = (double) (currentValue - optimum)\n\t\t\t\t\t/ (double) (this.highReadInValue - optimum);\n\t\t} else if (currentValue < optimum) {\n\t\t\treturnValue = -((double) (optimum - currentValue) / (double) (optimum - this.lowReadInValue));\n\t\t}\n\t\treturn returnValue;\n\t}", "public Point getAlteredCoord(Point actualPoint) {\n //If breath rate is out of range, returns an altered coordinate according to the level of out of range and\n //the current game level (Easy, Medium, Hard). If breath is in range, return the same coord.\n Point alteratedPoint = actualPoint;\n\n Random randomNoise = new Random();\n\n //As USER_CURRENT_BREATH_RATE will be changing, we must do a \"snapshot\" at this time to work with proper measures.\n double userCurrentSnap = USER_CURRENT_BREATH_RATE;\n\n //Consider 6-8, MAX_IDEAL_BREATH_RATE (8) will be the max\n double referenceDistance = MAX_BREATH_RATE - MAX_IDEAL_BREATH_RATE;\n double myRateExcess = userCurrentSnap - MAX_IDEAL_BREATH_RATE;\n double relationPreferedActual = myRateExcess / referenceDistance;\n\n //How much far of the ideal is?, according to our limit of 20\n double percentOfExcess = relationPreferedActual * 100;\n\n /*\n EASY:\n Speed: 25%\n Range of speed change: (up to 15%)\n Maximum amount of noise: +/- 30% of the maximum number on coord x or y\n MEDIUM:\n Speed: 45%\n Range of speed change: (up to 15%)\n Maximum amount of noise: +/- 50% of the maximum number on coord x or y\n HARD:\n Speed: 80%\n Range of speed change: (up to 15%)\n Maximum amount of noise: +/- 80% of the maximum number on coord x or y\n */\n\n //Maximum increment of speed in 15% of MAX_SCALED_SPEED\n double mxSpdInc = MAX_SCALED_SPEED * .15;\n\n //NOTE: The formulas obtained were based on x^2\n /*\n *Solving y=ax^2 + b\n *Finding the variables a, and b. X represents the amount of excess and Y represents the speed for that amount\n */\n double a, b;\n double maxSpeed; //Max space in case of 100% of\n double easyNoise = .38, mediumNoise = .58, hardNoise = .75; //Percents\n\n //drive_control works acording to the size of the wheel. And as closer to the circumference as faster that will be.\n int maxX = this.wheel.getBounds().width(); //This represent the max X possible coord on the wheel\n int maxY = this.wheel.getBounds().height();\n\n if (percentOfExcess > 0) {\n switch (this.ACTUAL_DIFICULTY) {\n case EASY:\n\n //Alter speed. The speed will be changed\n maxSpeed = EASY_BASE_SPEED + mxSpdInc;\n b = EASY_BASE_SPEED; //Minimum\n a = (maxSpeed - b) / (100 * 100); //Maximum\n this.drive_control.setSpeedScale((float) getSpeedAccordingExcessPercent(a, b, percentOfExcess));\n\n alteratedPoint = getFinalPoint(maxX, maxY, easyNoise, percentOfExcess, actualPoint.x, actualPoint.y);\n\n break;\n case MEDIUM:\n maxSpeed = MEDIUM_BASE_SPEED + mxSpdInc;\n b = MEDIUM_BASE_SPEED; //Minimum\n a = (maxSpeed - b) / (100 * 100); //Maximum\n this.drive_control.setSpeedScale((float) getSpeedAccordingExcessPercent(a, b, percentOfExcess));\n alteratedPoint = getFinalPoint(maxX, maxY, mediumNoise, percentOfExcess, actualPoint.x, actualPoint.y);\n\n\n break;\n case HARD:\n maxSpeed = HARD_BASE_SPEED + mxSpdInc;\n b = HARD_BASE_SPEED; //Minimum\n a = (maxSpeed - b) / (100 * 100); //Maximum\n this.drive_control.setSpeedScale((float) getSpeedAccordingExcessPercent(a, b, percentOfExcess));\n alteratedPoint = getFinalPoint(maxX, maxY, hardNoise, percentOfExcess, actualPoint.x, actualPoint.y);\n\n\n break;\n }\n } else {//Else, the user's breath rate must be under 8 so it's ok.\n //In this case, we will ensure that the speed it's acording to the level.\n switch (this.ACTUAL_DIFICULTY) {\n case EASY:\n this.drive_control.setSpeedScale(this.EASY_BASE_SPEED);\n break;\n case MEDIUM:\n this.drive_control.setSpeedScale(this.MEDIUM_BASE_SPEED);\n break;\n case HARD:\n this.drive_control.setSpeedScale(this.HARD_BASE_SPEED);\n break;\n }\n }\n return alteratedPoint;\n }", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "double motor_y () { return strut.span + DRIVING_FORCE_HEIGHT; }", "private void updateSensors()\r\n\t{\t\t\r\n\t\tthis.lineSensorRight\t\t= perception.getRightLineSensor();\r\n\t\tthis.lineSensorLeft \t\t= perception.getLeftLineSensor();\r\n\t\t\r\n\t\tthis.angleMeasurementLeft \t= this.encoderLeft.getEncoderMeasurement();\r\n\t\tthis.angleMeasurementRight \t= this.encoderRight.getEncoderMeasurement();\r\n\r\n\t\tthis.mouseOdoMeasurement\t= this.mouseodo.getOdoMeasurement();\r\n\r\n\t\tthis.frontSensorDistance\t= perception.getFrontSensorDistance();\r\n\t\tthis.frontSideSensorDistance = perception.getFrontSideSensorDistance();\r\n\t\tthis.backSensorDistance\t\t= perception.getBackSensorDistance();\r\n\t\tthis.backSideSensorDistance\t= perception.getBackSideSensorDistance();\r\n\t}", "public int getSensorState() {\n return -1;\n }", "public void recordSensors2(){\n\t\t//System.out.println(\"Your pitch is: \" + sd.getPitch());\n if (sd.getPitch() <= .1 || sd.getPitch() >6.2) {\n\t\t\t\t\t//System.out.println(\"Printing off sensor data\");\n\t\t\t\t\tSystem.out.println(\"OdTheta\" + sd.getOdTheta());\n for (int i = 0; i < sd.getRSArrayLength(); i++) {\n double wallX = (sd.getOdLocationX() + (sd.getRangeScanner(i) * Math.cos((((i-90)* (Math.PI/180))- sd.getOdTheta())) + 0));\n //System.out.println(\"Wall X: \" + wallX);\n double wallY = (sd.getOdLocationY() + (0 - sd.getRangeScanner(i) * Math.sin((((i-90)* (Math.PI/180)) - sd.getOdTheta()))));\n //System.out.println(\"Wall Y: \" + wallY);\n int x = (int)Math.round((wallX * scale) + width/2);\n //System.out.println(\"X: \" + x);\n int y = (int)Math.round((wallY * scale) + height/2);\n //System.out.println(\"Y: \" + y);\n \n\n }\n }\n\t\t\t\t//System.out.println(\"Finished Writing Sensor Data\");\n\n\t}", "public double getCurrent() {\n return elevatorSpark.getOutputCurrent();\n }", "private float getRsiPotential() {\r\n\t\treturn 1F - (float)(stochRsiCalculator.getCurrentValue()/50.0);\r\n\t}", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "public float getLastValue() {\n // ensure float division\n return ((float)(mLastData - mLow))/mStep;\n }", "private Location getRightHandPos() {\r\n\t\treturn GeneralMethods.getRightSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}", "public float GetDistance(String sensor_name)\n {\n double distance = 0;\n // TODO List: read the value of the sonor sensor, and convert it to centimeter.\n if (sensor_name == str_sensor_door)\n {\n distance = sensor_door.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"DoorDistanceToGlyph\", \"%4.1f\", distance);\n }\n else if (sensor_name == str_sensor_tray)\n {\n\n distance = sensor_tray.getDistance(DistanceUnit.CM);\n RobotLog.vv(\"TrayDistanceToGlyph\", \"%5.2f\", distance);\n }\n else\n {\n\n distance = sensor_sonar_front.getDistance();\n RobotLog.vv(\"SonarDistanceToGlyph\", \"%5.1f\", distance);\n }\n\n return (float) distance;\n }", "public PVector getWristRawPosition(){\n\t\treturn this.leap.convert(this.arm.wristPosition());\n\t}", "public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}", "@Override\r\n\tpublic double getWindcurrentFactor() {\r\n\r\n\t\tPoint2d resultant = estimateCombinedWindCurrentDrift();\r\n\t\tdouble anglediff = Math.abs(Geofunctions.angleDiff(vessel.getCog(), resultant.y));\r\n\r\n\t\tif (resultant.x > 3.0 && ((anglediff > 45 && anglediff < 135) || (anglediff > 225 && anglediff < 315))) {\r\n\t\t\t/*\r\n\t\t\t * current+wind is sideway and strong enough\r\n\t\t\t */\r\n\t\t\treturn Math.exp(0.2 * (resultant.x - 3.0));\r\n\t\t}\r\n\t\treturn 1.0;\r\n\t}", "@Override\n\tprotected int getSensorData() {\n\t\treturn sensor.getLightValue();\n\t}", "public static void getValuationSlot() {\n float locX = M.evaluateLoc.x;\n float locY = M.evaluateLoc.y;\n M.lastZoneValuation = M.evaluateLoc.distanceTo(M.finalMove) * M.moveVectorStr; //Desire to move towards our main goal\n float test1;\n float test2;\n switch (angledRectangleCount) {\n default:\n case 20:\n if (M.evaluateLoc.isWithinDistance(Z20_center, Z20_maxdist)) {\n test1 = Float.sum(locX * Z20_p21x, locY * Z20_p21y);\n if (test1 >= Z20_dotsection2 && test1 <= Z20_p21MagSquared) {\n test2 = Float.sum(locX * Z20_p41x, locY * Z20_p41y);\n if (test2 >= Z20_dotsection4 && test2 <= Z20_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z20_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 19:\n if (M.evaluateLoc.isWithinDistance(Z19_center, Z19_maxdist)) {\n test1 = Float.sum(locX * Z19_p21x, locY * Z19_p21y);\n if (test1 >= Z19_dotsection2 && test1 <= Z19_p21MagSquared) {\n test2 = Float.sum(locX * Z19_p41x, locY * Z19_p41y);\n if (test2 >= Z19_dotsection4 && test2 <= Z19_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z19_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 18:\n if (M.evaluateLoc.isWithinDistance(Z18_center, Z18_maxdist)) {\n test1 = Float.sum(locX * Z18_p21x, locY * Z18_p21y);\n if (test1 >= Z18_dotsection2 && test1 <= Z18_p21MagSquared) {\n test2 = Float.sum(locX * Z18_p41x, locY * Z18_p41y);\n if (test2 >= Z18_dotsection4 && test2 <= Z18_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z18_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 17:\n if (M.evaluateLoc.isWithinDistance(Z17_center, Z17_maxdist)) {\n test1 = Float.sum(locX * Z17_p21x, locY * Z17_p21y);\n if (test1 >= Z17_dotsection2 && test1 <= Z17_p21MagSquared) {\n test2 = Float.sum(locX * Z17_p41x, locY * Z17_p41y);\n if (test2 >= Z17_dotsection4 && test2 <= Z17_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z17_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 16:\n if (M.evaluateLoc.isWithinDistance(Z16_center, Z16_maxdist)) {\n test1 = Float.sum(locX * Z16_p21x, locY * Z16_p21y);\n if (test1 >= Z16_dotsection2 && test1 <= Z16_p21MagSquared) {\n test2 = Float.sum(locX * Z16_p41x, locY * Z16_p41y);\n if (test2 >= Z16_dotsection4 && test2 <= Z16_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z16_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 15:\n if (M.evaluateLoc.isWithinDistance(Z15_center, Z15_maxdist)) {\n test1 = Float.sum(locX * Z15_p21x, locY * Z15_p21y);\n if (test1 >= Z15_dotsection2 && test1 <= Z15_p21MagSquared) {\n test2 = Float.sum(locX * Z15_p41x, locY * Z15_p41y);\n if (test2 >= Z15_dotsection4 && test2 <= Z15_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z15_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 14:\n if (M.evaluateLoc.isWithinDistance(Z14_center, Z14_maxdist)) {\n test1 = Float.sum(locX * Z14_p21x, locY * Z14_p21y);\n if (test1 >= Z14_dotsection2 && test1 <= Z14_p21MagSquared) {\n test2 = Float.sum(locX * Z14_p41x, locY * Z14_p41y);\n if (test2 >= Z14_dotsection4 && test2 <= Z14_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z14_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 13:\n if (M.evaluateLoc.isWithinDistance(Z13_center, Z13_maxdist)) {\n test1 = Float.sum(locX * Z13_p21x, locY * Z13_p21y);\n if (test1 >= Z13_dotsection2 && test1 <= Z13_p21MagSquared) {\n test2 = Float.sum(locX * Z13_p41x, locY * Z13_p41y);\n if (test2 >= Z13_dotsection4 && test2 <= Z13_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z13_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 12:\n if (M.evaluateLoc.isWithinDistance(Z12_center, Z12_maxdist)) {\n test1 = Float.sum(locX * Z12_p21x, locY * Z12_p21y);\n if (test1 >= Z12_dotsection2 && test1 <= Z12_p21MagSquared) {\n test2 = Float.sum(locX * Z12_p41x, locY * Z12_p41y);\n if (test2 >= Z12_dotsection4 && test2 <= Z12_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z12_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 11:\n if (M.evaluateLoc.isWithinDistance(Z11_center, Z11_maxdist)) {\n test1 = Float.sum(locX * Z11_p21x, locY * Z11_p21y);\n if (test1 >= Z11_dotsection2 && test1 <= Z11_p21MagSquared) {\n test2 = Float.sum(locX * Z11_p41x, locY * Z11_p41y);\n if (test2 >= Z11_dotsection4 && test2 <= Z11_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z11_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 10:\n if (M.evaluateLoc.isWithinDistance(Z10_center, Z10_maxdist)) {\n test1 = Float.sum(locX * Z10_p21x, locY * Z10_p21y);\n if (test1 >= Z10_dotsection2 && test1 <= Z10_p21MagSquared) {\n test2 = Float.sum(locX * Z10_p41x, locY * Z10_p41y);\n if (test2 >= Z10_dotsection4 && test2 <= Z10_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z10_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 9:\n if (M.evaluateLoc.isWithinDistance(Z9_center, Z9_maxdist)) {\n test1 = Float.sum(locX * Z9_p21x, locY * Z9_p21y);\n if (test1 >= Z9_dotsection2 && test1 <= Z9_p21MagSquared) {\n test2 = Float.sum(locX * Z9_p41x, locY * Z9_p41y);\n if (test2 >= Z9_dotsection4 && test2 <= Z9_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z9_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 8:\n if (M.evaluateLoc.isWithinDistance(Z8_center, Z8_maxdist)) {\n test1 = Float.sum(locX * Z8_p21x, locY * Z8_p21y);\n if (test1 >= Z8_dotsection2 && test1 <= Z8_p21MagSquared) {\n test2 = Float.sum(locX * Z8_p41x, locY * Z8_p41y);\n if (test2 >= Z8_dotsection4 && test2 <= Z8_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z8_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 7:\n if (M.evaluateLoc.isWithinDistance(Z7_center, Z7_maxdist)) {\n test1 = Float.sum(locX * Z7_p21x, locY * Z7_p21y);\n if (test1 >= Z7_dotsection2 && test1 <= Z7_p21MagSquared) {\n test2 = Float.sum(locX * Z7_p41x, locY * Z7_p41y);\n if (test2 >= Z7_dotsection4 && test2 <= Z7_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z7_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 6:\n if (M.evaluateLoc.isWithinDistance(Z6_center, Z6_maxdist)) {\n test1 = Float.sum(locX * Z6_p21x, locY * Z6_p21y);\n if (test1 >= Z6_dotsection2 && test1 <= Z6_p21MagSquared) {\n test2 = Float.sum(locX * Z6_p41x, locY * Z6_p41y);\n if (test2 >= Z6_dotsection4 && test2 <= Z6_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z6_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 5:\n if (M.evaluateLoc.isWithinDistance(Z5_center, Z5_maxdist)) {\n test1 = Float.sum(locX * Z5_p21x, locY * Z5_p21y);\n if (test1 >= Z5_dotsection2 && test1 <= Z5_p21MagSquared) {\n test2 = Float.sum(locX * Z5_p41x, locY * Z5_p41y);\n if (test2 >= Z5_dotsection4 && test2 <= Z5_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z5_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 4:\n if (M.evaluateLoc.isWithinDistance(Z4_center, Z4_maxdist)) {\n test1 = Float.sum(locX * Z4_p21x, locY * Z4_p21y);\n if (test1 >= Z4_dotsection2 && test1 <= Z4_p21MagSquared) {\n test2 = Float.sum(locX * Z4_p41x, locY * Z4_p41y);\n if (test2 >= Z4_dotsection4 && test2 <= Z4_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z4_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 3:\n if (M.evaluateLoc.isWithinDistance(Z3_center, Z3_maxdist)) {\n test1 = Float.sum(locX * Z3_p21x, locY * Z3_p21y);\n if (test1 >= Z3_dotsection2 && test1 <= Z3_p21MagSquared) {\n test2 = Float.sum(locX * Z3_p41x, locY * Z3_p41y);\n if (test2 >= Z3_dotsection4 && test2 <= Z3_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z3_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 2:\n if (M.evaluateLoc.isWithinDistance(Z2_center, Z2_maxdist)) {\n test1 = Float.sum(locX * Z2_p21x, locY * Z2_p21y);\n if (test1 >= Z2_dotsection2 && test1 <= Z2_p21MagSquared) {\n test2 = Float.sum(locX * Z2_p41x, locY * Z2_p41y);\n if (test2 >= Z2_dotsection4 && test2 <= Z2_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z2_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 1:\n if (M.evaluateLoc.isWithinDistance(Z1_center, Z1_maxdist)) {\n test1 = Float.sum(locX * Z1_p21x, locY * Z1_p21y);\n if (test1 >= Z1_dotsection2 && test1 <= Z1_p21MagSquared) {\n test2 = Float.sum(locX * Z1_p41x, locY * Z1_p41y);\n if (test2 >= Z1_dotsection4 && test2 <= Z1_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z1_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 0:\n }\n switch (circleCount) {\n case 20:\n if (M.evaluateLoc.isWithinDistance(Z20c_center, Z20c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z20c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 19:\n if (M.evaluateLoc.isWithinDistance(Z19c_center, Z19c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z19c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 18:\n if (M.evaluateLoc.isWithinDistance(Z18c_center, Z18c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z18c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 17:\n if (M.evaluateLoc.isWithinDistance(Z17c_center, Z17c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z17c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 16:\n if (M.evaluateLoc.isWithinDistance(Z16c_center, Z16c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z16c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 15:\n if (M.evaluateLoc.isWithinDistance(Z15c_center, Z15c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z15c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 14:\n if (M.evaluateLoc.isWithinDistance(Z14c_center, Z14c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z14c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 13:\n if (M.evaluateLoc.isWithinDistance(Z13c_center, Z13c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z13c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 12:\n if (M.evaluateLoc.isWithinDistance(Z12c_center, Z12c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z12c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 11:\n if (M.evaluateLoc.isWithinDistance(Z11c_center, Z11c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z11c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 10:\n if (M.evaluateLoc.isWithinDistance(Z10c_center, Z10c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z10c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 9:\n if (M.evaluateLoc.isWithinDistance(Z9c_center, Z9c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z9c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 8:\n if (M.evaluateLoc.isWithinDistance(Z8c_center, Z8c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z8c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 7:\n if (M.evaluateLoc.isWithinDistance(Z7c_center, Z7c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z7c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 6:\n if (M.evaluateLoc.isWithinDistance(Z6c_center, Z6c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z6c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 5:\n if (M.evaluateLoc.isWithinDistance(Z5c_center, Z5c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z5c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 4:\n if (M.evaluateLoc.isWithinDistance(Z4c_center, Z4c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z4c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 3:\n if (M.evaluateLoc.isWithinDistance(Z3c_center, Z3c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z3c_desire);\n }\n case 2:\n if (M.evaluateLoc.isWithinDistance(Z2c_center, Z2c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z2c_desire);\n }\n case 1:\n if (M.evaluateLoc.isWithinDistance(Z1c_center, Z1c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z1c_desire);\n }\n case 0:\n }\n switch (vectorCircleCount) {\n case 20:\n if (M.evaluateLoc.isWithinDistance(Z20vc_center, Z20vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z20vc_baseDesire, M.evaluateLoc.distanceTo(Z20vc_center) * Z20vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 19:\n if (M.evaluateLoc.isWithinDistance(Z19vc_center, Z19vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z19vc_baseDesire, M.evaluateLoc.distanceTo(Z19vc_center) * Z19vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 18:\n if (M.evaluateLoc.isWithinDistance(Z18vc_center, Z18vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z18vc_baseDesire, M.evaluateLoc.distanceTo(Z18vc_center) * Z18vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 17:\n if (M.evaluateLoc.isWithinDistance(Z17vc_center, Z17vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z17vc_baseDesire, M.evaluateLoc.distanceTo(Z17vc_center) * Z17vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 16:\n if (M.evaluateLoc.isWithinDistance(Z16vc_center, Z16vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z16vc_baseDesire, M.evaluateLoc.distanceTo(Z16vc_center) * Z16vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 15:\n if (M.evaluateLoc.isWithinDistance(Z15vc_center, Z15vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z15vc_baseDesire, M.evaluateLoc.distanceTo(Z15vc_center) * Z15vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 14:\n if (M.evaluateLoc.isWithinDistance(Z14vc_center, Z14vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z14vc_baseDesire, M.evaluateLoc.distanceTo(Z14vc_center) * Z14vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 13:\n if (M.evaluateLoc.isWithinDistance(Z13vc_center, Z13vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z13vc_baseDesire, M.evaluateLoc.distanceTo(Z13vc_center) * Z13vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 12:\n if (M.evaluateLoc.isWithinDistance(Z12vc_center, Z12vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z12vc_baseDesire, M.evaluateLoc.distanceTo(Z12vc_center) * Z12vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 11:\n if (M.evaluateLoc.isWithinDistance(Z11vc_center, Z11vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z11vc_baseDesire, M.evaluateLoc.distanceTo(Z11vc_center) * Z11vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 10:\n if (M.evaluateLoc.isWithinDistance(Z10vc_center, Z10vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z10vc_baseDesire, M.evaluateLoc.distanceTo(Z10vc_center) * Z10vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 9:\n if (M.evaluateLoc.isWithinDistance(Z9vc_center, Z9vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z9vc_baseDesire, M.evaluateLoc.distanceTo(Z9vc_center) * Z9vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 8:\n if (M.evaluateLoc.isWithinDistance(Z8vc_center, Z8vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z8vc_baseDesire, M.evaluateLoc.distanceTo(Z8vc_center) * Z8vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 7:\n if (M.evaluateLoc.isWithinDistance(Z7vc_center, Z7vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z7vc_baseDesire, M.evaluateLoc.distanceTo(Z7vc_center) * Z7vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 6:\n if (M.evaluateLoc.isWithinDistance(Z6vc_center, Z6vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z6vc_baseDesire, M.evaluateLoc.distanceTo(Z6vc_center) * Z6vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 5:\n if (M.evaluateLoc.isWithinDistance(Z5vc_center, Z5vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z5vc_baseDesire, M.evaluateLoc.distanceTo(Z5vc_center) * Z5vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 4:\n if (M.evaluateLoc.isWithinDistance(Z4vc_center, Z4vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z4vc_baseDesire, M.evaluateLoc.distanceTo(Z4vc_center) * Z4vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 3:\n if (M.evaluateLoc.isWithinDistance(Z3vc_center, Z3vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z3vc_baseDesire, M.evaluateLoc.distanceTo(Z3vc_center) * Z3vc_distanceDesire));\n }\n case 2:\n if (M.evaluateLoc.isWithinDistance(Z2vc_center, Z2vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z2vc_baseDesire, M.evaluateLoc.distanceTo(Z2vc_center) * Z2vc_distanceDesire));\n }\n case 1:\n if (M.evaluateLoc.isWithinDistance(Z1vc_center, Z1vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z1vc_baseDesire, M.evaluateLoc.distanceTo(Z1vc_center) * Z1vc_distanceDesire));\n }\n case 0:\n }\n //Rarely used, should be optimized the same way if this becomes more common\n for (int i = M.squareIndexMinusOne; i >= 0; i--) {\n ZoneSquare zone = M.squares[i];\n if (zone.left < locX && locX < zone.right && locY < zone.top && locY > zone.bot) {\n M.lastZoneValuation += zone.desire;\n }\n }\n }", "@Override\n\tpublic void onSensorChanged(SensorEvent event) {\n\t\tint value = (int) event.values[0];\n\t\tif(0 == value) {\n\t\t\tnearFlag = true;\n\t\t} else if (1 <= value) {\n\t\t\tfarFlag = true;\n\t\t\tvalue = 1;\n\t\t} else {\n\t\t\t// Something is wrong\n\t\t}\n\t\ttip.setText(\"距离值 : \" + event.values[0]);\n\t\tif(nearFlag && farFlag && !pass) {\n\t\t\tpass = true;\n\t\t\t((AutoMMI)getApplication()).recordResult(PSensorTest.TAG, \"\", \"1\");\n\t\t}\n\t}", "public Integer getDestinationFloor() {\n return switch (this.currentState){\n case UP -> this.jobs.isEmpty() ? this.currentFloor : this.jobs.last();\n case DOWN -> this.jobs.isEmpty() ? this.currentFloor : this.jobs.first();\n case IDLE -> null;\n };\n }", "public int getLocY ()\n {\n return locY;\n }", "public int rawDistance() {\r\n\t\tus.fetchSample(usData, 0); // acquire data\r\n\t\tdistance=(int) (usData[0] * 100.0);// extract from buffer, cast to int and add to total\r\n\t\t\t\r\n\t\treturn distance; \r\n\t}", "public Point getRobotLocation();", "public float getmaxWind() {\n Reading minWindReading = null;\n float maxWind = 0;\n if (readings.size() >= 1) {\n maxWind = readings.get(0).windSpeed;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).windSpeed > maxWind) {\n maxWind = readings.get(i).windSpeed;\n }\n }\n } else {\n maxWind = 0;\n }\n return maxWind;\n }", "@Override\n\tpublic int getSensorAction() {\n\t\tint astar = -1;\n\t\tdouble astarval = Double.POSITIVE_INFINITY;\n\t\tfor (int a : sensorActions) {\n\t\t\t// sum across possible observations\n\t\t\tdouble ysum = 0;\n\t\t\tfor (int y : observations) {\n\t\t\t\t// of the entropy\n\t\t\t\tdouble newEntropy = entropy(updateBeliefs(a,y));\n\t\t\t\tif (Double.isNaN(newEntropy))\n\t\t\t\t\tnewEntropy = currentEntropy;\n\t\t\t\t//double entropyReduction = currentEntropy - newEntropy;\n\t\t\t\t// weighted by the probability\n\t\t\t\t// which is the sum across all possible states of our belief in that state times the probability of getting the observation in that state\n\t\t\t\tdouble xsum = 0;\n\t\t\t\tfor (int ax = 0; ax < beliefs.length; ax++)\n\t\t\t\t\tfor (int ay = 0; ay < beliefs.length; ay++) {\n\t\t\t\t\t\txsum += beliefs[ax][ay] * world.observationProbability(y, a, ax, ay);\n\t\t\t\t\t}\n\t\t\t\tysum += xsum * newEntropy;\n\t\t\t}\n\t\t\tSystem.out.println(\"(EntropicExplorer) \" + world.actionToString(a) + \" : \" + ysum);\n\t\t\tif (ysum < astarval) {\n\t\t\t\tastarval = ysum;\n\t\t\t\tastar = a;\n\t\t\t}\n\t\t}\n\t\tlastSensorAction = astar;\n\t\tSystem.out.println(\"(EntropicExplorer) Choosing sensor action: \" + world.actionToString(astar));\n\t\treturn astar;\n\t}", "Sensor getSensor();", "@Override\r\n public int run() {\n if (robot.rightDrive.isBusy() && robot.leftDrive.isBusy()) {\r\n robot.leftDrive.setPower(leftSpeed);\r\n robot.rightDrive.setPower(rightSpeed);\r\n\r\n /*telemetry.addData(\"MoveByEncoder To\", \"Left: (%2f), Right (%2f)\",\r\n leftTarget, rightTarget);\r\n telemetry.addData(\"MoveByEncoder At\", \"Left: (%2f), Right (%2f)\",\r\n robot.leftDrive.getCurrentPosition(), robot.rightDrive.getCurrentPosition());\r\n telemetry.update();*/\r\n\r\n telemetry.addData(\"Left Pos\", robot.leftDrive.getCurrentPosition());\r\n telemetry.addData(\"Right Pos\", robot.rightDrive.getCurrentPosition());\r\n telemetry.update();\r\n\r\n return 0;\r\n\r\n }\r\n\r\n return nextPos;\r\n }", "public int getGotoFloor();", "private Location[] overrunRight () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == ONE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(myCanvasBounds.getWidth(), getY());\n nextCenter = new Location(0, getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading();\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(getHeading() - THREE_QUARTER_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation =\n new Location(myCanvasBounds.getWidth(), getY() +\n (myCanvasBounds.getWidth() - getX()) /\n Math.tan(angle));\n nextCenter =\n new Location(0, getY() + (myCanvasBounds.getWidth() - getX()) / Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }", "double getEndW();", "private State calculatePM25(double longi, double lati) {\n Double breath = 0.0;\n Double density = PM25Density;\n boolean isConnected = ShortcutUtil.isNetworkAvailable(this);\n String inOutStr = aCache.getAsString(Const.Cache_Indoor_Outdoor);\n if(!ShortcutUtil.isStringOK(inOutStr)){\n inOutStr = String.valueOf(LocationService.Indoor);\n aCache.put(Const.Cache_Indoor_Outdoor,inOutStr);\n }\n inOutDoor = Integer.valueOf(inOutStr);\n /*double ratio;\n if (!isConnected) {\n ratio = this.getLastSevenDaysInOutRatio();\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio == \"+ratio);\n density = ratio * density + (1-ratio)*density/3;\n FileUtil.appendStrToFile(DBRunTime,\"no network connection, using ratio to get density \"+density);\n if (ratio > 0.5) inOutDoor = LocationService.Indoor;\n else inOutDoor = LocationService.Outdoor;\n } else {\n if (inOutDoor == LocationService.Indoor) density /= 3;\n }*/\n\n double static_breath = ShortcutUtil.calStaticBreath(cacheUtil.getAsString(Const.Cache_User_Weight));\n\n if (static_breath == 0.0) {\n if(isBackground != null && isBackground.equals(bgStr))\n Toast.makeText(getApplicationContext(), Const.Info_Weight_Null, Toast.LENGTH_SHORT).show();\n static_breath = 6.6; // using the default one\n }\n if (mMotionStatus == Const.MotionStatus.STATIC) {\n breath = static_breath;\n } else if (mMotionStatus == Const.MotionStatus.WALK) {\n breath = static_breath * 2.1;\n } else if (mMotionStatus == Const.MotionStatus.RUN) {\n breath = static_breath * 6;\n }\n venVolToday += breath;\n breath = breath / 1000; //change L/min to m3/min\n PM25Today += density * breath;\n State state = new State(IDToday, aCache.getAsString(Const.Cache_User_Id), Long.toString(System.currentTimeMillis()),\n String.valueOf(longi),\n String.valueOf(lati),\n String.valueOf(inOutDoor),\n mMotionStatus == Const.MotionStatus.STATIC ? \"1\" : mMotionStatus == Const.MotionStatus.WALK ? \"2\" : \"3\",\n Integer.toString(numStepsForRecord), avg_rate, String.valueOf(venVolToday), density.toString(), String.valueOf(PM25Today), String.valueOf(PM25Source), 0, isConnected ? 1 : 0);\n numStepsForRecord = 0;\n return state;\n }", "public double getEncoderPosition() {\n SmartDashboard.putNumber(\"Raw Encoder Value\", armMotor.getSelectedSensorPosition(0));\n return armMotor.getSelectedSensorPosition(0) * Const.kArmTalon4096Unit2Deg * Const.kArmGearRatioEncoder2Arm;\n }", "public double GetPositionRaw()\n {\n double position = GetPosition();\n\n if (position == -1)\n {\n double CurrentDistance = GetDistance();\n\n // we aren't close to a position, so get the range\n for (int i = 1; i < (Positions.length); i++)\n {\n if (Utilities.isBetween(CurrentDistance, Positions[i - 1],\n Positions[i]))\n {\n // scale the position from inches to the ratio between\n // positions\n position = Utilities.scaleToRange(CurrentDistance,\n Positions[i - 1], Positions[i], i - 1, i);\n break;\n }\n\n }\n }\n\n return position;\n }", "protected int calculateWalk() {\n if (isPrimitive()) {\n double rating = getEngine().getRating();\n rating /= 1.2;\n if (rating % 5 != 0) {\n return (int) (rating - rating % 5 + 5) / (int) weight;\n }\n return (int) (rating / (int) weight);\n\n }\n return getEngine().getRating() / (int) weight;\n }", "public int getEncPosition() {\n //System.out.println(this.EncX.getRaw() + \"raw\");\n return (int) (1000 * this.EncX.getDistance());\n //return (int)(1000 * this.EncX.getRaw() / 8.6);\n \n }", "public double get_thermal_reading() {\n\t\t\n\t\treturn 0;\n\t}", "public MineralLocation getMineralLocation(RobotOrientation orientation){\n MineralLocation absoluteLocation = MineralLocation.Center;\n //if tfod failed to init, just return center\n //otherwise, continue with detection\n if(!error) {\n List<Recognition> updatedRecognitions = tfod.getRecognitions();\n List<Recognition> filteredList = new ArrayList<Recognition>();\n\n /*for(Recognition recognition : updatedRecognitions){\n if(recognition.getHeight() < recognition.getImageHeight() * 3 / 11){\n filteredList.add(recognition);\n }\n }*/\n //Variabes to store two mins\n Recognition min1 = null;\n Recognition min2 = null;\n //Iterate through all minerals\n for(Recognition recognition : updatedRecognitions){\n double height = recognition.getHeight();\n if (min1 == null){\n min1 = recognition;\n }\n else if(min2 == null){\n min2 = recognition;\n }\n else if(height < min1.getHeight()){\n min1 = recognition;\n }\n else if(height < min2.getHeight()){\n min2 = recognition;\n }\n if (min1 != null && min2 != null){\n if(min1.getHeight() > min2.getHeight()){\n Recognition temp = min1;\n min1 = min2;\n min2 = temp;\n }\n }\n }\n filteredList.add(min1);\n filteredList.add(min2);\n int goldMineralX = -1;\n int silverMineral1X = -1;\n int silverMineral2X = -1;\n //Three Mineral Algorithm\n if(orientation == RobotOrientation.Center){\n for (Recognition recognition : filteredList) {\n if (recognition.getLabel().equals(LABEL_GOLD_MINERAL)) {\n goldMineralX = (int) recognition.getLeft();\n } else if (silverMineral1X == -1) {\n silverMineral1X = (int) recognition.getLeft();\n } else {\n silverMineral2X = (int) recognition.getLeft();\n }\n }\n if (goldMineralX != -1 && silverMineral1X != -1 && silverMineral2X != -1) {\n if (goldMineralX < silverMineral1X && goldMineralX < silverMineral2X) {\n return MineralLocation.Left;\n } else if (goldMineralX > silverMineral1X && goldMineralX > silverMineral2X) {\n return MineralLocation.Right;\n } else {\n return MineralLocation.Center;\n }\n }\n }\n else{//Two Mineral Algorithm\n //looks at each detected object, obtains \"the most\" gold and silver mineral\n float goldMineralConfidence = 0;\n float silverMineralConfidence = 0;\n for (Recognition recognition : updatedRecognitions) {\n String label = recognition.getLabel();\n float confidence = recognition.getConfidence();\n int location = (int) recognition.getLeft();\n if (label.equals(LABEL_GOLD_MINERAL)\n && confidence > goldMineralConfidence) {\n goldMineralX = location;\n goldMineralConfidence = confidence;\n } else if (label.equals(LABEL_SILVER_MINERAL)\n && confidence > silverMineralConfidence) {\n silverMineral1X = location;\n silverMineralConfidence = confidence;\n }\n }\n //using the two gold and silver object x locations,\n //obtains whether the gold mineral is on the relative left or the right\n boolean goldRelativeLeft;\n if (goldMineralX != -1 && silverMineral1X != -1) {\n if (goldMineralX < silverMineral1X) {\n goldRelativeLeft = true;\n } else {\n goldRelativeLeft = false;\n }\n // telemetry.addData(\"Relative\", goldRelativeLeft);\n //translates the relative location to an absolute location based off the orientation\n if (orientation == RobotOrientation.Left) {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Left;\n } else {\n absoluteLocation = MineralLocation.Center;\n }\n //telemetry.addData(\"orientation\",absoluteLocation);\n } else {\n if (goldRelativeLeft) {\n absoluteLocation = MineralLocation.Center;\n } else {\n absoluteLocation = MineralLocation.Right;\n }\n // telemetry.addData(\"orientation\",\"fail\");\n }\n } //sees at least one silver (so not a reading from the wrong position, but no gold seen)\n else if(silverMineral1X != -1 && goldMineralX == -1){\n if(orientation == RobotOrientation.Left){\n absoluteLocation = MineralLocation.Right;\n }else if(orientation == RobotOrientation.Right){\n absoluteLocation = MineralLocation.Left;\n }\n }\n }\n\n }\n return absoluteLocation;\n }", "protected long getRightPosition() {\n return rightPosition;\n }", "double getCalibrationOffset();", "public double getCurrentValue()\r\n\t{\r\n\t\tcurrentValue=(2*border+24)/2;\r\n\t\treturn currentValue;\r\n\t}", "protected byte[] getMeasuredFloorTemperature() {return null;}", "public double Right(){\n\t\tdouble farx = x + sizeX - 1;\n\t\treturn (farx);\n\t}", "public String getSensor()\n {\n return sensor;\n }", "@Override\n\tpublic double calculate() \n\t{\t\n\t\t//return 2.45e6;\n\t\t//return (2499.64 - (2.51 * tempCelsius.value)) * 1000;\t\n\t\t//return ((2.501 - (0.002361 * tempCelsius.value)) * 1e6)*0.33;\n\t\treturn ((2.501 - (0.002361 * tempCelsius.value)) * 1e6);\n\t}", "public void convertToLocation() {\r\n\t\tdouble longitude = Double.MIN_VALUE;\r\n\t\tdouble latitude = Double.MIN_VALUE;\r\n\r\n\t\tdistance += 0.75;\r\n\t\tsteps = meter.getSteps();\r\n\r\n\t\tDataLogger.getInstance().setCurrDistance(distance);\r\n\r\n\t\tlatitude = 0.75 * Math.cos(orientation) * 0.000009\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLatitude();\r\n\t\tlongitude = 0.75 * Math.sin(orientation) * 0.0000136\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLongitude();\r\n\r\n\t\tDataLogger.getInstance().addLocation(latitude, longitude,\r\n\t\t\t\tjava.lang.System.currentTimeMillis());\r\n\r\n\t\tLog.d(TAG, \"Called convertToLocation\");\r\n\t}", "double compute_lift_pos () {\n return AC_OFFSET_K * this.chord + \n (convert_moments_to_AC_offset ? -1*this.moment/this.lift : 0);\n }", "@Override\n public double getPosition()\n {\n final String funcName = \"getPosition\";\n double pos = getMotorPosition() - zeroPosition;\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", pos);\n }\n\n return pos;\n }", "public void determineLocType() {\r\n\t\tif(usSensor.rawDistance()<WALL_THRESHOLD) { //Deciding what localizer should be used\r\n\t\t\tthis.loc = LocalizerType.RISING_EDGE;\r\n\t\t}else {\r\n\t\t\tthis.loc=LocalizerType.FALLING_EDGE;\r\n\t\t}\r\n\t}", "public float getminWind() {\n Reading minWindReading = null;\n float minWind = 0;\n if (readings.size() >= 1) {\n minWind = readings.get(0).windSpeed;\n for (int i = 1; i < readings.size(); i++) {\n if (readings.get(i).windSpeed < minWind) {\n minWind = readings.get(i).windSpeed;\n }\n }\n } else {\n minWind = 0;\n }\n return minWind;\n }", "public PVector getWristPosition(){\n\t\treturn this.leap.map(this.arm.wristPosition());\n\t}", "public Object getLocation() {\n return leftSide.getLocation();\n }", "public void calculateDistance() {\n SensorEventListener mSensorEventListener = new SensorEventListener() {\n @Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n mAngle = (Math.acos(sensorEvent.values[2] / 9.8)) * (180/Math.PI) - 5;\n mAngle = Math.toRadians(mAngle);\n mDistance = mHeight * Math.tan(mAngle);\n }\n\n @Override\n public void onAccuracyChanged(Sensor sensor, int i) {\n\n }\n };\n mSensorManager.registerListener(mSensorEventListener, mAccelerometer,\n SensorManager.SENSOR_DELAY_UI);\n\n // Calculating the distance.\n mDistance = mHeight * Math.tan(mAngle);\n // Rounding it up to 2 decimal places\n DecimalFormat df = new DecimalFormat(\"#.##\");\n mDistance = Double.valueOf(df.format(mDistance));\n String distanceString = Double.toString(mDistance);\n\n // Update the distance TextView\n TextView distanceView = (TextView) findViewById(R.id.distanceText);\n String text = distanceString + \" cm\";\n distanceView.setText(text);\n distanceView.setTextSize(36);\n }", "int getChargerCurrentRaw();", "public double getRight() {\n return this.xR;\n }", "int getSellCurrentRaw();", "public int getRightEnc() {\n\t\treturn TalRM.getSelectedSensorPosition(0)-initEncR;\n\t}", "private int getObservationResult( long currentTime )\n {\n int[] votes = new int[ 6 ];\n //[copied to the readFromNBT method]\n if( m_entanglementFrequency >= 0 )\n {\n List<TileEntityQBlock> twins = getEntanglementRegistry().getEntangledObjects( m_entanglementFrequency );\n if( twins != null )\n {\n Iterator<TileEntityQBlock> it = twins.iterator();\n while( it.hasNext() )\n {\n TileEntityQBlock twin = it.next();\n if( twin != this )\n {\n //[/copied]\n if( twin.m_currentlyObserved && twin.m_timeLastUpdated == currentTime )\n {\n // If an entangled twin is already up to date, use its result\n if( twin.m_currentlyForcedSide >= 0 )\n {\n return twin.m_currentlyForcedSide + 6;\n }\n else\n {\n return twin.m_currentDisplayedSide;\n }\n }\n else\n {\n // Otherwise, add its votes to the pile\n if( twin.m_currentlyForcedSide >= 0 && twin.m_forceObserved[ m_currentlyForcedSide ] )\n {\n return twin.m_currentlyForcedSide + 6;\n }\n else\n {\n for( int i=0; i<6; ++i )\n {\n if( twin.m_forceObserved[ i ] )\n {\n return i + 6;\n }\n }\n }\n votes = addVotes( votes, twin.collectVotes() );\n }\n }\n }\n }\n }\n\n // Get local observer votes\n if( m_currentlyForcedSide >= 0 && m_forceObserved[ m_currentlyForcedSide ] )\n {\n return m_currentlyForcedSide + 6;\n }\n else\n {\n for( int i=0; i<6; ++i )\n {\n if( m_forceObserved[ i ] )\n {\n return i + 6;\n }\n }\n }\n votes = addVotes( votes, collectVotes() );\n\n // Tally the votes\n return tallyVotes( votes );\n }", "public double[] getLocation()\n\t{\n\t\treturn location;\n\t}", "public double getFinalDistance(){\n return valori.get(end_node);\n }", "public double getCurrentFuel();", "private double calculateTemp(){\n if (!((Double)mplTemp).isNaN() && !((Double)shtTemp).isNaN()){\n return (mplTemp + shtTemp)/2;\n }\n\n return Double.NaN;\n }", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "public double getReading() {\r\n\t\tresult = clicks;\r\n\t\tif(metric) result *= 0.2;\r\n\t\telse result *= 0.01;\r\n\t\treturn result;\r\n\t\t\r\n\t}", "public Coordinates getAccuratePayloadPosition() {\r\n\t\tSkylightVehicleConfigurationMessage svc = repositoryService.getSkylightVehicleConfiguration();\r\n\t\t//rotate relative camera position \r\n\t\tdouble rx = getEoIrPayload().getPositionXRelativeToAV() - svc.getGpsAntennaPositionX();\r\n\t\tdouble ry = getEoIrPayload().getPositionYRelativeToAV() - svc.getGpsAntennaPositionY();\r\n\t\tdouble mr = Math.sqrt(rx*rx + ry*ry);\r\n\t\tdouble yaw = CoordinatesHelper.headingToMathReference(instrumentsService.getYaw());\r\n\t\tdouble rz = getEoIrPayload().getPositionZRelativeToAV() - svc.getGpsAntennaPositionZ();\r\n\t\t//calculate corrected position\r\n\t\tCoordinatesHelper.calculateCoordinatesFromRelativePosition(accuratePosition, gpsService.getPosition(), mr*Math.cos(yaw), mr*Math.sin(yaw));\r\n//\t\taccuratePosition.setAltitude(advancedInstrumentsService.getAltitude(AltitudeType.AGL)-(float)rz);//RIGHT VERSION\r\n\t\taccuratePosition.setAltitude(advancedInstrumentsService.getAltitude(AltitudeType.WGS84)-(float)rz);//TESTS\r\n\t\treturn accuratePosition;\r\n\t}", "private short computeLocationValue(short row, short column) {\n\t\treturn (short) (gridSize * row + column);\n\t}", "public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}", "public void receivedValue(HashMap<Sensor, Double> e) {\n\t\ttry {\n\t\t\tarmIMUAngle = e.get(Sensor.ARM_ANGLE);\n\t\t} catch (NullPointerException error) {\n\t\t\tif (debug)\n\t\t\t\tSystem.out.println(\"Bad Angle Sensor\");\n\t\t}\n\t\ttry {\n\t\t\tcurrentDist = e.get(Sensor.ULTRASONIC_DISTANCE);\n\t\t} catch (NullPointerException error) {\n\t\t\tif (debug)\n\t\t\t\tSystem.out.println(\"Bad Ultrasonic Sensor\");\n\t\t}\n\t}", "public void strafeRight()\r\n\t{\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] += Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] += Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}", "public int lightreading() {\n\t\tLSvalue = lightSensor.lightreading(); \t\t\t\t\t\t\t\t\t\n\t\treturn LSvalue;\n\t}", "public void onPositionChanged() {\n\n latPeriodic = location.getLatitude();\n lonperiodic = location.getLongitude();\n\n }", "public int getLocationX() {\r\n\t\treturn x;\r\n\t}", "public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}", "public int getLocation() {\n\t\treturn 0;\n\t}", "public int getY(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(1)/ AvesAblazeHardware.mmPerInch);\n\t}", "public PVector getRawPosition(){\n\t\treturn this.leap.convert(this.arm.center());\n\t}", "public String getWindDir() {\n float windDire = 0;\n String windDir = \" \";\n if (readings.size() > 0) {\n windDire = readings.get(readings.size() - 1).windDirection;\n\n if (windDire >= 348.75 || windDire <= 11.25) {\n windDir += windDir + \" N \";\n } else if (windDire >= 11.25 && windDire <= 33.75) {\n windDir += windDir + \" NNE \";\n } else if (windDire >= 33.75 && windDire <= 56.25) {\n windDir += windDir + \" NE \";\n } else if (windDire >= 56.25 && windDire <= 78.75) {\n windDir += windDir + \" ENE \";\n } else if (windDire >= 78.75 && windDire <= 101.25) {\n windDir += windDir + \" E \";\n } else if (windDire >= 101.25 && windDire <= 123.75) {\n windDir += windDir + \" ESE \";\n } else if (windDire >= 123.75 && windDire <= 146.25) {\n windDir += windDir + \" SE \";\n } else if (windDire >= 146.25 && windDire <= 168.75) {\n windDir += windDir + \" SSE \";\n } else if (windDire >= 168.75 && windDire <= 191.25) {\n windDir += windDir + \" S \";\n } else if (windDire >= 191.25 && windDire <= 213.75) {\n windDir += windDir + \" SSW \";\n } else if (windDire >= 213.75 && windDire <= 236.25) {\n windDir += windDir + \" SW \";\n } else if (windDire >= 236.25 && windDire <= 258.75) {\n windDir += windDir + \" WSW \";\n } else if (windDire >= 258.75 && windDire <= 281.25) {\n windDir += windDir + \" W \";\n } else if (windDire >= 281.25 && windDire <= 303.75) {\n windDir += windDir + \" WNW \";\n } else if (windDire >= 303.75 && windDire <= 326.25) {\n windDir += windDir + \" NW \";\n } else if (windDire >= 326.25 && windDire <= 348.75) {\n windDir += windDir + \" NNW \";\n } else {\n }\n }\n return windDir;\n }", "@Override\r\n\t\t\tpublic void onSensorChanged(SensorEvent event)\r\n\t\t\t{\n\t\t\t\tx=event.values[0];\r\n\t\t\t\ty=event.values[1];\r\n\t\t\t\tz=event.values[2];\r\n\t\t\t\t//balle\r\n\t\t\t\tmx-=(int)x;\r\n\t\t\t\tmy+=(int)y;\r\n\t\t\t\tif (mx<40)\r\n\t\t\t\t{\r\n\t\t\t\t\tmx=40;\r\n\t\t\t\t}\r\n\t\t\t\tif (mx>1190)\r\n\t\t\t\t{\r\n\t\t\t\t\tmx=1190;\r\n\t\t\t\t}\r\n\t\t\t\tif (my<50)\r\n\t\t\t\t{\r\n\t\t\t\t\tmy=50;\r\n\t\t\t\t}\r\n\t\t\t\tif (my>700)\r\n\t\t\t\t{\r\n\t\t\t\t\tmy=700;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t\t//departBalle\r\n\t\r\n\t\t\t\tdepartBalle.setPos_x(mx);\r\n\t\t\t\tdepartBalle.setPos_y(my);\r\n\t\t\tSystem.out.println(\"\"+mx+\":\"+my);\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t}", "public int getMovement() {\n return tempUnit.getMovement();\n }", "public static String location(SensorDetails details) {\r\n\t\treturn details.location;\r\n\t}", "private static double calculateSekante(double left, double right) {\n\n\t\t// if there was only a small change in angle , should be unnecessary\n\t\tif (Math.abs(newangle) < deviationAngle) {\n\t\t\tdistance = (left + right) / 2.0;\n\t\t\t// isLine = false;\n\t\t\treturn distance;\n\t\t}\n\t\t// compute radius\n\n\t\tdouble r = 0.5 * (left + right) / newangle;\n\t\tradius = r;\n\n\t\tInputHandler.stepForward(\"ra.\" + radius);\n\n\t\t// compute distance with the center pos\n\t\tdistance = 2.0 * (r) * Math.sin(newangle / 2.0);\n\n\t\treturn (distance);\n\t}", "int getCoorY();", "private static int getValAbove(double rand, int charge) {\n // array of the surface areas of charge \"charge\"\n double[] arr = cumulativeSurfaceAreas.get(charge)[0];\n\n int low = 0;\n int high = arr.length - 1;\n while (low <= high) {\n int mid = (high + low) / 2;\n \n if (arr[mid] >= rand && (mid == 0 || arr[mid-1] < rand)) { // If we're at the right location\n return (int) cumulativeSurfaceAreas.get(charge)[1][mid]; \n } else if (arr[mid] < rand) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n \n System.out.println(\"hoodsijfoi\");\n return -1; // Should never get here\n }" ]
[ "0.67609453", "0.66259027", "0.64186", "0.6081089", "0.6034588", "0.5985673", "0.59379137", "0.5922825", "0.58905846", "0.5829049", "0.5816721", "0.58015597", "0.58012867", "0.57921815", "0.5774685", "0.5746246", "0.5737261", "0.57364345", "0.5719668", "0.57154906", "0.5712503", "0.57101536", "0.5705814", "0.56773394", "0.5675209", "0.5671897", "0.5669327", "0.5669087", "0.56589276", "0.56429636", "0.56413084", "0.56364924", "0.5629779", "0.56273896", "0.56152856", "0.5612712", "0.5604326", "0.5599584", "0.5597883", "0.55966556", "0.5595638", "0.5580408", "0.5570411", "0.5565105", "0.55625063", "0.5562018", "0.55586034", "0.5558139", "0.55535513", "0.55527973", "0.55510986", "0.5548146", "0.55445755", "0.5543813", "0.5533417", "0.55244327", "0.55201215", "0.5516862", "0.5513357", "0.5512261", "0.55108404", "0.55070406", "0.5506402", "0.55018383", "0.5500287", "0.5498695", "0.5492984", "0.54886943", "0.54816544", "0.5477094", "0.54715425", "0.5471119", "0.54632574", "0.54628706", "0.5459953", "0.54578274", "0.5451926", "0.5448952", "0.54487044", "0.5447581", "0.5445662", "0.54452807", "0.5440688", "0.5437986", "0.54339254", "0.5432423", "0.5422287", "0.54142046", "0.5412472", "0.54088485", "0.54075", "0.54070973", "0.5404764", "0.54035306", "0.5395222", "0.539436", "0.53937936", "0.53897613", "0.5389734", "0.53888375" ]
0.70038325
0
Calculate where the left sensor is.
private Point2D.Double leftSensorLocation() { double dx = getSize() * Math.cos(getOrientation() + Math.PI / 4); double dy = -getSize() * Math.sin(getOrientation() + Math.PI / 4); return new Point2D.Double(getX() + dx * 2, getY() + dy * 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getLeftCurrent() {\n return leftMotor.getOutputCurrent();\n }", "public double getLeft() {\r\n\t\treturn -left.getRawAxis(1);\r\n\t}", "public int getLeftEnc() {\n\t\treturn TalLM.getSelectedSensorPosition(0)-initEncL;\n\t}", "public double getLeft() {\n return this.xL;\n }", "protected long getLeftPosition() {\n return leftPosition;\n }", "private static double getLeftStick() {\n\t\treturn (OI.getInstance().leftStick.getY()) * speed;\n\t}", "public double getLeftDistance() {\n return leftEnc.getDistance();\n }", "public double getLeftDistance() {\n\t\treturn left.getDistance();\n\t}", "public int getXLeft() {\n return xLeft;\n }", "public int getLeftX() {\n\t\treturn 0;\r\n\t}", "public double getLeftX(){\r\n\t\treturn adjustInput(driverLeft.getX());\r\n\t}", "@Override\r\n\tpublic Trajectory getLeftTrajectory() {\n\t\treturn left;\r\n\t}", "public float getTimeLeft() {\n return this.state.getTime();\n }", "public Location getLeftArmEnd() {\r\n\t\tfinal Location l1 = GeneralMethods.getLeftSide(this.player.getLocation(), 2).add(0, 1.5, 0);\r\n\t\treturn l1.clone().add(this.player.getLocation().getDirection().normalize().multiply(this.initLength));\r\n\t}", "private Location getLeftHandPos() {\r\n\t\treturn GeneralMethods.getLeftSide(this.player.getLocation(), .34).add(0, 1.5, 0);\r\n\t}", "public double getLeftTrigger() {\n\t\treturn getRawAxis(LEFT_TRIGGER);\n\t}", "public int leftPosion (double degLon){\n double scale = pictureSizePixels/worlSizeMeters;\n return (int) Math.round(xCoordinate(degLon)\n *scale\n +(pictureSizePixels/2));\n }", "public double getLeftAcceleration() {\n return leftEnc.getAcceleration();\n }", "public double getLeft(double min) {\n return Math.min(min, min + (this.length * Math.sin(Math.toRadians(this.theta)))\n ); \n }", "private Vector2D leftVelocity() {\n return new Vector2D(this.movementSpeed * this.differenceTime * -1, 0);\n }", "public float getLeftX() {\n\t\treturn leftX;\n\t}", "public int getLeftNumber() {\n return leftNumber;\n }", "public Integer checkLeft()\r\n\t{\r\n\t\treturn this.X - 1;\r\n\t}", "double getLeft(double min);", "public double getLeftEncoderDistance() {\n return this.leftEncoder.getDistance();\n }", "public int getLeft() {\n\t\treturn left;\n\t}", "public BoardCoordinate getLeft() {\n return new BoardCoordinate(x-1, y);\n }", "public double getLeftY() {\r\n\t\treturn adjustInput(driverLeft.getY());\r\n\t}", "public double getAverageEncoderPosition()\n {\n \treturn ( Math.abs(leftBackTalon.getSelectedSensorPosition(0)) + Math.abs(rightBackTalon.getSelectedSensorPosition(0))) / 2;\n }", "public double getLeftDistanceInches() {\n return leftEncoder.getDistance();\n }", "public double Left(){\n\t\treturn (x);\n\t}", "public Location left() {\n return new Location(row, column - 1);\n }", "public double getLeftDistanceInches()\n {\n return rotationsToInches(mLeftMaster.getSensorPositionRotations());\n }", "public Object getLocation() {\n return leftSide.getLocation();\n }", "public BigInteger getNumLeft () {\n\t return numLeft;\n\t }", "public void strafeLeft(){\r\n\t\t//Following the camera:\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading))*distance;\r\n\t\t}\r\n\t}", "public double getLeftDistanceFeet() {\n return leftEncoder.getDistance() / 12;\n }", "private Location[] overrunLeft () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(0, getY());\n nextCenter = new Location(myCanvasBounds.getWidth(), getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading() - ONE_QUARTER_TURN_DEGREES;\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(THREE_QUARTER_TURN_DEGREES - getHeading());\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(0, getY() + getX() / Math.tan(angle));\n nextCenter = new Location(myCanvasBounds.getWidth(), getY() + getX() /\n Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }", "public int getLeft(){\n\t\treturn platformHitbox.x;\n\t}", "protected double getWindowLeftX() {\n\t\treturn this.m_windowLeftX;\n\t}", "public void left() {\n if (x - movementSpeed > -55) {\r\n x = x - movementSpeed;\r\n }\r\n }", "double getLeftY();", "private int movesLeft() {\n\t\treturn movesLeft.size() - 1; // don't count quit\n\t}", "public int getPrayerLeft() {\n\t\treturn Integer.parseInt(methods.interfaces.getComponent(Game.INTERFACE_PRAYER_ORB, 4).getText());\n\t}", "public Pixel downLeft() {\n if (this.down == null) {\n return null;\n }\n else {\n return this.down.left;\n }\n }", "public BigInteger getNumLeft() {\n return numLeft;\n }", "public double getLeftXAxis() {\n\t\treturn getRawAxis(Axis_LeftX);\n\t}", "public Bearing leftFrom() {\n return this.get(((this.bearing - 2) + 8) % 8);\n }", "public LTSState getLeftState(){\n\t\treturn leftState;\n\t}", "public int getLeft() {\n\t\treturn this.left;\n\t}", "double leftmost_alien_x() {\n double min_x = scene_width;\n for (Alien alien : aliens) {\n if (alien.x_position < min_x) {\n min_x = alien.x_position;\n }\n }\n return min_x;\n }", "public BigInteger getNumLeft()\n\t{\n\t\treturn numLeft;\n\t}", "public float getLeftRightTimer() {\n return leftRightTimer;\n }", "protected int getGraphLeft() {\r\n\t\treturn leftEdge;\r\n\t}", "public double getLeftJoystickHorizontal() {\n\t\treturn getRawAxis(LEFT_STICK_HORIZONTAL);\n\t}", "public Player getLeftNeighbor() {\n\t\tif(players.indexOf(current)==0) {\n\t\t\treturn players.get(players.size()-1);\n\t\t}\n\t\telse {\n\t\t\treturn players.get(players.indexOf(current)-1);\n\t\t}\n\t}", "@Override\n public void teleopPeriodic() {\n\n double l = left.calculate((int)rightEnc.get());\n double r = right.calculate((int)rightEnc.get());\n\n double gyro_heading = gyro.getYaw(); // Assuming the gyro is giving a value in degrees\n double desired_heading = Pathfinder.r2d(left.getHeading()); // Should also be in degrees\n\n double angleDifference = Pathfinder.boundHalfDegrees(desired_heading - gyro_heading);\n double turn = 0.8 * (-1.0/80.0) * angleDifference;\n\n //left1.set(l + turn);\n //right1.set(r - turn);\n left1.set(0);\n right1.set(0);\n System.out.println(\"Get: \" + rightEnc.get() + \" Raw: \" + rightEnc.getRaw());\n\n }", "public int getSizeLeft() {\n return datasPointer - headerPointer;\n }", "public Point getdownLeft() {\n Point downLeft = new Point(this.upperLeft.getX(), this.upperLeft.getY() + this.getHeight());\n return downLeft;\n }", "@DISPID(-2147417104)\n @PropGet\n int offsetLeft();", "public Point getLocalPosition() {\n return getLocalLowerLeft();\n }", "public FPointType calculateUpperLeft() {\n fRectBound = getBounds2D();\n FPointType fptUpperLeft = new FPointType(fRectBound.x, fRectBound.y);\n calculate(fptUpperLeft);\n \n rotateRadian = 0.0f;\n \n return fptUpperLeft;\n }", "public void refreshLeft();", "public double getLeft(double min) {\n return min - this.size; \n }", "public Direction left() {\r\n\t\tint newDir = this.index - 1;\r\n\r\n\t\tnewDir = (newDir == 0) ? 4 : newDir;\r\n\t\treturn getEnum(newDir);\r\n\t}", "public Direction left() {\r\n\t\tif (this.direction == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tthis.direction = Direction.WEST;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tthis.direction = Direction.SOUTH;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tthis.direction = Direction.EAST;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tthis.direction = Direction.NORTH;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn this.direction;\r\n\t}", "public int getLeftEdge() {\n return leftEdge;\n }", "public int getLeftCount() {\n return leftEncoder.get();\n }", "public org.drip.exposure.regression.PillarVertex leftPillar()\n\t{\n\t\treturn _leftPillar;\n\t}", "public Coords getLowerLeft()\r\n {\r\n return new Coords(x, y + height);\r\n }", "public double getLeft(double min) {\n return Math.max(min, Math.max(Math.max(this.left.getLeft(min), this.right.getLeft(min)),\n Math.max(this.right.getLeft(min), this.right.getLeft(min))));\n }", "public double getLeftJoystickVertical() {\n\t\treturn getRawAxis(LEFT_STICK_VERTICAL) * -1;\n\t}", "public int getLeftWeight(){\r\n\t \treturn this.leftWeight;\r\n\t }", "public float getLowerLeftX()\n {\n return ((COSNumber)rectArray.get(0)).floatValue();\n }", "public AVLNode<E> getLeft() {\r\n\t\treturn left;\r\n\t}", "double a_left_front_drive_power()\n {\n double l_return = 0.0;\n if (left_front_drv_Motor != null)\n {\n l_return = left_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "public int getCurrentFloor();", "public IAVLNode getLeft() {\n\t\t\treturn this.left; // to be replaced by student code\n\t\t}", "protected final IntervalNode getLeft() {\n\treturn(this.left);\n }", "public int getLeftMonster() {\n return leftMonster_;\n }", "@Override\n\tpublic int getTimeLeft() {\n\t\treturn chronometer.getTimeLeft();\n\t}", "public int getLeftMonsterIndex() {\n return leftMonsterIndex_;\n }", "public double getTrajectoryPosition() {\n return leftMotor.getActiveTrajectoryPosition();\n }", "public int getLeftMonster() {\n return leftMonster_;\n }", "public Location getLeft()\n\t{\n\t\tif(checkLeft())\n\t\t{\n\t\t\treturn new Location(row,col-1);\n\t\t}\n\t\treturn this;\n\t}", "public int numLeft() {\n return types.size() - index;\n }", "public BeaconColor getStateLeft() {\n return left;\n }", "private void LeftLeftLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t}", "double a_left_back_drive_power()\n {\n double l_return = 0.0;\n if (left_back_drv_Motor != null)\n {\n l_return = left_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }", "public int getLeftMonsterIndex() {\n return leftMonsterIndex_;\n }", "public float getDistanceToLeftPivot() {\n return leftDist;\n }", "private void LeftRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "public double getLeftRate() {\n return leftEnc.getRate();\n }", "public double getBoundingBoxLeft() {\n return boundingBoxLeft;\n }", "private byte l() {\r\n\t\treturn left_map;\r\n\t}", "public int getKeyLeft() {\r\n return Input.Keys.valueOf(keyLeftName);\r\n }", "@Override\n\tpublic String calculateLeftTurn() {\n\t\t// check the current side with the side of the retrieved value from\n\t\t// properties file.\n\t\tif (side.substring(1).equals(properties.getSideFromProperties().get(1))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(4);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(2))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(1);\n\n\t\t} else if (side.substring(1).equals(properties.getSideFromProperties().get(3))) {\n\t\t\tthis.side = properties.getSideFromProperties().get(2);\n\n\t\t} else {\n\t\t\tthis.side = properties.getSideFromProperties().get(3);\n\n\t\t}\n\t\t// return the new side to update the image shown with the starting\n\t\t// letter of the room and the side to be the same as the name of the\n\t\t// image.\n\t\treturn this.room.substring(0, 1).toLowerCase() + this.side;\n\t}", "private int left(int parent) {\n\t\treturn (parent*2)+1;\n\t}", "public BSTItem getLeft()\r\n\t{\r\n\t\treturn left;\r\n\t}", "public int getSegsLeft(){\r\n return segsLeft;\r\n }" ]
[ "0.7061113", "0.7024485", "0.69557476", "0.69539016", "0.6904851", "0.6873666", "0.6820618", "0.6736811", "0.6730669", "0.6714624", "0.67131776", "0.6648926", "0.661511", "0.6600197", "0.6599045", "0.6576509", "0.6560199", "0.65427196", "0.6492218", "0.64865535", "0.6461605", "0.64510465", "0.6426118", "0.642459", "0.6379996", "0.6351225", "0.6351158", "0.6341112", "0.6318184", "0.6308346", "0.63020194", "0.6293423", "0.6287682", "0.62600017", "0.6248797", "0.6244926", "0.6237934", "0.6228177", "0.6225639", "0.62214345", "0.6200809", "0.6181152", "0.6178559", "0.61737365", "0.61732763", "0.61730397", "0.6146856", "0.614473", "0.61248046", "0.6122717", "0.6098693", "0.6097353", "0.60731876", "0.6054133", "0.6049986", "0.6045365", "0.60328716", "0.603052", "0.60059047", "0.5994309", "0.59741193", "0.59633535", "0.5961474", "0.5958146", "0.59554744", "0.59531003", "0.5947216", "0.5946187", "0.5941949", "0.5941199", "0.59368956", "0.593487", "0.5931732", "0.5928138", "0.5924651", "0.5919575", "0.5919268", "0.5909501", "0.5902761", "0.5898076", "0.5894975", "0.58933765", "0.58898944", "0.58776116", "0.58742183", "0.5863681", "0.585656", "0.5846176", "0.5843261", "0.5838395", "0.5831758", "0.5804682", "0.58044994", "0.5800937", "0.580058", "0.57965404", "0.57925093", "0.57796746", "0.5779359", "0.5775947" ]
0.7642983
0
method that updates the competency drop down in the screen based on competency Group Selected
public void getAllCompetencyByCompetencyGroupId(ValueChangeEvent event) { Integer competencyGroupId = (Integer) event.getNewValue(); if(competencyCodes.size()>0){ competencyCodes.clear(); } //List<Competency> selectedCompetency = new ArrayList<Competency>(); List<Competency> allCompetency = competencyService.getAllCompetencys(); for(Competency competency:allCompetency){ if(competency.getCompetencyGroupId().equals(competencyGroupId)){ this.competencyCodes.add(new SelectItem(competency.getCompetencyId(), competency.getCompetencyName())); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void commitCompetitiveGroupFieldValues() {\r\n ((CompetitiveGroup) competitive)\r\n .setUpdateMethod((UpdateMethod) updateMethod.getSelectedItem());\r\n ((CompetitiveGroup) competitive).setLearningRate(Double\r\n .parseDouble(tfEpsilon.getText()));\r\n ((CompetitiveGroup) competitive).setWinValue(Double\r\n .parseDouble(tfWinnerValue.getText()));\r\n ((CompetitiveGroup) competitive).setLoseValue(Double\r\n .parseDouble(tfLoserValue.getText()));\r\n ((CompetitiveGroup) competitive).setSynpaseDecayPercent(Double\r\n .parseDouble(tfSynpaseDecayPercent.getText()));\r\n ((CompetitiveGroup) competitive).setLeakyLearningRate(Double\r\n .parseDouble(tfLeakyEpsilon.getText()));\r\n ((CompetitiveGroup) competitive).setUseLeakyLearning(cbUseLeakyLearning\r\n .isSelected());\r\n ((CompetitiveGroup) competitive).setNormalizeInputs(cbNormalizeInputs\r\n .isSelected());\r\n }", "private void fillCompetitiveGroupFieldValues() {\r\n updateMethod.setSelectedItem(((CompetitiveGroup) competitive)\r\n .getUpdateMethod());\r\n tfEpsilon.setText(Double.toString(((CompetitiveGroup) competitive)\r\n .getLearningRate()));\r\n tfLoserValue.setText(Double.toString(((CompetitiveGroup) competitive)\r\n .getLoseValue()));\r\n tfWinnerValue.setText(Double.toString(((CompetitiveGroup) competitive)\r\n .getWinValue()));\r\n tfLeakyEpsilon.setText(Double.toString(((CompetitiveGroup) competitive)\r\n .getLeakyLearningRate()));\r\n tfSynpaseDecayPercent.setText(Double\r\n .toString(((CompetitiveGroup) competitive)\r\n .getSynpaseDecayPercent()));\r\n cbUseLeakyLearning.setSelected(((CompetitiveGroup) competitive)\r\n .getUseLeakyLearning());\r\n cbNormalizeInputs.setSelected(((CompetitiveGroup) competitive)\r\n .getNormalizeInputs());\r\n }", "public void update() {\n if (Globals.prefs.getBoolean(JabRefPreferences.GRAY_OUT_NON_HITS)) {\n panel.getMainTable().getTableModel().updateGroupingState(MainTableDataModel.DisplayOption.FLOAT);\n } else {\n panel.getMainTable().getTableModel().updateGroupingState(MainTableDataModel.DisplayOption.FILTER);\n }\n panel.getMainTable().getTableModel().updateSortOrder();\n panel.getMainTable().getTableModel().updateGroupFilter();\n panel.getMainTable().scrollTo(0);\n\n frame.output(Localization.lang(\"Updated group selection\") + \".\");\n }", "public void selectCategory() {\n\t\t\r\n\t}", "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "@Override\n\t\t\t\t\tpublic void onSelcted(Category mParent, Category category) {\n\t\t\t\t\t\tif (view == solverMan) {\n\t\t\t\t\t\t\tsolverCategory = category;\n\t\t\t\t\t\t\tsolverMan.setContent(category.getName());\n\t\t\t\t\t\t} else {// check is foucs choose person\n\t\t\t\t\t\t\tChooseItemView chooseItemView = (ChooseItemView) view\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.common_add_item_title);\n\n\t\t\t\t\t\t\tfor (Category mCategory : mGuanzhuList) {\n\t\t\t\t\t\t\t\tif (category.getId().equals(mCategory.getId())) {\n\t\t\t\t\t\t\t\t\t// modify do nothing.\n\t\t\t\t\t\t\t\t\tif (!category.getName().equals(\n\t\t\t\t\t\t\t\t\t\t\tchooseItemView.getContent())) {\n\t\t\t\t\t\t\t\t\t\tshowToast(\"该关注人已经在列表了\");// not in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// chooseItem,but\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// other already\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// has this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// name.\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchooseItemView.setContent(category.getName());\n\n\t\t\t\t\t\t\tAddItem addItem = (AddItem) chooseItemView.getTag();\n\t\t\t\t\t\t\t// 关注人是否已经存在,就只更新\n\t\t\t\t\t\t\tfor (Category mCategory : mGuanzhuList) {\n\t\t\t\t\t\t\t\tif (addItem.tag.equals(mCategory.tag)) {\n\t\t\t\t\t\t\t\t\t// modify .\n\t\t\t\t\t\t\t\t\tmCategory.setName(category.getName());\n\t\t\t\t\t\t\t\t\tmCategory.setId(category.getId());\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tLog.i(TAG,\n\t\t\t\t\t\t\t\t\t\"can not find the select item from fouc:\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "public void setvalues(){\n Connection con= getConnection();\n Statement pst1;\n ResultSet rs1;\n \n try{\n \n String qry1=\"SELECT DISTINCT(`StudentGroup`) FROM `sessions`\";\n \n pst1=con.prepareStatement(qry1);\n rs1=pst1.executeQuery(qry1);\n\n combo_studentGroup.removeAllItems();\n \n while(rs1.next()){\n combo_studentGroup.addItem(rs1.getString(\"StudentGroup\"));\n }\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n \n }", "private void createGrpClinicSelection() {\n\n\t}", "private void butEditCategories_Click(Object sender, EventArgs e) throws Exception {\n ArrayList selected = new ArrayList();\n for (int i = 0;i < listCategories.SelectedIndices.Count;i++)\n {\n selected.Add(CatList[listCategories.SelectedIndices[i]].DefNum);\n }\n FormDefinitions FormD = new FormDefinitions(DefCat.ProcCodeCats);\n FormD.ShowDialog();\n DataValid.setInvalid(InvalidType.Defs);\n changed = true;\n fillCats();\n for (int i = 0;i < CatList.Length;i++)\n {\n if (selected.Contains(CatList[i].DefNum))\n {\n listCategories.SetSelected(i, true);\n }\n \n }\n //we need to move security log to within the definition window for more complete tracking\n SecurityLogs.MakeLogEntry(Permissions.Setup, 0, \"Definitions\");\n fillGrid();\n }", "private void RenderCombo()\r\n\t{\r\n\t\tSystem.out.println(\"Setup\");\r\n\t\tList<ProductionOrder> productionOrders = null;\r\n\t\t\t\t\r\n \ttry {\r\n \t\tproductionOrders = this.getProductionOrderService().findProductionOrders(); \r\n \t\tif(productionOrders==null)\r\n \t\t\tSystem.out.println(\"productoinOrders is null\");\r\n\t \t_productionOrderSelect = null;\r\n\t \t_productionOrderSelect = new GenericSelectModel<ProductionOrder>(productionOrders,ProductionOrder.class,\"FormattedDocNo\",\"id\",_access);\r\n\t \tif(_productionOrderSelect==null){\r\n\t \t\tSystem.out.println(\"Setuprender productionOrderselect is null\");\r\n\t \t}\r\n \t}\r\n \tcatch(Exception e)\r\n \t{\r\n \t\t\r\n \t}\r\n \tfinally {\r\n \t\t\r\n \t}\r\n\t}", "public void category1() {\r\n\t\tmySelect1.click();\r\n\t}", "public void clickOnGroupNameDropdownButton() {\r\n\t\tsafeClick(vehicleLinkPath.replace(\"ant-card-head-title\", \"ant-select ant-select-enabled\"), MEDIUMWAIT);\r\n\t}", "private void populateGroupStatus()\n\t{\n\t\t//System.out.println(\"inside populateGroupStatus\");\n\t\t//get data\n\t\tSprinklerGroup newGroup=sprinklerGroup.getSprinklerGroupByName(selectedId);\n\t\t\n\t\tchkFunctional.setVisible(false);//No functional checkbox in this case.\n\t\tbtnSave.setVisible(false);\n\t\t//btnCancel.setVisible(false);\n\t\t\n\t\t//initialize addSetting\n\t\taddSetting=new AddSetting(selectedId, isSprinklerSelected);\n\t\taddSetting.setScheduleListener(new ScheduleListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void scheduleAdded() {\n\t\t\t\t// refresh Schedule panel\n\t\t\t\tSystem.out.println(\"2.\"+selectedId);\n\t\t\t\tschedulePane.removeAll();\n\t\t\t\tschedulePane.add(new Schedule(selectedId, isSprinklerSelected));\n\t\t\t\tschedulePane.validate();\n\t\t\t\tschedulePane.repaint();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tsettingPane.remove(1);\n\t\tsettingPane.add(addSetting, 1);\n\t\taddSetting.setVisible(true);\n\t\t\n\t\t//newWeek.setVisible(true);\n\t\tschedule.setVisible(true);\n\t\t//on/off button and status text management\n\t\tif(newGroup.getStatus().equals(SprinklerStatus.OFF.toString()))\n\t\t{\n\t\t\t//if group is off, show ON option \n\t\t\t\n\t\t\tbtnOff.setVisible(false);\n\t\t\tbtnOn.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\t//show status as text\n\t\t\tlblStatus.setText(\"Status:OFF\");\n\t\t\t//show 'off' icon \n\t\t\t\n\t\t\t\n\t\t}\n\t\telse if(newGroup.getStatus().equals(SprinklerStatus.ON.toString()))\n\t\t{\n\t\t\t//if group is on, show OFF option \n\t\t\tbtnOff.setVisible(true);\n\t\t\tbtnOn.setVisible(false);\n\t\t\t\n\t\t\t//show status as text\n\t\t\tlblStatus.setText(\"Status:ON\");\n\t\t\t//show 'on' icon \n\t\t}\n\t}", "public void groupSelected (String iocId, String groupId);", "private void catComboActionPerformed(java.awt.event.ActionEvent evt) {\n int categoryIndex = catCombo.getSelectedIndex();\n\n switch (categoryIndex) {\n case 1:\n rentTxt.setText(\"450\");\n break;\n case 2:\n rentTxt.setText(\"500\");\n break;\n default:\n rentTxt.setText(\"\");\n }\n }", "public void donutTypeChosen()\n {\n changeSubtotalTextField();\n }", "public void updateDropDownList(String newName) {\r\n selectDatasetList.clear();\r\n selectDatasetList.addItem(\"Select Dataset\");\r\n selectSubDatasetList.clear();\r\n\r\n selectSubDatasetList.addItem(\"Select Sub-Dataset\");\r\n selectSubDatasetList.setVisible(false);\r\n getDatasetsList(newName);//get available dataset names\r\n SelectionManager.Busy_Task(false, true);\r\n }", "public void onGroupSelection(){\n getTimeList().clear();\n CycleTimeBean ctb = new CycleTimeBean();\n ctb.setGroupName(groupName);\n ctb.setCatName(catName);\n getTimeList().add(ctb);\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "private void updateChannelSelection() {\n channelSelect.removeAllItems(); //reset JComboBox\n \n for (Channel c : channelList) {\n channelSelect.addItem(c.toString());\n }\n }", "public void viewPriority() {\n\t\tfinal CharSequence[] items = { \"LOW\", \"MEDIUM\", \"HIGH\" };\n\t\t// Get the previously selected priority level\n\t\tint prevPriority = itemsAdapter.getSelectedItem().getPriority()\n\t\t\t\t.ordinal();\n\t\t// Creating and Building the Dialog\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(\"Select The Priority\");\n\t\tbuilder.setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tpriorityDialog.dismiss();\n\t\t\t}\n\t\t});\n\t\tbuilder.setSingleChoiceItems(items, prevPriority,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int item) {\n\t\t\t\t\t\titemsAdapter.setPriority(items[item].toString());\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tpriorityDialog = builder.create();\n\t\tpriorityDialog.show();\n\t}", "void selectCategory() {\n // If user is the active player, ask for the user's category.\n if (activePlayer.getIsHuman()) {\n setGameState(GameState.CATEGORY_REQUIRED);\n }\n // Or get AI active player to select best category.\n else {\n Card activeCard = activePlayer.getTopMostCard();\n activeCategory = activeCard.getBestCategory();\n }\n\n logger.log(\"Selected category: \" + activeCategory + \"=\" +\n activePlayer.getTopMostCard().getCardProperties()\n .get(activeCategory));\n logger.log(divider);\n\n setGameState(GameState.CATEGORY_SELECTED);\n }", "private void selectIndicatorSubgroups() {\n CardLayout cl = (CardLayout)(m_jCategories.getLayout());\n cl.show(m_jCategories, \"rootcategories\");\n }", "private void BuildingCombo() {\n \n }", "public void getAllSkillByCompetencyId(ValueChangeEvent event) {\r\n\t\t\r\n\t\tInteger competencyId = (Integer) event.getNewValue();\r\n\t\t\r\n\t\tif(skillCodes.size()>0){\r\n\t\t\tskillCodes.clear();\r\n\t\t}\r\n\t\t\r\n\t\t//List<Competency> selectedCompetency = new ArrayList<Competency>();\r\n\t\t\r\n\t\tList<Skill> allSkill = skillService.getAllSkills();\r\n\t\t\r\n\t\tfor(Skill skill:allSkill){\r\n\t\t\tif(skill.getCompetencyId().equals(competencyId)){\r\n\t\t\t\tthis.skillCodes.add(new SelectItem(skill.getSkillId(), skill.getSkillName()));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void llenarComboGrado() {\t\n\t\tString respuesta = negocio.llenarComboGrado(\"\");\n\t\tSystem.out.println(respuesta);\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n try{\n JComboBox jc = (JComboBox)e.getSource();\n \n if(jc.getSelectedItem().equals(\"SELECT\")){\n SCRView.setDepartmentId(0);\n \n }\n else{\n for(Object[] data:SCRModel.getRespectiveDepartment(mainview.getUserId())){\n if(data[1].equals(jc.getSelectedItem())){\n SCRView.setDepartmentId(Integer.parseInt(data[0].toString()));\n// IRView.refreshTableIssueStockReport(IRModel.getSalesList(IRView.getDepartmentId()));\n }\n }\n }\n }\n catch(Exception se){\n JOptionPane.showMessageDialog(SCRView , se+\"from ComboDepartmentListener\"+getClass().getName());\n }\n }", "private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {\n \n if (jComboBox2.getSelectedItem() == \"MCA\")\n {\n jComboBox1.removeAllItems();\n jComboBox3.removeAllItems();\n \n jComboBox1.addItem(\"Computer\");\n jComboBox1.setSelectedItem(\"Computer\");\n jComboBox1.addItem(\"Management\");\n \n jComboBox3.addItem(\"FY\");\n jComboBox3.setSelectedItem(\"FY\");\n jComboBox3.addItem(\"SY\");\n jComboBox3.addItem(\"TY\");\n }\n else if (jComboBox2.getSelectedItem() == \"Engineering\")\n {\n jComboBox1.removeAllItems();\n jComboBox3.removeAllItems();\n \n jComboBox1.addItem(\"Mechanical\");\n jComboBox1.setSelectedItem(\"Mechanical\");\n jComboBox1.addItem(\"Computer\");\n \n jComboBox3.addItem(\"FE\");\n jComboBox3.setSelectedItem(\"FE\");\n jComboBox3.addItem(\"SE\");\n jComboBox3.addItem(\"BE\");\n }\n \n \n }", "public void onClick(DialogInterface dialog, int item) {\n ed_select_bloddgroup.setText(select_dropdownvalue[item]);\n String selectedvalue = select_dropdownvalue[item];\n Log.e(\"Religion\", selectedvalue);\n blood_group_id = getID(selectedvalue);\n AppController.blood_groupId = blood_group_id;\n Log.e(\"blood_group_id\", blood_group_id);\n\n\n dialog.dismiss();\n\n }", "private void fillcbGrupo() {\n\t\tcbGrupoContable.setNullSelectionAllowed(false);\n\t\tcbGrupoContable.setInputPrompt(\"Seleccione Grupo Contable\");\n\t\tfor (GruposContablesModel grupo : grupoimpl.getalls()) {\n\t\t\tcbGrupoContable.addItem(grupo.getGRC_Grupo_Contable());\n\t\t\tcbGrupoContable.setItemCaption(grupo.getGRC_Grupo_Contable(), grupo.getGRC_Nombre_Grupo_Contable());\n\t\t}\n\t}", "public void multiplayerSelected()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyDiscoveryState()\n clientController.searchForGames();\n\n //populate the GameSelectScreen's text box with the lobbies from the\n //state\n gameSelectScreen.clearGames();\n\n //set state to GAMESELECT\n state = CurrentWindow.GAMESELECT;\n\n //hide the intro screen and show the game select screen\n introScreen.setVisible(false);\n gameSelectScreen.setVisible(true);\n }", "public void updateChannelSelector(int activeChannel) {\r\n\t\tString[] channelNames = new String[this.channels.size()];\r\n\t\tfor (int i = 0; i < channelNames.length; i++) {\r\n\t\t\tchannelNames[i] = this.channels.get(i + 1).getName();\r\n\t\t}\r\n\t\tCCombo channelSelect = this.menuToolBar.getChannelSelectCombo();\r\n\t\tchannelSelect.setItems(channelNames); // \"K1: Kanal 1\", \"K2: Kanal 2\", \"K3: Kanal 3\", \"K4: Kanal 4\"\r\n\t\tchannelSelect.select(activeChannel); // kanalCombo.setText(\"K1: Kanal 1\");\r\n\t}", "@Override\n public void onSelection(SelectionEvent<SuggestOracle.Suggestion> event) {\n String group = ((GroupSuggestOracle.GroupSuggestion) event.getSelectedItem()).getGroup();\n userDto.addGroups(group);\n getView().setUser(getView().getUserName().isEmpty() ? userDto.getName() : getView().getUserName(),\n JsArrays.toList(userDto.getGroupsArray()));\n }", "public void selectOptionInDepartment(String department, String optionsLinkText) {\r\n\t\tint departmentCode;\r\n\t\tint optionsListCode;\r\n\t\tswitch (department) {\r\n\t\tcase \"Amazon Prime\":\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tbreak;\r\n\t\tcase \"Amazon Prime Video\":\r\n\t\t\tdepartmentCode = 2;\r\n\t\t\toptionsListCode = 2;\r\n\t\t\tbreak;\r\n\t\tcase \"Prime Music\":\r\n\t\t\tdepartmentCode = 3;\r\n\t\t\toptionsListCode = 3;\r\n\t\t\tbreak;\r\n\t\tcase \"Savings Programs\":\r\n\t\t\tdepartmentCode = 4;\r\n\t\t\toptionsListCode = 4;\r\n\t\t\tbreak;\r\n\t\tcase \"Appstore for Android\":\r\n\t\t\tdepartmentCode = 5;\r\n\t\t\toptionsListCode = 5;\r\n\t\t\tbreak;\r\n\t\tcase \"Echo & Alexa\":\r\n\t\t\tdepartmentCode = 7;\r\n\t\t\toptionsListCode = 6;\r\n\t\t\tbreak;\r\n\t\tcase \"Fire Tablets & Fire TV\":\r\n\t\t\tdepartmentCode = 8;\r\n\t\t\toptionsListCode = 7;\r\n\t\t\tbreak;\r\n\t\tcase \"Kindle\":\r\n\t\t\tdepartmentCode = 9;\r\n\t\t\toptionsListCode = 8;\r\n\t\t\tbreak;\r\n\t\tcase \"Books & Audible\":\r\n\t\t\tdepartmentCode = 11;\r\n\t\t\toptionsListCode = 9;\r\n\t\t\tbreak;\r\n\t\tcase \"Video Games & Twitch Prime\":\r\n\t\t\tdepartmentCode = 12;\r\n\t\t\toptionsListCode = 10;\r\n\t\t\tbreak;\r\n\t\tcase \"Music, Movies & TV Shows\":\r\n\t\t\tdepartmentCode = 13;\r\n\t\t\toptionsListCode = 11;\r\n\t\t\tbreak;\r\n\t\tcase \"Electronics\":\r\n\t\t\tdepartmentCode = 14;\r\n\t\t\toptionsListCode = 12;\r\n\t\t\tbreak;\r\n\t\tcase \"Home, Garden, Pets & Tools\":\r\n\t\t\tdepartmentCode = 15;\r\n\t\t\toptionsListCode = 13;\r\n\t\t\tbreak;\r\n\t\tcase \"Grocery & Whole Foods Market\":\r\n\t\t\tdepartmentCode = 16;\r\n\t\t\toptionsListCode = 14;\r\n\t\t\tbreak;\r\n\t\tcase \"Health & Beauty\":\r\n\t\t\tdepartmentCode = 17;\r\n\t\t\toptionsListCode = 15;\r\n\t\t\tbreak;\r\n\t\tcase \"Toys, Kids, Baby & STEM\":\r\n\t\t\tdepartmentCode = 18;\r\n\t\t\toptionsListCode = 16;\r\n\t\t\tbreak;\r\n\t\tcase \"Clothing, Shoes & Jewelry\":\r\n\t\t\tdepartmentCode = 19;\r\n\t\t\toptionsListCode = 17;\r\n\t\t\tbreak;\r\n\t\tcase \"Handmade\":\r\n\t\t\tdepartmentCode = 20;\r\n\t\t\toptionsListCode = 18;\r\n\t\t\tbreak;\r\n\t\tcase \"Sports & Outdoors\":\r\n\t\t\tdepartmentCode = 21;\r\n\t\t\toptionsListCode = 19;\r\n\t\t\tbreak;\r\n\t\tcase \"Automotive & Industrial\":\r\n\t\t\tdepartmentCode = 22;\r\n\t\t\toptionsListCode = 20;\r\n\t\t\tbreak;\r\n\t\tcase \"Boutiques Francophones\":\r\n\t\t\tdepartmentCode = 23;\r\n\t\t\toptionsListCode = 21;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tLog.info(\" The given Department Name: \" + department\r\n\t\t\t\t\t+ \" is either incorrect or is not defined in the method: selectDepartmentByHoveringMouse\"\r\n\t\t\t\t\t+ \" of NavBarAmazonHomePage.class,Please Check.\");\r\n\t\t}\r\n\r\n\t\tWebElement desiredDepartment = driver.findElement(By.cssSelector(\r\n\t\t\t\t\"#nav-flyout-shopAll > div.nav-template.nav-flyout-content.nav-tpl-itemList > span:nth-child(\"\r\n\t\t\t\t\t\t+ departmentCode + \")\"));\r\n\t\tseHoverOnElement(NavBarAmazonHomePage.get().btnNavbarShopByDepartment, \"btnNavbarShopByDepartment\");\r\n\t\tseWaitForClickableWebElement(driver, desiredDepartment, 20);\r\n\t\tseHoverOnElement(desiredDepartment, department);\r\n\t\tselectOptionByLinkText(optionsListCode, optionsLinkText);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n group_create = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n group_name_txt = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n under = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 14)); // NOI18N\n jLabel1.setText(\"Create Group Ledger\");\n\n group_name_txt.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));\n group_name_txt.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n group_name_txtFocusLost(evt);\n }\n });\n\n jLabel2.setText(\"*Group Name:\");\n\n jLabel3.setText(\"*Under:\");\n\n under.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"\" }));\n under.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));\n under.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusLost(java.awt.event.FocusEvent evt) {\n underFocusLost(evt);\n }\n });\n\n jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/final_project/Icons/Save-icon.png\"))); // NOI18N\n jButton1.setText(\"Save\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/final_project/Icons/Button-Refresh-icon.png\"))); // NOI18N\n jButton2.setText(\"Reset\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel4.setText(\"Enter Valid Group Name!\");\n\n jLabel5.setText(\"Select One Group!\");\n\n javax.swing.GroupLayout group_createLayout = new javax.swing.GroupLayout(group_create);\n group_create.setLayout(group_createLayout);\n group_createLayout.setHorizontalGroup(\n group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(group_createLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(group_createLayout.createSequentialGroup()\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1))\n .addGroup(group_createLayout.createSequentialGroup()\n .addGroup(group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(group_name_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(under, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n group_createLayout.setVerticalGroup(\n group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(group_createLayout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(group_name_txt, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(10, 10, 10)\n .addGroup(group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(under, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(group_createLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addGap(29, 29, 29))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(group_create, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(group_create, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n }", "@FXML\n private String handleComboCategory(ActionEvent event)\n {\n String category;\n\n int selectedIndex = comboCategoryBox.getSelectionModel().getSelectedIndex();\n\n switch (selectedIndex)\n {\n case 0:\n category = \"blues\";\n break;\n case 1:\n category = \"hipHop\";\n break;\n case 2:\n category = \"pop\";\n break;\n case 3:\n category = \"rap\";\n break;\n case 4:\n category = \"rock\";\n break;\n case 5:\n category = \"techno\";\n break;\n case 6:\n txtOtherCategory.setVisible(true);\n category = txtOtherCategory.getText();\n break;\n default:\n throw new UnsupportedOperationException(\"Category not chosen\");\n }\n return category;\n }", "@Override\n public void update() {\n selectedLevel.update();\n }", "@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\t\tgroupJob = (GroupJob)jLGroup.getSelectedValue();\n\t\t\t\tif(groupJob!=null)\n\t\t\t\t{\n\t\t\t\tSystem.out.println(\"6 \"+groupJob.getGroupName()+groupJob.getMemo()+groupJob.getId());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public void widgetSelected(SelectionEvent e) {\n\t\tdoctorcombo.removeAll();\n\t\tint i = subject.getSelectionIndex();\n\t\t if(i == 0){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(0));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(0),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 1){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(1));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(1),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 2){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(2));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(2),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 3){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(3));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(3),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 4){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(4));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(4),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}", "private void PopulateComboBoxData(){\r\n \r\n jLabel1.setText(courseActionObj.getCourseID() + \" \" + courseActionObj.getCourseName());\r\n //Step1: Populate jComboBox1 in Homework related stats tab and jComboBox4 in max score students tab\r\n //Step2: Populate jComboBox2 in Student related stats tab\r\n String sCouseId = courseActionObj.getCourseID();\r\n try {\r\n //To load the list of homeworks in select homework dropdown\r\n query = \"SELECT assignment_id, assignment_name from assignment where course_id ='\" \r\n + sCouseId +\"'\";\r\n \r\n rs = stmt.executeQuery(query);\r\n while (rs.next()) {\r\n Homeworks.add(rs.getString(\"assignment_id\"));\r\n jComboBox1.addItem(rs.getString(\"assignment_name\"));\r\n jComboBox4.addItem(rs.getString(\"assignment_name\"));\r\n }\r\n \r\n \r\n //To load the list of students in select student dropdown.\r\n query = \"select db.user_id, db.user_name from dbuser db, enrollment e \" +\r\n \"where db.user_id = e.student_id and \" +\r\n \"e.course_id = '\" + sCouseId +\"'\";\r\n rs = stmt.executeQuery(query);\r\n while (rs.next()) {\r\n Students.add(rs.getString(\"user_id\"));\r\n jComboBox2.addItem(rs.getString(\"user_name\"));\r\n }\r\n \r\n } catch (Exception oops) {\r\n System.out.println(\"Prof_Report.java:PopulateComboBoxData() \" + oops);\r\n\r\n }\r\n \r\n \r\n }", "public void clickOnUpdateBtnGroupList() {\r\n\t\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Update\"));\r\n\t\t}", "public void addClubSelector() {\n\n if (clubSelectorTour == null) {\n clubSelectorTour = calendarMenu.addItem(\"Set Club\", command -> {\n\n Window window = new Window(\"Select Club for Calendar Events\");\n window.setWidth(\"400px\");\n window.setHeight(\"200px\");\n getUI().addWindow(window);\n window.center();\n window.setModal(true);\n C<Club> cs = new C<>(Club.class);\n ComboBox clubs = new ComboBox(\"Club\", cs.c());\n clubs.setItemCaptionMode(ItemCaptionMode.ITEM);\n clubs.setNullSelectionAllowed(false);\n\n clubs.setFilteringMode(FilteringMode.CONTAINS);\n Button done = new Button(\"Done\");\n done.addClickListener(listener -> {\n window.close();\n Object id = clubs.getValue();\n if (id != null) {\n calendar.filterEventOwnerId(id);\n setClubName(id);\n calendar.markAsDirty();\n }\n });\n\n EVerticalLayout l = new EVerticalLayout(clubs, done);\n\n window.setContent(l);\n });\n }\n }", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "public void updateSelection() {\n\t\t\n\t}", "public void onCountrySelect(ActionEvent actionEvent) {\n divisionCombo.getItems().clear();\n int selectedCountryId;\n if (countryCombo.getValue().equals(\"U.S\")) {\n selectedCountryId = 1;\n }\n else if (countryCombo.getValue().equals(\"UK\")) {\n selectedCountryId = 2;\n }\n else if (countryCombo.getValue().equals(\"Canada\")) {\n selectedCountryId = 3;\n }\n else {\n selectedCountryId = 0;\n }\n\n ObservableList<String> divisionNames = FXCollections.observableArrayList();\n for (FirstLevelDivisions f : DBFirstLevelDivisions.getAllDivisionsFromCountryID(selectedCountryId)) {\n divisionNames.add(f.getName());\n }\n divisionCombo.setItems(divisionNames);\n }", "public void flavorChosen()\n {\n changeSubtotalTextField();\n }", "public void category2() {\r\n\t\tmySelect2.click();\r\n\t}", "private void selectBloodGroup(int id)\n {\n switch (id) {\n\n case R.id.radioGroup1:\n value = \"A+\";\n break;\n case R.id.radioGroup2:\n value = \"B+\";\n break;\n case R.id.radioGroup3:\n value = \"O+\";\n break;\n case R.id.radioGroup4:\n value = \"A-\";\n break;\n\n case R.id.radioGroup5:\n value = \"B-\";\n break;\n\n case R.id.radioGroup6:\n value = \"O-\";\n break;\n\n case R.id.radioGroup7:\n value = \"AB+\";\n break;\n case R.id.radioGroup8:\n value = \"AB-\";\n break;\n }\n }", "public final void updateDropdown() {\n Msg.send(\"Updating Dropdown...\");\n messages.removeAllItems();\n //Populates the dropdown\n for (int j = 0; j < lines.size(); j++) {\n String messageStr = (String) lines.get(j);\n if (j < 10) {\n System.out.println(\"Message: \" + messageStr);\n }\n String[] parts = messageStr.split(\";\");\n String num = parts[0];\n String title = parts[1];\n messages.addItem(num + \". \" + title);\n }\n }", "private void comboselection(ActionEvent e) {\n\t\tint selectedIndex = this.combobox.getSelectedIndex();\n\t\tif (selectedIndex == 0) {\n\t\t\tthis.add(field1, BorderLayout.CENTER);\n\t\t\tthis.field2.setVisible(false);\n\t\t\tthis.field3.setVisible(false);\n\t\t\tthis.field1.setVisible(true);\n\t\t} else if (selectedIndex == 1) {\n\t\t\tthis.add(field2, BorderLayout.CENTER);\n\t\t\tthis.field1.setVisible(false);\n\t\t\tthis.field3.setVisible(false);\n\t\t\tthis.field2.setVisible(true);\n\t\t} else {\n\t\t\tthis.add(field3, BorderLayout.CENTER);\n\t\t\tthis.field1.setVisible(false);\n\t\t\tthis.field2.setVisible(false);\n\t\t\tthis.field3.setVisible(true);\n\t\t}\n\t}", "public void setCombo(Object newValue);", "private void grupoSeleccionado(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_grupoSeleccionado\n if (cbox4Grupo.getSelectedIndex() != 0) {\n grupoSeleccionado = true;\n buscarEvaluacion();\n vaciarTabla();\n } else {\n grupoSeleccionado = false;\n vaciarTabla();\n cbox3Evaluacion.removeAllItems();\n cbox3Evaluacion.addItem(\"Seleccione una opción\");\n } }", "private void getUserBedroomsChoice() {\n int checkedChipId = mBinding.chipGroupBedrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bedroom) {\n mChipBedroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bedrooms) {\n mChipBedroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bedrooms) {\n mChipBedroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bedrooms) {\n mChipBedroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bedrooms) {\n mChipBedroomsInput = 5;\n } else {\n mChipBedroomsInput = 0;\n }\n }", "@Override\r\n public void fillFieldValues() {\n if (panelType == CompetitivePropsPanelType.CREATE_GROUP) {\r\n competitive = new CompetitiveGroup(null, 1);\r\n tfNumCompetitiveNeurons.setText(\"\"\r\n + DEFAULT_NUM_COMPETITIVE_NEURONS);\r\n fillCompetitiveGroupFieldValues();\r\n } else if (panelType == CompetitivePropsPanelType.CREATE_NETWORK) {\r\n competitive = new CompetitiveNetwork(null, 1, 1,\r\n networkPanel.getWhereToAdd());\r\n tfNumCompetitiveNeurons.setText(\"\"\r\n + DEFAULT_NUM_COMPETITIVE_NEURONS);\r\n tfNumInputNeurons.setText(\"\" + DEFAULT_NUM_INPUT_NEURONS);\r\n fillCompetitiveNetworkFieldValues();\r\n } else if (panelType == CompetitivePropsPanelType.EDIT_GROUP) {\r\n fillCompetitiveGroupFieldValues();\r\n }\r\n }", "private void updateSubDsSelectionList(String datasetName) {\r\n for (int x = 0; x < selectDatasetList.getItemCount(); x++) {\r\n String dsName = selectDatasetList.getItemText(x);\r\n if (dsName.contains(\"( SUB DS - \" + datasetName + \" )\")) {\r\n selectSubDatasetList.addItem(dsName);\r\n }\r\n }\r\n if (selectSubDatasetList.getItemCount() > 1) {\r\n selectSubDatasetList.setVisible(true);\r\n }\r\n }", "@OnClick(R.id.converter_organization_cv)\n public void chooseOrganization() {\n mDialog = new DialogList(mContext,\n mOrganizationDialogTitle, null, mListForOrganizationsDialog,\n new RecyclerViewAdapterDialogList.OnItemClickListener() {\n @Override\n public void onClick(int position) {\n mOrganizationId = mListForOrganizationsDialog.get(position).getOrganization().getId();\n mPreferenceManager.setConverterOrganizationId(mOrganizationId);\n mDialog.getDialog().dismiss();\n checkDefaultData();\n setLang();\n }\n });\n ((ImageView) mDialog.getDialog().getWindow().findViewById(R.id.dialog_list_done))\n .setImageResource(R.drawable.ic_tr);\n mDialog.getDialog().getWindow().findViewById(R.id.dialog_list_done)\n .setBackground(getResources().getDrawable(R.drawable.ic_tr));\n }", "private void updateSection() {\n String mySurname = this.surnameCombo.getSelectedItem().toString();\n if (this.forenameCombo.getSelectedItem() != null) {\n String myForename = this.forenameCombo.getSelectedItem().toString();\n //Clear the section drop-down\n this.sectionCombo.removeAllItems();\n //Get the list section for the person and add to the Sections drop-down\n List<String> sections = pers.getSectionsforNames(myForename, mySurname);\n for (String str : sections) {\n this.sectionCombo.addItem(str);\n }\n this.updateText();\n }\n }", "public void valueChanged(ListSelectionEvent e) {\n\t\t\t\n\t\t\tiHungryRestaurant hungryRestaurant = iHungryRestaurant.getInstance();\n\t\t\tgui.getOrderGui().getSubPanel10().setVisible(true);\n\t\t\tListSelectionModel lsm = (ListSelectionModel) e.getSource();\n\t\t\tint minIndex = lsm.getMinSelectionIndex();\t\t\n\t\t\t\n\t\t\tif(minIndex>=0)\n\t\t\t{\n\t\t\t\tList<Order> pendingOrders = new ArrayList<Order>(hungryRestaurant.getPendingOrders());\n\t\t\t\tOrder selectedOrder = pendingOrders.get(minIndex);\t\t\t\n\t\t\t\tgui.getOrderGui().getOrderNoT().setText(selectedOrder.getOrderID());\n\t\t\t\tgui.getOrderGui().getCustNo().setText(selectedOrder.getCustID());\n\t\t\t\tString[] orderDetails = new String[50];\n\t\t\t\tfor (int j = 0; j < selectedOrder.getOrderItems().size(); j++) {\n\t\t\t\t\torderDetails[j] = selectedOrder.getOrderItems().get(j)\n\t\t\t\t\t\t\t.getItem().getItemName()\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ selectedOrder.getOrderItems().get(j).getQuantity();\n\t\t\t\t}\n\t\t\t\tgui.getOrderGui().getList1().setListData(orderDetails);\n\t\t\t}\n\t\t}", "public void stateChanged (ChangeEvent event)\n {\n ((GroupItem)gbox.getSelectedItem()).configChanged();\n }", "private void drawOptions() {\n RadioGroup rgpOptions = (RadioGroup) findViewById(R.id.rgpOptions);\n rgpOptions.removeAllViews();\n int lastId = 0;\n for (int i = 0; i < criteriaList.get(currentCriteria).getOptionList().size(); i++) {\n RadioButton rdbtn = new RadioButton(this);\n lastId = i;\n rdbtn.setId(i);\n rdbtn.setText(criteriaList.get(currentCriteria).getOptionList().get(i).getDescription());\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n }\n RadioButton rdbtn = new RadioButton(this);\n rdbtn.setId(lastId + 1);\n rdbtn.setText(\"No lo se\");\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n rgpOptions.check(rdbtn.getId());\n }", "private void setCategoryData(){\n ArrayList<Category> categories = new ArrayList<>();\n //add categories\n categories.add(new Category(\"Any Category\",0));\n categories.add(new Category(\"General Knowledge\", 9));\n categories.add(new Category(\"Entertainment: Books\", 10));\n categories.add(new Category(\"Entertainment: Film\", 11));\n categories.add(new Category(\"Entertainment: Music\", 12));\n categories.add(new Category(\"Entertainment: Musicals & Theaters\", 13));\n categories.add(new Category(\"Entertainment: Television\", 14));\n categories.add(new Category(\"Entertainment: Video Games\", 15));\n categories.add(new Category(\"Entertainment: Board Games\", 16));\n categories.add(new Category(\"Science & Nature\", 17));\n categories.add(new Category(\"Science: Computers\", 18));\n categories.add(new Category(\"Science: Mathematics\", 19));\n categories.add(new Category(\"Mythology\", 20));\n categories.add(new Category(\"Sport\", 21));\n categories.add(new Category(\"Geography\", 22));\n categories.add(new Category(\"History\", 23));\n categories.add(new Category(\"Politics\", 24));\n categories.add(new Category(\"Art\", 25));\n categories.add(new Category(\"Celebrities\", 26));\n categories.add(new Category(\"Animals\", 27));\n categories.add(new Category(\"Vehicles\", 28));\n categories.add(new Category(\"Entertainment: Comics\", 29));\n categories.add(new Category(\"Science: Gadgets\", 30));\n categories.add(new Category(\"Entertainment: Japanese Anime & Manga\", 31));\n categories.add(new Category(\"Entertainment: Cartoon & Animations\", 32));\n\n //fill data in selectCategory Spinner\n ArrayAdapter<Category> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item, categories);\n selectCategory.setAdapter(adapter);\n\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Raghuvicky\\\\Desktop\\\\Lib's\\\\chromedriver.exe\");\r\n\tWebDriver driver = new ChromeDriver();\r\n\tdriver.get(\"http://www.spicejet.com\");\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_originStation1_CTXT']\")).click();\r\n\tdriver.findElement(By.xpath(\"//a[@value='GOI']\")).click();\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Adult']\")).click();\r\n\tSelect dropdown=new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Adult']\")));\r\n\tdropdown.selectByIndex(3);\r\n\tdropdown.selectByValue(\"6\");\r\n\tdropdown.selectByVisibleText(\"9 Adults\");\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).click();\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).click();\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\t\r\n\tSelect dropdown1 = new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Child']\")));\r\n\tdropdown1.selectByValue(\"2\");\r\n\tdropdown1.selectByVisibleText(\"4 Children\");\r\n\t\r\n\t//selecting dropdown for currency\r\n\tSelect dropdown2=new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_DropDownListCurrency']\")));\r\n\tdropdown2.selectByValue(\"INR\");\r\n\t\r\n\t}", "private void updateEnumDropDowns( final DSLDropDown source ) {\n\n //Copy selections in UI to data-model, used to drive dependent drop-downs\n updateSentence();\n\n final int sourceIndex = dropDownWidgets.indexOf( source );\n for ( DSLDropDown dd : dropDownWidgets ) {\n if ( dropDownWidgets.indexOf( dd ) > sourceIndex ) {\n dd.refreshDropDownData();\n }\n }\n\n //Copy selections in UI to data-model again, as updating the drop-downs\n //can lead to some selected values being cleared when dependent drop-downs\n //are used.\n updateSentence();\n }", "void updateTreeSelection() {\n\n TreePath[] selections = tree.getSelectionPaths();\n currentSelectedPaths.clear();\n if (selections != null) {\n for (TreePath selection : selections) {\n currentSelectedPaths.add(selection);\n }\n }\n if ((selections == null) || (selections.length == 0)) {\n farmStatistics.setEnabled(false);\n linkStatistics.setEnabled(false);\n synchronized (basicPanel.getClusterPanel().getTreeLock()) {\n basicPanel.getClusterPanel().updateClusters(new Vector(), new Hashtable());\n }\n synchronized (basicPanel.getValPanel().getTreeLock()) {\n basicPanel.getValPanel().updateValues(new Vector());\n }\n synchronized (basicPanel.getModPanel().getTreeLock()) {\n basicPanel.getModPanel().updateList(new Vector());\n }\n return;\n }\n if ((selections.length == 1)\n && (((DefaultMutableTreeNode) selections[0].getLastPathComponent()).getUserObject() instanceof rcNode)) {\n farmStatistics.setEnabled(canShowFarmStatistics());\n linkStatistics.setEnabled(canShowLinkStatistics());\n } else {\n farmStatistics.setEnabled(false);\n linkStatistics.setEnabled(false);\n }\n Object[] userSel = new Object[selections.length];\n selectedGroups.clear();\n for (int j = 0; j < selections.length; j++) {\n userSel[j] = ((DefaultMutableTreeNode) selections[j].getLastPathComponent()).getUserObject();\n if (userSel[j] instanceof String) { // group selected\n selectedGroups.add(userSel[j]);\n DefaultMutableTreeNode groupNode = ((DefaultMutableTreeNode) selections[j].getLastPathComponent());\n for (int i = 0; i < treeModel.getChildCount(groupNode); i++) {\n tree.addSelectionPath(selections[j].pathByAddingChild(treeModel.getChild(groupNode, i)));\n }\n }\n }\n\n // update the parameters window to show only common parameters\n updateParamAndModPanels(userSel);\n }", "public void editOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Modify Actors |\");\n System.out.println(\"\\t\\t| [2] Modify Rating |\");\n System.out.println(\"\\t\\t| [3] Modify Actors & Rating |\");\n System.out.println(\"\\t\\t| [4] Back To Menu |\");\n System.out.println(\"\\t\\t===================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }", "@Override\n\t\t\t\t\tpublic void changed(ObservableValue arg0, Object arg1,\n\t\t\t\t\t\t\tObject arg2) {\n\t\t\t\t\t\tif (arg2.toString() == \"管理分类\") {// 查看商品分类\n\t\t\t\t\t\t\tCommodityKindInformationui c = new CommodityKindInformationui();\n\t\t\t\t\t\t\tc.display(Job, name, id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private void setStaticFirstComboView() {\n \t\tgetView().getCombo_viewChoice1().clear();\n \t\tgetView().getCombo_viewChoice1().addItem(\"Professeur\");\n \t\tgetView().getCombo_viewChoice1().addItem(\"Local\");\n \t\tgetView().getCombo_viewChoice1().addItem(\"Classe\");\n \t\n \t}", "private void getUserCoownerChoice() {\n int checkedChipId = mBinding.chipGroupCoowner.getCheckedChipId();\n if (checkedChipId == R.id.chip_yes) {\n mChipCoownerInput = 1;\n } else if (checkedChipId == R.id.chip_no) {\n mChipCoownerInput = 0;\n } else {\n mChipCoownerInput = 10;\n }\n }", "@Override\n public void EventoDeSeleccionCtaEnPUC() {\n this.setCta_PUC(bp.ObtenerCtaSeleccionada());\n this.show();\n this.jRadioButton1.requestFocus();\n bp.dispose();\n }", "@Override\r\n\tpublic void valuesChanged() {\r\n\t\tString name = getView().getProductGroupName();\r\n\t\t\r\n\t\tboolean validName = _productGroupFacade.canCreateChildWithName(_parent,name);\r\n\t\t\r\n\t\t//TODO fix when jay and chris get their crap together\r\n\t\tString amount = getView().getSupplyValue();\r\n\t\tString supplyUnit = getView().getSupplyUnit().toString();\r\n\t\tboolean validUnitSize = UnitSize.isValid(amount, supplyUnit);\r\n\t\t\r\n\t\tif(validName && validUnitSize){\r\n\t\t\tgetView().enableOK(true);\r\n\t\t}else{\r\n\t\t\tgetView().enableOK(false);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void update(){\n\t\tif(JudokaComponent.input.up) selectedItem --;\n\t\tif(JudokaComponent.input.down) selectedItem ++;\n\t\tif(selectedItem > items.length - 1) selectedItem = items.length - 1;\n\t\tif(selectedItem < 0) selectedItem = 0;\n\t\tif(JudokaComponent.input.enter){\n\t\t\tif(selectedItem == 0) JudokaComponent.changeMenu(JudokaComponent.CREATE_JUDOKA);\n\t\t\telse if(selectedItem == 1) JudokaComponent.changeMenu(JudokaComponent.SINGLEPLAYER);\n\t\t\telse if(selectedItem == 2) JudokaComponent.changeMenu(JudokaComponent.MULTIPLAYER);\n\t\t\telse if(selectedItem == 3) JudokaComponent.changeMenu(JudokaComponent.ABOUT);\n\t\t\telse if(selectedItem == 4) JudokaComponent.changeMenu(JudokaComponent.EXIT);\n\t\t}\n\t}", "private void getUserBathroomsChoice() {\n int checkedChipId = mBinding.chipGroupBathrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bathroom) {\n mChipBathroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bathrooms) {\n mChipBathroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bathrooms) {\n mChipBathroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bathrooms) {\n mChipBathroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bathrooms) {\n mChipBathroomsInput = 5;\n } else {\n mChipBathroomsInput = 0;\n }\n }", "public void changeComboOption(int numAnswers) {\n\t\tif(numAnswers == 2)\n\t\t\tanswerChoiceList.setSelectedIndex(0);\n\t\telse if(numAnswers == 3)\n\t\t\tanswerChoiceList.setSelectedIndex(1);\n\t\telse if(numAnswers == 4)\n\t\t\tanswerChoiceList.setSelectedIndex(2);\n\t}", "@FXML\n public void massSelect(ActionEvent event) {\n \tmassSelection = massCombo.getSelectionModel().getSelectedItem().toString();\n \tmassCombo.setValue(massSelection);\n }", "public void fillSpecChoices(List ChoiceMenu) {\n\n ChoiceMenu.add(\"Quadratic Koch Island 1 pg. 13\"); /* pg. 13 */\n ChoiceMenu.add(\"Quadratic Koch Island 2 pg. 14\"); /* pg. 14 */\n ChoiceMenu.add(\"Island & Lake Combo. pg. 15\"); /* pg.15 */\n ChoiceMenu.add(\"Koch Curve A pg. 16\");\n ChoiceMenu.add(\"Koch Curve B pg. 16\");\n ChoiceMenu.add(\"Koch Curve C pg. 16\");\n ChoiceMenu.add(\"Koch Curve D pg. 16\");\n ChoiceMenu.add(\"Koch Curve E pg. 16\");\n ChoiceMenu.add(\"Koch Curve F pg. 16\");\n ChoiceMenu.add(\"Mod of Snowflake pg. 14\");\n ChoiceMenu.add(\"Dragon Curve pg. 17\");\n ChoiceMenu.add(\"Hexagonal Gosper Curve pg. 19\");\n ChoiceMenu.add(\"Sierpinski Arrowhead pg. 19\");\n ChoiceMenu.add(\"Peano Curve pg. 18\");\n ChoiceMenu.add(\"Hilbert Curve pg. 18\");\n ChoiceMenu.add(\"Approx of Sierpinski pg. 18\");\n ChoiceMenu.add(\"Tree A pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 25\");\n ChoiceMenu.add(\"Tree C pg. 25\");\n ChoiceMenu.add(\"Tree D pg. 25\");\n ChoiceMenu.add(\"Tree E pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 43\");\n ChoiceMenu.add(\"Tree C pg. 43\");\n ChoiceMenu.add(\"Spiral Tiling pg. 70\");\n ChoiceMenu.add(\"BSpline Triangle pg. 20\");\n ChoiceMenu.add(\"Snake Kolam pg. 72\");\n ChoiceMenu.add(\"Anklets of Krishna pg. 73\");\n\n /*-----------\n Color examples \n -----------*/\n ChoiceMenu.add(\"Color1, Koch Curve B\");\n ChoiceMenu.add(\"Color2, Koch Curve B\");\n ChoiceMenu.add(\"Color X, Spiral Tiling\");\n ChoiceMenu.add(\"Color Center, Spiral Tiling\");\n ChoiceMenu.add(\"Color Spokes, Spiral Tiling\");\n ChoiceMenu.add(\"Color, Quad Koch Island 1\");\n ChoiceMenu.add(\"Color, Tree E\");\n ChoiceMenu.add(\"Color, Mod of Snowflake\");\n ChoiceMenu.add(\"Color, Anklets of Krishna\");\n ChoiceMenu.add(\"Color, Snake Kolam\");\n\n ChoiceMenu.add(\"Simple Branch\");\n\n\n }", "private void editValidItems(GroupOwnerModel group, String[] grps) {\r\n\t\tgroup.setGroupNameList(new ArrayList<String>());\r\n\t\tfor(String str:grps){\r\n\t\t\t for(SelectItem item: groupOwnerModel.getGroupSelectList()){\r\n\t\t\t\tif(str.trim().equalsIgnoreCase(item.getLabel())){\r\n\t\t\t\t\tgroup.getGroupNameList().add(item.getValue().toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@FXML\n\tprivate void createGroup(ActionEvent event){\n\t\tif(subgroup_menu.getValue().equals(\"--- INGEN ---\")){\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tdb.setGroup(GroupName_field.getText(), findInvited());\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t//-------This kicks in if a user chose a group in the dropdown menu-----\\\\\n\t\t} else {\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tString supergroup_name = (String) subgroup_menu.getValue();\n\t\t\t\tint SubGroupId = db.setGroup(GroupName_field.getText(), findInvited()).getGroup_id();\n\t\t\t\tint SuperGroupId = getSupergroupID(supergroup_name);\n\t\t\t\tdb.setSubGroup(SuperGroupId, SubGroupId);\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static int selectDepartment() {\r\n\t\tSystem.out.println(\"ENTER THE DEPARTMENT\");\r\n\t\tSystem.out.println(\"1.MECH\");\r\n\t\tSystem.out.println(\"2.CIVIL\");\r\n\t\tSystem.out.println(\"3.CSE\");\r\n\t\treturn 0;\r\n\t}", "@Override\n public void onClickGroupEvent(GroupEvent groupEvent) {\n QuickDirtyDataHolder.getInstance().notifySelectGEDialogObservers(groupEvent);\n }", "@RequestMapping(value = {\"/admin2543/detail_component_group\"}, method = RequestMethod.GET)\n public String detail_component_group(Model model, @RequestParam(value = \"cg\", required = false, defaultValue = \"-1\") final String cgId) {\n try {\n Integer componentGroupId = Integer.parseInt(cgId); \n ComponentGroup componentGroup = componentGroupDAO.getComponentGroupById(componentGroupId); \n \n /* Maybe some better solution? */\n if(componentGroupId.equals(componentGroup.getId_component_group())) {\n model.addAttribute(\"componentGroup\", componentGroup);\n return \"admin2543/detail/component_group_detail\";\n } \n } catch(Exception e) {\n e.printStackTrace();\n }\n return \"redirect:view_component_groups\";\n }", "private void abilitySelection() {\n\t\tabilityInput.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tphysicalAbilityPanel.removeAll();\n\n\t\t\t\tmentalAbilityPanel.removeAll();\n\n\t\t\t\tabilitySelectionPanel.add(lowFantasy);\n\t\t\t\tabilitySelectionPanel.add(standardFantasy);\n\t\t\t\tabilitySelectionPanel.add(highFantasy);\n\t\t\t\tabilitySelectionPanel.add(epicFantasy);\n\t\t\t\tabilitySelectionPanel.add(fantasyPointsLabel);\n\t\t\t\tisInputting = true;\n\t\t\t\tisRolling = false;\n\t\t\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 220));\n\n\t\t\t\tfantasySelection();\n\n\t\t\t\tphysicalAbilityPanel.add(strengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(strengthSpinner);\n\t\t\t\tphysicalAbilityPanel.add(strengthModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(dexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(dexteritySpinner);\n\t\t\t\tphysicalAbilityPanel.add(dexterityModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(constitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(constitutionSpinner);\n\t\t\t\tphysicalAbilityPanel.add(constitutionModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(intelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(intelligenceSpinner);\n\t\t\t\tmentalAbilityPanel.add(intelligenceModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(wisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(wisdomSpinner);\n\t\t\t\tmentalAbilityPanel.add(wisdomModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(charismaLabel);\n\t\t\t\tmentalAbilityPanel.add(charismaSpinner);\n\t\t\t\tmentalAbilityPanel.add(charismaModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaModifierLabel);\n\n\t\t\t\treference.add(saveAbility);\n\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t\tabilityRoll.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tabilitySelectionPanel.remove(lowFantasy);\n\t\t\t\tabilitySelectionPanel.remove(standardFantasy);\n\t\t\t\tabilitySelectionPanel.remove(highFantasy);\n\t\t\t\tabilitySelectionPanel.remove(epicFantasy);\n\t\t\t\tabilitySelectionPanel.remove(fantasyPointsLabel);\n\t\t\t\treference.remove(saveAbility);\n\t\t\t\tisInputting = false;\n\t\t\t\tisRolling = true;\n\t\t\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 120));\n\n\t\t\t\tphysicalAbilityPanel.removeAll();\n\t\t\t\tmentalAbilityPanel.removeAll();\n\n\t\t\t\tphysicalAbilityPanel.add(strengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(strengthRoll);\n\t\t\t\tphysicalAbilityPanel.add(strengthModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(dexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(dexterityRoll);\n\t\t\t\tphysicalAbilityPanel.add(dexterityModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(constitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(constitutionRoll);\n\t\t\t\tphysicalAbilityPanel.add(constitutionModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(intelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(intelligenceRoll);\n\t\t\t\tmentalAbilityPanel.add(intelligenceModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(wisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(wisdomRoll);\n\t\t\t\tmentalAbilityPanel.add(wisdomModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(charismaLabel);\n\t\t\t\tmentalAbilityPanel.add(charismaRoll);\n\t\t\t\tmentalAbilityPanel.add(charismaModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaModifierLabel);\n\n\t\t\t\tabilityRoll();\n\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t}", "private void updateUserSelectionList() {\n colorChosenList.setModel(new AbstractListModel<String>() {\n private static final long serialVersionUID = 8471220817189405309L;\n String[] strings = colorSelectedList.stream().toArray(String[]::new);\n\n @Override\n public int getSize() {\n return strings.length;\n }\n\n @Override\n public String getElementAt(int i) {\n return strings[i];\n }\n });\n }", "public void chooseOptionMarkAsCompleteOnBulkActionsDropDown() {\n try {\n getLogger().info(\"Choose option: Mark as complete\");\n optionMarkAsComplete.click();\n NXGReports.addStep(\"Choose option: Mark as complete.\", LogAs.PASSED, null);\n } catch (Exception ex) {\n getLogger().info(ex);\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Choose option: Mark as complete.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n\n }", "public void SetDefautValueCombo(Item item) \n {\n this.defautValueCombo=item;\n ;\n }", "public addDrug() {\n initComponents();\n// DefaultComboBoxModel dtm = (DefaultComboBoxModel) jComboBox2.getModel();\n// DefaultComboBoxModel dtmb = (DefaultComboBoxModel) jComboBox1.getModel();\n // DefaultComboBoxModel dtm2 = (DefaultComboBoxModel) jComboBox1.getModel();\n List<Category> list = CategoryController.list();\n List<Brand> listb = BrandController.list();\n\n for (Category c : list) {\n jComboBox2.addItem(c.getCat_name());\n }\n for (Brand b : listb) {\n jComboBox1.addItem(b.getBrand_name());\n }\n \n List<Rack> listr = RackController.list();\n\n for (Rack r : listr) {\n jComboBox3.addItem(r.getRack_name());\n }\n\n }", "public void onComidaSelected(int comidaId);", "public void valueChanged(ListSelectionEvent e) {\n\t\t\t\n\t\t\tiHungryRestaurant hungryRestaurant = iHungryRestaurant.getInstance();\n\t\t\tgui.getOrderGui().getToBeDeliveredSubPanel().setVisible(true);\n\t\t\tListSelectionModel lsm = (ListSelectionModel) e.getSource();\n\t\t\tint minIndex = lsm.getMinSelectionIndex();\t\t\t\n\t\t\t\n\t\t\tif (minIndex>=0)\n\t\t\t{\n\t\t\t\tList<Order> acceptedOrders = new ArrayList<Order>(hungryRestaurant.getAcceptedOrders());\n\t\t\t\tOrder selectedOrder = acceptedOrders.get(minIndex);\n\t\t\t\tgui.getOrderGui().getToBeDeliveredOrderNo().setText(selectedOrder.getOrderID());\n\t\t\t\tgui.getOrderGui().getToBeDeliveredCustNo().setText(selectedOrder.getCustID());\n\t\t\t\t\n\t\t\t\t//get the customer address \n\t\t\t\tString supinfo = model.getCustContact(restaurant.getAccountInfo(), selectedOrder);\n\t\t\t\tString custAddress = getCustAddress(supinfo);\n\t\t\t\tgui.getOrderGui().getToBeDeliveredCustAddrT().setText(custAddress);\n\t\t\t\t\n\t\t\t\tString[] orderDetails = new String[50];\n\t\t\t\tfor (int j = 0; j < selectedOrder.getOrderItems().size(); j++) {\n\t\t\t\t\torderDetails[j] = selectedOrder.getOrderItems().get(j)\n\t\t\t\t\t\t\t.getItem().getItemName()\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ selectedOrder.getOrderItems().get(j).getQuantity();\n\t\t\t\t}\n\t\t\t\tgui.getOrderGui().getToBeDeliveredList().setListData(orderDetails);\n\t\t\t}\n\t\t}", "private void createGrpDateInfo() {\n\n\t\tgrpDateInfo = new Group(getShell(), SWT.NONE);\n\t\tgrpDateInfo.setBounds(new org.eclipse.swt.graphics.Rectangle(160, 180,\n\t\t\t\t280, 100));\n\n\t\tlblInstructions = new Label(grpDateInfo, SWT.NONE);\n\t\tlblInstructions.setBounds(new org.eclipse.swt.graphics.Rectangle(60,\n\t\t\t\t20, 160, 20));\n\t\tlblInstructions.setText(\"Select a Month and Year:\");\n\t\tlblInstructions.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\n\t\tcmbMonth = new CCombo(grpDateInfo, SWT.BORDER);\n\t\tcmbMonth.setBounds(new org.eclipse.swt.graphics.Rectangle(40, 50, 100,\n\t\t\t\t20));\n\t\tcmbMonth.setEditable(false);\n\t\tcmbMonth.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tString qs[] = { \"Quarter 1\", \"Quarter 2\", \"Quarter 3\", \"Quarter 4\" };\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tthis.cmbMonth.add(qs[i]);\n\t\t}\n\n\t\tint intMonth = 1;\n\t\tcmbMonth.setText(\"Quarter \" + intMonth);\n\t\tcmbMonth.setEditable(false);\n\t\tcmbMonth.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tcmbMonth.setVisibleItemCount(4);\n\n\t\t// cmdYear\n\t\tcmbYear = new CCombo(grpDateInfo, SWT.BORDER);\n\t\tcmbYear.setBounds(new org.eclipse.swt.graphics.Rectangle(160, 50, 80,\n\t\t\t\t20));\n\t\tcmbYear.setEditable(false);\n\t\tcmbYear.setBackground(ResourceUtils.getColor(iDartColor.WHITE));\n\t\tcmbYear.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\n\t\t// get the current date12\n\t\tCalendar rightNow = Calendar.getInstance();\n\t\tint currentYear = rightNow.get(Calendar.YEAR);\n\t\tfor (int i = currentYear - 2; i <= currentYear + 1; i++) {\n\t\t\tthis.cmbYear.add(Integer.toString(i));\n\t\t}\n\t\tcmbYear.setText(String.valueOf(Calendar.getInstance()\n\t\t\t\t.get(Calendar.YEAR)));\n\n\t}", "@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }", "private void comboBoxUpdate(){\n\t\tString docType = (String) combBoxDocumentTypes.getSelectedItem();\n\t\tif(!docType.isEmpty()){\n\t\t\tchangeConditionsSetsFromRadioButton(profilingConditionsInformations.getConditionSetsNames(docType));\n\t\t}else{\n\t\t\tchangeConditionsSetsFromRadioButton(new HashSet<String>());\n\t\t}\n\t\tif(docType.equals(DocBookTypes.DOCBOOK4) || docType.equals(DocBookTypes.DOCBOOK5)){\n\t\t\tremoveDocumentTypeButton.setEnabled(false);\n\t\t}else{\n\t\t\tremoveDocumentTypeButton.setEnabled(true);\n\t\t}\n\n\t}", "public void setSkills(String group) {\n top.removeAll();\n\n // Header\n constrItem.gridy = 0;\n\n constrItem.gridx = 0;\n top.add(new JLabel(\"Skill\"), constrItem);\n constrItem.gridx = 1;\n top.add(new JLabel(\"ML\"), constrItem);\n constrItem.gridx = 2;\n top.add(new JLabel(\"Dice\"), constrItem);\n constrItem.gridx = 3;\n top.add(new JLabel(\"Adj-1\"), constrItem);\n constrItem.gridx = 4;\n top.add(new JLabel(\"Adj-2\"), constrItem);\n constrItem.gridx = 5;\n top.add(new JLabel(\"Adj-3\"), constrItem);\n constrItem.gridx = 6;\n top.add(new JLabel(\" \"), constrItem);\n constrItem.gridx = 7;\n top.add(new JLabel(\"EML/Roll\"), constrItem);\n constrItem.gridx = 8;\n top.add(new JLabel(\"Success\"), constrItem);\n constrItem.gridx = 9;\n top.add(new JLabel(\"Type\"), constrItem);\n constrItem.gridx = 10;\n top.add(new JLabel(\"Result\"), constrItem);\n\n ArrayList skills =\n (ArrayList) main.getState().getSkillList(group);\n if (skills != null)\n main.getState().recalibrateGuiLines(skills);\n\n for (int i = 0; skills != null && i < skills.size(); i++) {\n ((State.Section) skills.get(i)).gui = null;\n ((State.Section) skills.get(i)).addGui(top);\n }\n\n revalidate(group);\n }", "public void setUpDropdowns(){\n\t\t\n\t\tString[] numberList = {\"2\",\"3\",\"4\"};\n\t\tframe.getContentPane().removeAll();\n\t\t\n\t\touterPanel = new JPanel();\t\t\n\t\touterPanel.setLayout(new FlowLayout()); \n\t\tframe.revalidate();\n\t\tframe.repaint();\n\t\t\n\t\t//JComboBox = Dropwdown list\n\t\tfinal JComboBox<String> dropdownList = new JComboBox<>(numberList);\n\t\tdropdownList.setSelectedIndex(0);\n\t\t//frame.getContentPane().add(dropdownList);\n\t\tfinal JLabel amountOfPlayers = new JLabel(\"Give the amount of players: \");\n\t\tamountOfPlayers.setForeground(Color.WHITE);\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS));\n\t\tJLabel instructions = new JLabel();\n\t\tPictureCreateClass instructionsP = new PictureCreateClass(URLs.INSTRUCTIONS,400,400);\n\t\tImage image = instructionsP.getImage();\n\t\tImageIcon icon = new ImageIcon(image);\n\t\tinstructions.setIcon(icon);\n\t\tpanel.add(amountOfPlayers);\n\t\tpanel.add(dropdownList);\n\t\tJPanel uberOuterPanel = new JPanel();\n\t\tuberOuterPanel.setLayout(new FlowLayout());\n\t\tuberOuterPanel.setBackground(Color.BLACK);\n\t\tuberOuterPanel.add(instructions);\n\t\tuberOuterPanel.add(outerPanel);\n\t\touterPanel.add(panel);\n\t\tframe.add(uberOuterPanel);\n\t\tpanel.setBackground(Color.BLACK);\n\t\touterPanel.setBackground(Color.BLACK);\n\t\tJButton returnButton = new JButton(\"Go to Menu\");\n\t\touterPanel.add(Box.createHorizontalStrut(100));\n\t\touterPanel.add(returnButton);\n\t\treturnButton.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tMenu m = new Menu(frame);\n\t\t\t\tm.makeMenu();\n\t\t\t}\n\t\t});\n\t\t\n\t\tframe.revalidate();\n\t\tframe.repaint();\n\t\tdropdownList.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>)e.getSource();\n\t\t\t\tamountPlayers = Integer.parseInt((String)cb.getSelectedItem());\n\t\t\t\tpanel.remove(dropdownList);\n\t\t\t\tamountOfPlayers.setText(\"Type the player names\");\n\t\t\t\tsetUpPlayers(amountOfPlayers);\n\t\t\t}\t\n\t\t});\n\t}", "public void getPerformed(String action, String value) {\n // System.out.println(\"getPerformed \" + action + \" : \" + value);\n // nur falls es wirklich meins ist (bei group ist die action fuer alle\n // CheckBoxes in der Group gleich !!!)\n // System.out.println(\"getPerformed \" + action + \":\" + value);\n \n if ( value.startsWith(getUnifiedIdString()+SConstants.UID_DIVIDER) ) {\n \n if (!getShowAsFormComponent()) {\n setSelected(!isSelected());\n SForm.addArmedComponent(this);\n return;\n }\n \n if (value.endsWith(\"1\")) {\n hidden = false;\n setSelected(true);\n SForm.addArmedComponent(this);\n }\n else {\n if (hidden) {\n setSelected(false);\n SForm.addArmedComponent(this);\n }\n hidden = true;\n }\n }\n }", "public void valueChanged(ListSelectionEvent e) {\n\t\t\t\n\t\t\tiHungryRestaurant hungryRestaurant = iHungryRestaurant.getInstance();\n\t\t\tgui.getOrderGui().getDeclinedOrderSubPanel().setVisible(true);\n\t\t\tListSelectionModel lsm = (ListSelectionModel) e.getSource();\n\t\t\tint minIndex = lsm.getMinSelectionIndex();\n\t\t\t\n\t\t\tif(minIndex>=1)\n\t\t\t\tloop = true;\n\t\t\t\n\t\t\tif (minIndex>=0)\n\t\t\t{\t\n\t\t\t\tif(loop)\n\t\t\t\t{\n\t\t\t\t\tList<Order> declinedOrders = new ArrayList<Order>(hungryRestaurant.getDeclinedOrders());\n\t\t\t\t\tOrder selectedOrder = declinedOrders.get(minIndex);\n\t\t\t\t\tgui.getOrderGui().getDeclinedOrderOrderNo().setText(selectedOrder.getOrderID());\n\t\t\t\t\tgui.getOrderGui().getDeclinedOrderCustNo().setText(selectedOrder.getCustID());\n\t\t\t\t\tString[] orderDetails = new String[50];\n\t\t\t\t\t\n\t\t\t\t\tfor (int j = 0; j < selectedOrder.getOrderItems().size(); j++) {\n\t\t\t\t\t\torderDetails[j] = selectedOrder.getOrderItems().get(j)\n\t\t\t\t\t\t\t\t.getItem().getItemName()\n\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t+ selectedOrder.getOrderItems().get(j).getQuantity();\n\t\t\t\t\t}\n\t\t\t\t\tgui.getOrderGui().getDeclinedOrderList().setListData(orderDetails);\n\t\t\t\t}\n\t\t\t\tif(minIndex==0)\n\t\t\t\t\tloop = false;\n\t\t\t}\n\t\t}", "public void setCompetitive(boolean value) {\n this.competitive = value;\n }", "void updateSelected(Coord c) {\n this.selected = c;\n }", "private void initComponents() {\r\n\r\n jLabel1 = new javax.swing.JLabel();\r\n manageCompoundJButton = new javax.swing.JButton();\r\n enterpriseLabel = new javax.swing.JLabel();\r\n valueLabel = new javax.swing.JLabel();\r\n drugComboBox = new javax.swing.JComboBox();\r\n\r\n setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\r\n\r\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\r\n jLabel1.setText(\"My Work Area -Supplier Role\");\r\n add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 40, -1, -1));\r\n\r\n manageCompoundJButton.setText(\"Manage Compound\");\r\n manageCompoundJButton.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n manageCompoundJButtonActionPerformed(evt);\r\n }\r\n });\r\n add(manageCompoundJButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 290, -1, -1));\r\n\r\n enterpriseLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\r\n enterpriseLabel.setText(\"EnterPrise :\");\r\n add(enterpriseLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, 120, 30));\r\n\r\n valueLabel.setText(\"<value>\");\r\n add(valueLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 100, 130, -1));\r\n\r\n drugComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\r\n add(drugComboBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 210, 210, -1));\r\n }", "public void itemStateChanged (ItemEvent event)\n {\n ((GroupItem)gbox.getSelectedItem()).activate();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n try{\n if(e.getActionCommand().equalsIgnoreCase(\"comboDepartmentName\")){\n Object[][] departmentdata= issueReturnModel.getRespectiveDepartment(mainview.getUserId());\n JComboBox dep = (JComboBox)e.getSource();\n if(dep.getSelectedItem().equals(\"SELECT\")){\n issueReturnView.setDepartmentId(0);\n issueReturnView.refreshJTable(new DefaultTableModel());\n \n }\n else{\n for(Object[] dat:departmentdata){\n if(dat[1].equals(dep.getSelectedItem())){\n issueReturnView.setDepartmentId(Integer.parseInt(dat[0].toString()));\n //loading the repective item according to department \n issueReturnView.refreshJTable(issueReturnModel.getResturantItemList(issueReturnView.getDepartmentId()));\n break;\n \n }\n }\n }\n }\n }\n catch(Exception se){\n JOptionPane.showMessageDialog(issueReturnView, se+\"from ComboListener\"+getClass().getName());\n }\n }", "void selectActivityOptions(int activity_number, Model model);" ]
[ "0.6115378", "0.609576", "0.6016306", "0.5895905", "0.5774539", "0.57062674", "0.57049125", "0.56849223", "0.56150466", "0.5602516", "0.5596355", "0.5586204", "0.55837464", "0.5560795", "0.5551903", "0.55397403", "0.5519287", "0.5514503", "0.54939055", "0.54877424", "0.54633343", "0.54588354", "0.54225963", "0.5408593", "0.5407926", "0.53952837", "0.5375974", "0.53272367", "0.531543", "0.5302688", "0.52848417", "0.52801174", "0.52749234", "0.5274865", "0.5273567", "0.52706593", "0.5242487", "0.5237088", "0.52243924", "0.5200512", "0.5192504", "0.5185868", "0.5169461", "0.51663303", "0.5159885", "0.51485264", "0.5133189", "0.51317614", "0.5125788", "0.51107275", "0.5110186", "0.5108129", "0.51010156", "0.50992906", "0.50986844", "0.5082902", "0.5063086", "0.5061574", "0.50597465", "0.50581574", "0.5043652", "0.5036885", "0.5027738", "0.5012667", "0.50092834", "0.5008924", "0.50067437", "0.5002648", "0.50007796", "0.49998713", "0.49960238", "0.49919063", "0.49904454", "0.49776033", "0.4972201", "0.4970486", "0.49676168", "0.4966799", "0.49660397", "0.49595448", "0.49509144", "0.49506897", "0.49481127", "0.49470344", "0.49468857", "0.49461576", "0.49455482", "0.4944457", "0.4936406", "0.4928143", "0.4926344", "0.49236035", "0.49214005", "0.4917845", "0.4915156", "0.49106416", "0.49083513", "0.49071455", "0.49007887", "0.48987192" ]
0.6394405
0
method that updates the SKill drop down in the screen based on competency Selected
public void getAllSkillByCompetencyId(ValueChangeEvent event) { Integer competencyId = (Integer) event.getNewValue(); if(skillCodes.size()>0){ skillCodes.clear(); } //List<Competency> selectedCompetency = new ArrayList<Competency>(); List<Skill> allSkill = skillService.getAllSkills(); for(Skill skill:allSkill){ if(skill.getCompetencyId().equals(competencyId)){ this.skillCodes.add(new SelectItem(skill.getSkillId(), skill.getSkillName())); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void abilitySelection() {\n\t\tabilityInput.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tphysicalAbilityPanel.removeAll();\n\n\t\t\t\tmentalAbilityPanel.removeAll();\n\n\t\t\t\tabilitySelectionPanel.add(lowFantasy);\n\t\t\t\tabilitySelectionPanel.add(standardFantasy);\n\t\t\t\tabilitySelectionPanel.add(highFantasy);\n\t\t\t\tabilitySelectionPanel.add(epicFantasy);\n\t\t\t\tabilitySelectionPanel.add(fantasyPointsLabel);\n\t\t\t\tisInputting = true;\n\t\t\t\tisRolling = false;\n\t\t\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 220));\n\n\t\t\t\tfantasySelection();\n\n\t\t\t\tphysicalAbilityPanel.add(strengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(strengthSpinner);\n\t\t\t\tphysicalAbilityPanel.add(strengthModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(dexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(dexteritySpinner);\n\t\t\t\tphysicalAbilityPanel.add(dexterityModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(constitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(constitutionSpinner);\n\t\t\t\tphysicalAbilityPanel.add(constitutionModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(intelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(intelligenceSpinner);\n\t\t\t\tmentalAbilityPanel.add(intelligenceModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(wisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(wisdomSpinner);\n\t\t\t\tmentalAbilityPanel.add(wisdomModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(charismaLabel);\n\t\t\t\tmentalAbilityPanel.add(charismaSpinner);\n\t\t\t\tmentalAbilityPanel.add(charismaModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaModifierLabel);\n\n\t\t\t\treference.add(saveAbility);\n\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t\tabilityRoll.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tabilitySelectionPanel.remove(lowFantasy);\n\t\t\t\tabilitySelectionPanel.remove(standardFantasy);\n\t\t\t\tabilitySelectionPanel.remove(highFantasy);\n\t\t\t\tabilitySelectionPanel.remove(epicFantasy);\n\t\t\t\tabilitySelectionPanel.remove(fantasyPointsLabel);\n\t\t\t\treference.remove(saveAbility);\n\t\t\t\tisInputting = false;\n\t\t\t\tisRolling = true;\n\t\t\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 120));\n\n\t\t\t\tphysicalAbilityPanel.removeAll();\n\t\t\t\tmentalAbilityPanel.removeAll();\n\n\t\t\t\tphysicalAbilityPanel.add(strengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(strengthRoll);\n\t\t\t\tphysicalAbilityPanel.add(strengthModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryStrengthModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(dexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(dexterityRoll);\n\t\t\t\tphysicalAbilityPanel.add(dexterityModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryDexterityModifierLabel);\n\n\t\t\t\tphysicalAbilityPanel.add(constitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(constitutionRoll);\n\t\t\t\tphysicalAbilityPanel.add(constitutionModifierLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionLabel);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionInput);\n\t\t\t\tphysicalAbilityPanel.add(temporaryConstitutionModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(intelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(intelligenceRoll);\n\t\t\t\tmentalAbilityPanel.add(intelligenceModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryIntelligenceModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(wisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(wisdomRoll);\n\t\t\t\tmentalAbilityPanel.add(wisdomModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryWisdomModifierLabel);\n\n\t\t\t\tmentalAbilityPanel.add(charismaLabel);\n\t\t\t\tmentalAbilityPanel.add(charismaRoll);\n\t\t\t\tmentalAbilityPanel.add(charismaModifierLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaLabel);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaInput);\n\t\t\t\tmentalAbilityPanel.add(temporaryCharismaModifierLabel);\n\n\t\t\t\tabilityRoll();\n\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t}", "public void flavorChosen()\n {\n changeSubtotalTextField();\n }", "public void update(){\n\t\tif(JudokaComponent.input.up) selectedItem --;\n\t\tif(JudokaComponent.input.down) selectedItem ++;\n\t\tif(selectedItem > items.length - 1) selectedItem = items.length - 1;\n\t\tif(selectedItem < 0) selectedItem = 0;\n\t\tif(JudokaComponent.input.enter){\n\t\t\tif(selectedItem == 0) JudokaComponent.changeMenu(JudokaComponent.CREATE_JUDOKA);\n\t\t\telse if(selectedItem == 1) JudokaComponent.changeMenu(JudokaComponent.SINGLEPLAYER);\n\t\t\telse if(selectedItem == 2) JudokaComponent.changeMenu(JudokaComponent.MULTIPLAYER);\n\t\t\telse if(selectedItem == 3) JudokaComponent.changeMenu(JudokaComponent.ABOUT);\n\t\t\telse if(selectedItem == 4) JudokaComponent.changeMenu(JudokaComponent.EXIT);\n\t\t}\n\t}", "public void dropDown(){\n\t\tPoint test_location = new Point(pieceOrigin);\n\t\ttest_location.y += 1;\n\t\tif(!collides(test_location, currentPiece))\n\t\t\tpieceOrigin.y += 1;\n\t\telse\n\t\t\tgossipGirl();\n\t\trepaint();\n\t}", "public void pickSandwhich() {\n includedIngredients.clear();\n if(selectSandwhich.getValue().equals(\"Chicken\")){\n includedIngredients.appendText(\"Fried Chicken\\nSpicy Sauce\\nPickles\");\n sandwhich = new Chicken();\n\n }\n\n if(selectSandwhich.getValue().equals(\"Fish\")){\n includedIngredients.appendText(\"Grilled Snapper\\nCilantro\\nLime\");\n sandwhich = new Fish();\n }\n\n if(selectSandwhich.getValue().equals(\"Beef\")){\n includedIngredients.appendText(\"Roast Beef\\nProvolone Cheese\\nMustard\");\n sandwhich = new Beef();\n }\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n }", "public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }", "public static void update() { // Chk for Joystick configuration\n if (jsConfig != chsr.getSelected()) {\n jsConfig = chsr.getSelected();\n caseDefault();\n configJS();\n SmartDashboard.putNumber(\"JS/JS_Config\", jsConfig);\n SmartDashboard.putString(\"JS/Choosen\", chsrDesc[chsr.getSelected()]); //Put selected on sdb\n }\n }", "private void BuildingCombo() {\n \n }", "private void setupChangeSpeed() {\n\t\tFestivalSpeed[] speeds={FestivalSpeed.slow, FestivalSpeed.normal, FestivalSpeed.fast};\n\t\tfinal JComboBox speed_chooser = new JComboBox(speeds);\n\t\tspeed_chooser.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n\t\tspeed_chooser.setForeground(Color.BLACK);\n\t\tspeed_chooser.setBackground(Color.WHITE);\n\n\t\t//set shown item to be the current speed\n\t\tspeed_chooser.setSelectedItem(parent_frame.getFestival().getFestivalSpeed());\n\t\tspeed_chooser.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\tif((FestivalSpeed)speed_chooser.getSelectedItem()!=null){\n\t\t\t\t\tparent_frame.getFestival().setFestivalSpeed((FestivalSpeed)speed_chooser.getSelectedItem());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tspeed_chooser.setBounds(919, 658, 154, 40);\n\t\tadd(speed_chooser);\n\t}", "private void drinkMenuSelection(Money userMoney) {\n boolean repeat = true;\n List<String[]> priceList;\n\n // Loop the drink menu continuously\n while (repeat) {\n\n // The price list is obtained with <Sold Out> indicators where necessary\n priceList = logic.returnPriceArrayWithStatus();\n view.cls();\n\n // We use a generated menu to allow for dynamic changes\n // of inventory and merchandising\n view.generateMenu(priceList, logic.getRealismVersion());\n\n int choice = view.getUserDrinkSelection(userMoney, priceList.size());\n\n switch (choice) {\n case 0:\n // User wants to get chagne and leave\n return;\n case 1:\n // User wants to add more money \n view.userAddMoney(userMoney);\n break;\n case 2:\n view.showJammedItems(logic.getStuckItems());\n break;\n case 3:\n try {\n view.shakeMachineResults(logic.shakeTheMachine());\n }catch (DeathException e){\n view.deathMessage(e.getMessage());\n userMoney.setTotalmoney(BigDecimal.ZERO);\n }\n view.waitOnUser();\n break;\n default:\n String name = priceList.get(choice - 4)[0];\n try {\n view.showTheProduct(logic.vendProduct(userMoney, name));\n } catch (NoItemInventoryException e) {\n view.soldOutBanner();\n } catch (InsufficientFundsException e) {\n view.insufficientFundsBanner();\n } catch (MachineJameException e) {\n view.machineJamMessage();\n }\n\n view.waitOnUser();\n break;\n }\n }\n\n }", "@FXML\n public void smokeSelect(ActionEvent event) {\n \tsmokeSelection = smokeCombo.getSelectionModel().getSelectedItem().toString();\n \tsmokeCombo.setValue(smokeSelection);\n }", "public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }", "public void donutTypeChosen()\n {\n changeSubtotalTextField();\n }", "public void multiplayerSelected()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyDiscoveryState()\n clientController.searchForGames();\n\n //populate the GameSelectScreen's text box with the lobbies from the\n //state\n gameSelectScreen.clearGames();\n\n //set state to GAMESELECT\n state = CurrentWindow.GAMESELECT;\n\n //hide the intro screen and show the game select screen\n introScreen.setVisible(false);\n gameSelectScreen.setVisible(true);\n }", "public void fillSpecChoices(List ChoiceMenu) {\n\n ChoiceMenu.add(\"Quadratic Koch Island 1 pg. 13\"); /* pg. 13 */\n ChoiceMenu.add(\"Quadratic Koch Island 2 pg. 14\"); /* pg. 14 */\n ChoiceMenu.add(\"Island & Lake Combo. pg. 15\"); /* pg.15 */\n ChoiceMenu.add(\"Koch Curve A pg. 16\");\n ChoiceMenu.add(\"Koch Curve B pg. 16\");\n ChoiceMenu.add(\"Koch Curve C pg. 16\");\n ChoiceMenu.add(\"Koch Curve D pg. 16\");\n ChoiceMenu.add(\"Koch Curve E pg. 16\");\n ChoiceMenu.add(\"Koch Curve F pg. 16\");\n ChoiceMenu.add(\"Mod of Snowflake pg. 14\");\n ChoiceMenu.add(\"Dragon Curve pg. 17\");\n ChoiceMenu.add(\"Hexagonal Gosper Curve pg. 19\");\n ChoiceMenu.add(\"Sierpinski Arrowhead pg. 19\");\n ChoiceMenu.add(\"Peano Curve pg. 18\");\n ChoiceMenu.add(\"Hilbert Curve pg. 18\");\n ChoiceMenu.add(\"Approx of Sierpinski pg. 18\");\n ChoiceMenu.add(\"Tree A pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 25\");\n ChoiceMenu.add(\"Tree C pg. 25\");\n ChoiceMenu.add(\"Tree D pg. 25\");\n ChoiceMenu.add(\"Tree E pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 43\");\n ChoiceMenu.add(\"Tree C pg. 43\");\n ChoiceMenu.add(\"Spiral Tiling pg. 70\");\n ChoiceMenu.add(\"BSpline Triangle pg. 20\");\n ChoiceMenu.add(\"Snake Kolam pg. 72\");\n ChoiceMenu.add(\"Anklets of Krishna pg. 73\");\n\n /*-----------\n Color examples \n -----------*/\n ChoiceMenu.add(\"Color1, Koch Curve B\");\n ChoiceMenu.add(\"Color2, Koch Curve B\");\n ChoiceMenu.add(\"Color X, Spiral Tiling\");\n ChoiceMenu.add(\"Color Center, Spiral Tiling\");\n ChoiceMenu.add(\"Color Spokes, Spiral Tiling\");\n ChoiceMenu.add(\"Color, Quad Koch Island 1\");\n ChoiceMenu.add(\"Color, Tree E\");\n ChoiceMenu.add(\"Color, Mod of Snowflake\");\n ChoiceMenu.add(\"Color, Anklets of Krishna\");\n ChoiceMenu.add(\"Color, Snake Kolam\");\n\n ChoiceMenu.add(\"Simple Branch\");\n\n\n }", "public void selectDeal() {\n\t}", "private void use() {\n switch (choices.get(selection)) {\n case INFO : { \n AbstractInMenu newMenu = new ItemInfo(sourceMenu, item);\n this.sourceMenu.setMenu(newMenu);\n newMenu.setVisible(true);\n } break;\n case USE : {\n entity.use(item); \n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case EQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case ACTIVE : {\n entity.setActiveItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNEQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNACTIVE : {\n entity.setActiveItem(null);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case DROP : {\n entity.drop(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break; \n case PLACE : {\n entity.placeItem(item);\n entity.removeItem(item); \n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n case CLOSE : { \n sourceMenu.activate();\n } break;\n case DESTROY : {\n entity.removeItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n }\n }", "private void select() {\n\t\tif (selected.equals(mealSelect) && !eating) {\n\t\t\tmakeMeal();\n\t\t} else if (selected.equals(snackSelect) && !eating) {\n\t\t\tmakeSnack();\n\t\t} else if (selected.equals(medicineSelect) && !eating){\n\t\t\tmakeMedicine();\n\t\t} else if (selected.equals(playSelect) && !eating){\n\t\t\tmakePlay();\n\t\t}\n\t\t\n\t}", "public void updatAttackArmies(){\n\t\t\n\t\tfinal String s = attackToComboBox.getSelectedItem().toString();\n\t\tCountry country = MainPlayScreen.this.game.getBoard().getCountryByName(s);\n\t\t\t\n\t\tfinal int armies = MainPlayScreen.this.game.countryArmies.get(country);\n\t\tSystem.out.println(s + \" Defender Armies: \" + armies);\n\t\t\n\t\tif( armies == 1){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t}// end of if statement\n\t\t\n\t\telse if( armies == 2){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\t\n\t\t} // end of else if statement\n\t\t\n\t\telse{\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\tnumberOfArmies[5].addItem(3);\n\t\t\t\n\t\t}// end of else statement\n\t\tnumberOfArmies[5].repaint();\n\t}", "public void updateSelection() {\n\t\t\n\t}", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public String button1_action() {\n getSessionBean1().setSelected_algos(listbox1.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_tiers(listbox2.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_runs(listbox3.getValueAsStringArray(this.getContext()));\n getSessionBean1().setSelected_storageelems(listbox4.getValueAsStringArray(this.getContext()));\n //getSessionBean1().setSelected_branches(listbox5.getValueAsStringArray(this.getContext()));\n \n //String selected_primary = (String)dropDown1.getSelected().toString();\n //log(\"Selected Primary is\"+selected_primary);\n \n if ( dropDown1.getSelected() != null ||\n getSessionBean1().getSelected_algos().length !=0 || \n getSessionBean1().getSelected_tiers().length !=0 ||\n getSessionBean1().getSelected_runs().length != 0 ||\n getSessionBean1().getSelected_storageelems().length !=0 \n //getSessionBean1().getSelected_branches().length !=0\n ) {\n getSessionBean1().setItems_selected(\"1\");\n }\n return null;\n }", "public Skills chooseSkill();", "private void fantasySelection() {\n\t\tlowFantasy.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfantasyPoints = 10;\n\t\t\t\ttotalPoints = 0;\n\t\t\t\tfantasyPointsLabel.setText(\"<html>\" + String.valueOf(fantasyPoints) + \"points<br>remaining</html>\");\n\t\t\t\tstrengthSpinner.setValue(10);\n\t\t\t\tdexteritySpinner.setValue(10);\n\t\t\t\tconstitutionSpinner.setValue(10);\n\t\t\t\tintelligenceSpinner.setValue(10);\n\t\t\t\twisdomSpinner.setValue(10);\n\t\t\t\tcharismaSpinner.setValue(10);\n\t\t\t}\n\t\t});\n\n\t\tstandardFantasy.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfantasyPoints = 15;\n\t\t\t\ttotalPoints = 0;\n\t\t\t\tfantasyPointsLabel.setText(\"<html>\" + String.valueOf(fantasyPoints) + \"points<br>remaining</html>\");\n\t\t\t\tstrengthSpinner.setValue(10);\n\t\t\t\tdexteritySpinner.setValue(10);\n\t\t\t\tconstitutionSpinner.setValue(10);\n\t\t\t\tintelligenceSpinner.setValue(10);\n\t\t\t\twisdomSpinner.setValue(10);\n\t\t\t\tcharismaSpinner.setValue(10);\n\t\t\t}\n\t\t});\n\n\t\thighFantasy.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfantasyPoints = 20;\n\t\t\t\ttotalPoints = 0;\n\t\t\t\tfantasyPointsLabel.setText(\"<html>\" + String.valueOf(fantasyPoints) + \"points<br>remaining</html>\");\n\t\t\t\tstrengthSpinner.setValue(10);\n\t\t\t\tdexteritySpinner.setValue(10);\n\t\t\t\tconstitutionSpinner.setValue(10);\n\t\t\t\tintelligenceSpinner.setValue(10);\n\t\t\t\twisdomSpinner.setValue(10);\n\t\t\t\tcharismaSpinner.setValue(10);\n\t\t\t}\n\t\t});\n\n\t\tepicFantasy.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfantasyPoints = 25;\n\t\t\t\ttotalPoints = 0;\n\t\t\t\tfantasyPointsLabel.setText(\"<html>\" + String.valueOf(fantasyPoints) + \"points<br>remaining</html>\");\n\t\t\t\tstrengthSpinner.setValue(10);\n\t\t\t\tdexteritySpinner.setValue(10);\n\t\t\t\tconstitutionSpinner.setValue(10);\n\t\t\t\tintelligenceSpinner.setValue(10);\n\t\t\t\twisdomSpinner.setValue(10);\n\t\t\t\tcharismaSpinner.setValue(10);\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n public void select(Menu context) {\n updateControllable(context);\n currentStructure.assignWorkersToPowerHarvest(context.getFocus(), PopUpMenuWindow.WorkerMenu());\n }", "public void chooseAttackStarter(){\n gameState = GameState.ATTACKERSELECTION;\n currentTerritoriesOfInterest = Player.getTerritoryStringArray(currentPlayer.getAttackStarters());\n notifyObservers();\n }", "private void select()\n\t{\n\t\tSoundPlayer.playClip(\"select.wav\");\n\t if(currentChoice == 0)\n\t\t{\n\t\t\tsuper.isFadingOut = true;\n\t\t\tSoundPlayer.animVolume(-40.0F);\n\t\t}\n\t\tif(currentChoice == 1)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CONTROLSTATE);\n\t\t}\n\t\tif(currentChoice == 2)\n\t\t{\n\t\t\tbottomFadeOut = true;\n\t\t\t//gsm.setState(GameStateManager.CREDITSTATE);\n\t\t}\n\t\tif(currentChoice == 3)\n\t\t{\n\t\t\tnew Timer().schedule(new TimerTask()\n\t\t\t{\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t}\n\t\t\t}, 500);\n\t\t}\n\t}", "@Override\n public void update() {\n selectedLevel.update();\n }", "@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\tint position = gameSpinner.getSelectedItemPosition();\n\t\t\t\t\t\tif (macGames[+position] != \"-- Choose sport --\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\"You have selected \" + macGames[+position],\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();*/\n\t\t\t\t\t\t\tchosenGame = macGames[+position];\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@FXML\n public void massSelect(ActionEvent event) {\n \tmassSelection = massCombo.getSelectionModel().getSelectedItem().toString();\n \tmassCombo.setValue(massSelection);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Raghuvicky\\\\Desktop\\\\Lib's\\\\chromedriver.exe\");\r\n\tWebDriver driver = new ChromeDriver();\r\n\tdriver.get(\"http://www.spicejet.com\");\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_originStation1_CTXT']\")).click();\r\n\tdriver.findElement(By.xpath(\"//a[@value='GOI']\")).click();\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Adult']\")).click();\r\n\tSelect dropdown=new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Adult']\")));\r\n\tdropdown.selectByIndex(3);\r\n\tdropdown.selectByValue(\"6\");\r\n\tdropdown.selectByVisibleText(\"9 Adults\");\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).click();\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\tdriver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).click();\r\n\tSystem.out.println(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_chk_IndArm']\")).isSelected());\r\n\t\r\n\tSelect dropdown1 = new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_ddl_Child']\")));\r\n\tdropdown1.selectByValue(\"2\");\r\n\tdropdown1.selectByVisibleText(\"4 Children\");\r\n\t\r\n\t//selecting dropdown for currency\r\n\tSelect dropdown2=new Select(driver.findElement(By.xpath(\".//*[@id='ctl00_mainContent_DropDownListCurrency']\")));\r\n\tdropdown2.selectByValue(\"INR\");\r\n\t\r\n\t}", "public void viewPriority() {\n\t\tfinal CharSequence[] items = { \"LOW\", \"MEDIUM\", \"HIGH\" };\n\t\t// Get the previously selected priority level\n\t\tint prevPriority = itemsAdapter.getSelectedItem().getPriority()\n\t\t\t\t.ordinal();\n\t\t// Creating and Building the Dialog\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(\"Select The Priority\");\n\t\tbuilder.setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tpriorityDialog.dismiss();\n\t\t\t}\n\t\t});\n\t\tbuilder.setSingleChoiceItems(items, prevPriority,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int item) {\n\t\t\t\t\t\titemsAdapter.setPriority(items[item].toString());\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tpriorityDialog = builder.create();\n\t\tpriorityDialog.show();\n\t}", "public void makeSwitcherBall(TPaintDropListItem paintSelectedItem);", "public void selectSlot() {\n\t\t\r\n\t}", "void colorOperation() {\r\n String selStr; // variable to store the selected string\r\n\r\n repaint(); // repaint\r\n selStr = (String)cb2.getSelectedItem();\r\n // store the string of the selected item\r\n if (selStr == strColor[0]) { // if \"Black\" selected\r\n System.out.println(\"Black of menu Color is selected.\");\r\n System.out.println(\"calling method black().\");\r\n ge.black(gra); // call method black() of class PaintTool\r\n System.out.println(\"method black() executed.\");\r\n } else if (selStr == strColor[1]) { // if \"Red\" selected\r\n System.out.println(\"Red of menu Color is selected.\");\r\n System.out.println(\"calling method red().\");\r\n ge.red(gra); // call method red() of class PaintToll\r\n System.out.println(\"method red() executed.\");\r\n } else if (selStr == strColor[2]) { // if \"Green\" selected\r\n System.out.println(\"Green of menu Color is selected.\");\r\n System.out.println(\"calling method green().\");\r\n ge.green(gra); // call method green() of class PaintTool\r\n System.out.println(\"method green() executed.\");\r\n } else if (selStr == strColor[3]) { // if \"Blue\" selected\r\n System.out.println(\"Blue of menu Color is selected.\");\r\n System.out.println(\"calling method blue().\");\r\n ge.blue(gra); // call method blue() of class PaintToll\r\n System.out.println(\"method blue() executed.\");\r\n }\r\n }", "@FXML\n public void breakfastComboSelectionMade(){\n if (breakfastCombo.getSelectionModel().isEmpty()){\n clearBreakfastNutrition();\n } else {\n Recipe selectedRecipe = breakfastCombo.getSelectionModel().getSelectedItem();\n displayBreakfastNutrition(selectedRecipe);\n }\n totalDaysNutrition();\n }", "@FXML\n public void dinnerComboSelectionMade(){\n if (dinnerCombo.getSelectionModel().isEmpty()){\n clearDinnerNutrition();\n } else {\n Recipe selectedRecipe = dinnerCombo.getSelectionModel().getSelectedItem();\n displayDinnerNutrition(selectedRecipe);\n }\n totalDaysNutrition();\n }", "public void toSelectingWeapon() {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tselectedIndex = referCombox.getSelectedIndex();\n\t\t\t\tif (selectedIndex == 0) {\n\t\t\t\t\tmyClock=new Clock();\n\t\t\t\t\tdefText.setText(\"Default\");\n\t\t\t\t\tresolutionText.setText(null);\n\t\t\t\t\tmaxText.setText(null);\n\t\t\t\t\toffsetText.setText(null);\n\t\t\t\t\ttypeCombox.setEnabled(false);\n\t\t\t\t\tdefText.setEnabled(false);\n\t\t\t\t\ttypeCombox.setSelectedIndex(0);\n\t\t\t\t\tresolutionText.setEnabled(false);\n\t\t\t\t\tmaxText.setEnabled(false);\n\t\t\t\t\toffsetText.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse if (selectedIndex == 1) {\n\t\t\t\t\tmyClock=new Clock();\n\t\t\t\t\tdefText.setText(null);\n\t\t\t\t\tresolutionText.setText(null);\n\t\t\t\t\tmaxText.setText(null);\n\t\t\t\t\toffsetText.setText(null);\n\t\t\t\t\ttypeCombox.setEnabled(true);\n\t\t\t\t\tdefText.setEnabled(true);\n\t\t\t\t\tif (typeCombox.getSelectedIndex() == 0)\n\t\t\t\t\t\tunitText.setEnabled(false);\n\t\t\t\t\tresolutionText.setEnabled(true);\n\t\t\t\t\tmaxText.setEnabled(true);\n\t\t\t\t\toffsetText.setEnabled(true);\n\t\t\t\t} else {\n\t\t\t\t\tif (selectedIndex >= 2)\n\t\t\t\t\t\tmyClock = Main.win.cd.getClocks().get(selectedIndex - 2);\n\t\t\t\t\tdefText.setText(myClock.getName());\n\t\t\t\t\tresolutionText.setText(myClock.getResolution());\n\t\t\t\t\tmaxText.setText(myClock.getMax());\n\t\t\t\t\toffsetText.setText(myClock.getOffset());\n\t\t\t\t\ttypeCombox.setEnabled(true);\n\t\t\t\t\ttypeCombox.setSelectedIndex(myClock.getClockType());\n\t\t\t\t\tdefText.setEnabled(false);\n\t\t\t\t\tunitText.setText(myClock.getUnit());\n\t\t\t\t\tresolutionText.setEnabled(true);\n\t\t\t\t\tmaxText.setEnabled(true);\n\t\t\t\t\toffsetText.setEnabled(true);\n\t\t\t\t}\n\t\t\t}", "@Then(\"^I choose the park on combobox$\")\n public void i_choose_the_park_on_combobox() {\n onViewWithId(R.id.spinnerParks).click();\n onViewWithText(\"Parque D\").isDisplayed();\n onViewWithText(\"Parque D\").click();\n }", "void filledOperation() {\r\n String selStr; // variable to store the selected string\r\n\r\n repaint(); // repaint\r\n selStr = (String)cb3.getSelectedItem();\r\n // store the string of the selected item\r\n if (selStr == strFill[0]) { // if \"No\" selected\r\n System.out.println(\"No of menu Filled is selected.\");\r\n System.out.println(\"calling method notFilled().\");\r\n ge.notFilled(gra); // call method notFilled() of class PaintTool\r\n System.out.println(\"method notFilled() executed.\");\r\n } else if (selStr == strFill[1]) { // if \"Yes\" seleted\r\n System.out.println(\"Yes of menu Filled is selected.\");\r\n System.out.println(\"calling method filled().\");\r\n ge.filled(gra); // call method filled() of class PaintTool\r\n System.out.println(\"method filled() executed.\");\r\n }\r\n }", "@FXML\n public void lunchComboSelectionMade(){\n if (lunchCombo.getSelectionModel().isEmpty()){\n clearLunchNutrition();\n } else {\n Recipe selectedRecipe = lunchCombo.getSelectionModel().getSelectedItem();\n displayLunchNutrition(selectedRecipe);\n }\n totalDaysNutrition();\n }", "public void draw(){\n\t\tif(!visible) return;\n\n\t\twinApp.pushStyle();\n\t\twinApp.style(G4P.g4pStyle);\n\t\tPoint pos = new Point(0,0);\n\t\tcalcAbsPosition(pos);\n\n\t\t// Draw selected option area\n\t\tif(border == 0)\n\t\t\twinApp.noStroke();\n\t\telse {\n\t\t\twinApp.strokeWeight(border);\n\t\t\twinApp.stroke(localColor.txfBorder);\n\t\t}\n\t\tif(opaque)\n\t\t\twinApp.fill(localColor.txfBack);\n\t\telse\n\t\t\twinApp.noFill();\n\t\twinApp.rect(pos.x, pos.y, width, height);\n\t\t\n\t\t// Draw selected text\n\t\twinApp.noStroke();\n\t\twinApp.fill(localColor.txfFont);\n\t\twinApp.textFont(localFont, localFont.getSize());\n\t\twinApp.text(text, pos.x + PADH, pos.y -PADV +(height - localFont.getSize())/2, width - 16, height);\n\n\t\t// draw drop down list\n\t\twinApp.fill(winApp.color(255,255));\n\t\tif(imgArrow != null)\n\t\t\twinApp.image(imgArrow, pos.x + width - imgArrow.width - 1, pos.y + (height - imgArrow.height)/2);\n\t\tif(expanded == true){\n\t\t\tGOption opt;\n\t\t\twinApp.noStroke();\n\t\t\twinApp.fill(localColor.txfBack);\n\t\t\twinApp.rect(pos.x,pos.y+height,width,nbrRowsToShow*height);\n\n\t\t\tfor(int i = 0; i < optGroup.size(); i++){\n\t\t\t\topt = optGroup.get(i);\n\t\t\t\tif(i >= startRow && i < startRow + nbrRowsToShow){\n\t\t\t\t\topt.visible = true;\n\t\t\t\t\topt.y = height * (i - startRow + 1);\n\t\t\t\t\topt.draw();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\topt.visible = false;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Draw box round list\n\t\t\tif(border != 0){\n\t\t\t\twinApp.strokeWeight(border);\n\t\t\t\twinApp.stroke(localColor.txfBorder);\n\t\t\t\twinApp.noFill();\n\t\t\t\twinApp.rect(pos.x,pos.y+height,width,nbrRowsToShow*height);\n\t\t\t}\n\t\t\tif(optGroup.size() > maxRows){\n\t\t\t\tslider.setVisible(true);\n\t\t\t\tslider.draw();\n\t\t\t}\n\t\t}\n\t\twinApp.popStyle();\n\t}", "private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void catComboActionPerformed(java.awt.event.ActionEvent evt) {\n int categoryIndex = catCombo.getSelectedIndex();\n\n switch (categoryIndex) {\n case 1:\n rentTxt.setText(\"450\");\n break;\n case 2:\n rentTxt.setText(\"500\");\n break;\n default:\n rentTxt.setText(\"\");\n }\n }", "private void getUserIsSoldChoice() {\n int checkedChipId = mBinding.chipGroupIsSold.getCheckedChipId();\n if (checkedChipId == R.id.chip_yes_sold) {\n mChipIsSoldInput = 1;\n } else if (checkedChipId == R.id.chip_no_sold) {\n mChipIsSoldInput = 0;\n } else {\n mChipIsSoldInput = 10;\n }\n }", "public void makeBall(TDropListItem selectedItem, TDropListItem paintStrat);", "public void AddListItemSyrup() {\n // sb.append(remarks.getSelectedItem().toString());\n // sb.append(\" - \");\n\n\n if (BaseConfig.CheckTextView(medicine_name)) {\n // if(BaseConfig.CheckSpinner(dose))\n // {\n\n if (BaseConfig.CheckSpinner(syrupM1) && BaseConfig.CheckSpinner(syrupA2) && BaseConfig.CheckSpinner(syrupE3) && BaseConfig.CheckSpinner(syrupN4)) {\n\n\n if (IsCheckBoxChecked()) {\n\n if (BaseConfig.CheckSpinner(duration)) {\n // if(BaseConfig.CheckSpinner(remarks))\n // {\n String remrks = null;\n if (after_food.isChecked()) {\n remrks = \"After Food\";\n\n } else if (before_food.isChecked()) {\n remrks = \"Before Food\";\n } else if (with_food.isChecked()) {\n remrks = \"With Food\";\n }\n String session1 = null, session2 = null, session3 = null, session4 = null;\n\n String session_set1 = \"M\", session_set2 = \"A\", session_set3 = \"E\", session_set4 = \"N\";\n\n\n String syrmorning = \"\", syrafternn = \"\", syreve = \"\", syrnight = \"\";\n\n if (syrupM1.getSelectedItemPosition() > 0) {\n syrmorning = syrupM1.getSelectedItem().toString();\n }\n\n if (syrupA2.getSelectedItemPosition() > 0) {\n syrafternn = syrupA2.getSelectedItem().toString();\n }\n\n if (syrupE3.getSelectedItemPosition() > 0) {\n syreve = syrupE3.getSelectedItem().toString();\n }\n\n if (syrupN4.getSelectedItemPosition() > 0) {\n syrnight = syrupN4.getSelectedItem().toString();\n }\n\n\n if ((chk_morng.isChecked()) && (syrupM1.getSelectedItemPosition() >= 0)) {\n session1 = chk_morng.getText().toString();\n session_set1 = session1.substring(0, 1);\n } else {\n // session_set1 = \"\";\n //et_mrng.setText(\"0\");\n syrmorning = \"0\";\n\n }\n\n if (chk_aftr.isChecked()) {\n session2 = chk_aftr.getText().toString();\n session_set2 = session2.substring(0, 1);\n } else {\n // session_set2 = \"\";\n //et_aftn.setText(\"0\");\n syrafternn = \"0\";\n }\n\n if (chk_eve.isChecked()) {\n session3 = chk_eve.getText().toString();\n session_set3 = session3.substring(0, 1);\n } else {\n // session_set3 = \"\";\n //et_eve.setText(\"0\");\n syreve = \"0\";\n }\n if (chk_nite.isChecked()) {\n session4 = chk_nite.getText().toString();\n session_set4 = session4.substring(0, 1);\n } else {\n // session_set4 = \"\";\n //et_night.setText(\"0\");\n syrnight = \"0\";\n }\n\n\n if (checklistforMedicineAddedduplicate(medicine_name.getText().toString())) {\n\n BaseConfig.template_name = template_name.getText().toString();\n\n list.add(\"[\" + medicine_name.getText().toString() + \"] _ \"\n\n + session_set1 + \"(\"\n + syrmorning + \")\"\n\n + session_set2 + \"(\"\n + syrafternn + \")\"\n\n + session_set3 + \"(\"\n + syreve + \")\"\n\n + session_set4 + \"(\"\n + syrnight + \")\"\n\n + \" _ \" + remrks\n + \" _ \"\n + duration.getSelectedItem().toString());\n ArrayAdapter<String> listadapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, list);\n\n listview.setAdapter(listadapter);\n\n\n //for checking whether it is tablet\n\t\t\t\t\t\t\t/*if 1 na tablet\n\t\t\t\t\t\t\t * if 2 na syrup\n\t\t\t\t\t\t\t * if 3 na oinment\n\t\t\t\t\t\t\t * */\n\n listcnt.add(\"2-SYR\");\n listtottabcount.add(\"1\");\n\n medicine_name.setText(null);\n duration.setSelection(0);\n\n syrupM1.setSelection(0);\n syrupA2.setSelection(0);\n syrupE3.setSelection(0);\n syrupN4.setSelection(0);\n\n et_mrng.setEnabled(false);\n et_aftn.setEnabled(false);\n et_eve.setEnabled(false);\n et_night.setEnabled(false);\n\n chk_all.setChecked(false);\n chk_morng.setChecked(false);\n chk_aftr.setChecked(false);\n chk_eve.setChecked(false);\n chk_nite.setChecked(false);\n\n et_mrng.setVisibility(View.VISIBLE);\n et_aftn.setVisibility(View.VISIBLE);\n et_eve.setVisibility(View.VISIBLE);\n et_night.setVisibility(View.VISIBLE);\n\n syrupM1.setVisibility(View.GONE);\n syrupA2.setVisibility(View.GONE);\n syrupE3.setVisibility(View.GONE);\n syrupN4.setVisibility(View.GONE);\n\n\n after_food.setChecked(true);\n before_food.setChecked(false);\n with_food.setChecked(false);\n\n medicine_name.requestFocus();\n duration.setSelection(0);\n\n } else {\n showSimplePopUp(\"Selected Medicine Already Added...\");\n }\n\n } else {\n showSimplePopUp(\"Select Duration\");\n duration.requestFocus();\n }\n } else {\n showSimplePopUp(\"Select Frequency\");\n\n }\n\t\t\t\t/*}\n\t\t\t}*/\n\n } else {\n showSimplePopUp(\"Check Frequency\");\n }\n\n } else {\n showSimplePopUp(\"Enter Medicine Name\");\n medicine_name.requestFocus();\n }\n\n }", "@Override\n public void onClick(View v) {\n SplNewList.clear();\n\n splNewListId.clear();\n for (int i = 0; i < specializationSelectedList.size(); i++)\n\n if (specializationSelectedList.get(i).getStatus()) {\n // jobLocation.setText(metrocitySelectedList.toString().replace(\"[\",\"\").replace(\"]\",\"\"));\n SplNewList.add(specializationSelectedList.get(i).getSpecialization_name());\n splNewListId.add(specializationSelectedList.get(i).getSpecialization_id());\n Log.d(\"modelArrayList\", specializationList.get(i).getSpecialization_name() + \"<><<\" + specializationList.get(i).getStatus());\n }\n\n Log.d(\"ISZEOFTITLESELLIS\", SplNewList.size() + \"\");\n medicalSplId = splNewListId.toString().replace(\"[\", \"\").replace(\"]\", \"\");\n\n Log.d(\"MEDICALmedicalSplId\", medicalSplId);\n\n spl_auto.setText(SplNewList.toString().replace(\"[\", \"\").replace(\"]\", \"\"));\n if (SplNewList.size() > 3) {\n Toast toast = Toast.makeText(Sell_Buy_Practice_Activity.this, \"Only 3 Specializations can be selected!\", Toast.LENGTH_LONG);\n\n toast.show();\n dialog.show();\n } else {\n dialog.dismiss();\n }\n\n }", "public void update(){\n\t\tif(saveTimer < 300) saveTimer ++;\n\t\ttimer ++;\n\t\t\n\t\tif(JudokaComponent.input.up) selectedItem --;\n\t\tif(JudokaComponent.input.down) selectedItem ++;\n\t\tif(JudokaComponent.input.right) selectedItem = 8;\n\t\tif(JudokaComponent.input.left) selectedItem = 0;\n\t\tif(JudokaComponent.input.escape) JudokaComponent.changeMenu(JudokaComponent.MAIN);\n\t\t\n\t\tif(selectedItem < -1) selectedItem = -1;\n\t\tif(selectedItem > 8) selectedItem = 8;\n\t\t\n\t\tif(selectedItem == -1) {\n\t\t\tname += JudokaComponent.input.getTypedKey();\n\t\t\tif(JudokaComponent.input.backSpace && name.length() > 0) name = name.substring(0, name.length() - 1);\n\t\t\tif(name.length() > 16) name = name.substring(0, name.length() - 1);\n\t\t}\n\t\t\n\t\tif(JudokaComponent.input.enter) {\n\t\t\tif(selectedItem > 1 && selectedItem < 5)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{0, selectedItem});\n\t\t\telse if(selectedItem > 4 && selectedItem != 8)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{1, selectedItem});\n\t\t\telse if(selectedItem == 0)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{3, selectedItem});\n\t\t\telse if(selectedItem == 1)JudokaComponent.changeMenu(JudokaComponent.TECHNIQUE_PICKER, new Object[]{4, selectedItem});\n\t\t\telse if(selectedItem == 8){\n\t\t\t\tboolean notReadyToSave = false;\n\t\t\t\tfor(Technique t: techniques) {\n\t\t\t\t\tif(t == null ) notReadyToSave = true;\n\t\t\t\t}\n\t\t\t\tif (!notReadyToSave){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tJudokaComponent.propertyFileHandler.saveJudoka(techniques, name);\n\t\t\t\t\t\tsaveTimer = 0;\n\t\t\t\t\t} catch (FileNotFoundException e) { e.printStackTrace();\n\t\t\t\t\t} catch (ParserConfigurationException e) { e.printStackTrace();\n\t\t\t\t\t} catch (IOException e) { e.printStackTrace(); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Overflow handler\n\t\tif(timer == Integer.MAX_VALUE) timer = 0;\n\t}", "@Override\n\tpublic void widgetSelected(SelectionEvent e) {\n\t\tint i = typecombo.getSelectionIndex();\n\t\tif(i == 0){\n\t\t\tcosttext.setText(\"3元\");\n\t\t}\n\t\telse if(i == 1){\n\t\t\tcosttext.setText(\"5元\");\n\t\t}\n\t}", "private void updateStateUiAfterSelection() {\n stageManager.updateStateUi();\n eventBus.publish(EventTopic.DEFAULT, EventType.SELECTED_OBJECT_CHANGED);\n eventManager.fireEvent(EngineEventType.SELECTED_OBJECT_CHANGED);\n }", "private void showBurstOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.setting_burst);\n\n\t\tfinal String[] burstUIString = uiDisplayResource.getBurstNumUIString();\n\t\tif (burstUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"burstUIString == null\");\n\t\t\treturn;\n\t\t}\n\t\tint length = burstUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_BURST,\n\t\t\t\tcameraProperties.getCurrentBurstNum());\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (burstUIString[i].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tint value = (Integer) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_BURST, burstUIString[arg1]);\n\t\t\t\tcameraProperties.setCurrentBurst(value);\n\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_BURST_ICON).sendToTarget();\n\t\t\t\targ0.dismiss();\n\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, burstUIString, curIdx, listener, true);\n\t}", "private void updateUI() {\n if(mChoice == Keys.CHOICE_WAITING) {\n mInstructionView.setText(\"Choose your weapon...\");\n mChoiceView.setImageResource(R.drawable.unknown);\n mRockButton.setEnabled(true);\n mPaperButton.setEnabled(true);\n mScissorsButton.setEnabled(true);\n } else {\n // A mChoice has been made\n mRockButton.setEnabled(false);\n mPaperButton.setEnabled(false);\n mScissorsButton.setEnabled(false);\n\n mInstructionView.setText(\"Waiting for opponent...\");\n\n switch(mChoice) {\n case Keys.CHOICE_ROCK:\n mChoiceView.setImageResource(R.drawable.rock);\n break;\n case Keys.CHOICE_PAPER:\n mChoiceView.setImageResource(R.drawable.paper);\n break;\n case Keys.CHOICE_SCISSORS:\n mChoiceView.setImageResource(R.drawable.scissors);\n break;\n }\n }\n\n // Check Pebble player response has arrived first\n if(mChoice != Keys.CHOICE_WAITING && mP2Choice != Keys.CHOICE_WAITING) {\n doMatch();\n }\n }", "@Override\n public void addChoice(){\n System.out.println(\"Chocolate cake size: \");\n //print out choice\n choice.addChoice();\n }", "private void changeActionPerformed(final java.awt.event.ActionEvent evt) {\n\t\t\tpainting = paintChecked;\n\t\t\tif (!paintChecked) {\n\t\t\t\tBot.getEventManager().removeListener(PaintListener.class, s);\n\t\t\t}\n\t\t\tif (timeChecked) {\n\t\t\t\tint h = 0, m = 0;\n\t\t\t\tstopping = false;\n\t\t\t\ttry {\n\t\t\t\t\th = Integer.parseInt(hours.getText());\n\t\t\t\t\tm = Integer.parseInt(minutes.getText());\n\t\t\t\t} finally {\n\t\t\t\t\ttimeToStop = System.currentTimeMillis() + m * 60000 + h\n\t\t\t\t\t\t\t* 60000 * 60;\n\t\t\t\t\tstopping = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstopping = false;\n\t\t\t}\n\t\t\tfinal String areaName = (String) location.getItemAt(location\n\t\t\t\t\t.getSelectedIndex());\n\t\t\tlog(\"Changing to area: \" + areaName);\n\t\t\tfoodName = ((String) food.getItemAt(food.getSelectedIndex()))\n\t\t\t\t\t.toLowerCase();\n\t\t\tlog(\"Now cooking: \" + foodName);\n\t\t\tif (areaName.equals(\"Varrock West Bank - North Side\")) {\n\t\t\t\tchosenArea = varrockwestnorth;\n\t\t\t} else if (areaName.equals(\"Varrock West Bank - South Side\")) {\n\t\t\t\tchosenArea = varrockwestsouth;\n\t\t\t} else if (areaName.equals(\"Varrock East Bank\")) {\n\t\t\t\tchosenArea = varrockeast;\n\t\t\t} else if (areaName.equals(\"Al Kharid Bank\")) {\n\t\t\t\tchosenArea = alkharid;\n\t\t\t} else if (areaName.equals(\"Draynor Village Bank\")) {\n\t\t\t\tchosenArea = draynor;\n\t\t\t} else if (areaName.equals(\"Falador East Bank\")) {\n\t\t\t\tchosenArea = faladoreast;\n\t\t\t} else if (areaName.equals(\"Falador West Bank\")) {\n\t\t\t\tchosenArea = faladorwest;\n\t\t\t} else if (areaName.equals(\"Grand Exchange - East Side\")) {\n\t\t\t\tchosenArea = geeast;\n\t\t\t} else if (areaName.equals(\"Grand Exchange - West Side\")) {\n\t\t\t\tchosenArea = gewest;\n\t\t\t} else if (areaName.equals(\"Edgeville Bank - West Side\")) {\n\t\t\t\tchosenArea = edgevillewest;\n\t\t\t} else if (areaName.equals(\"Edgeville Bank - East Side\")) {\n\t\t\t\tchosenArea = edgevilleeast;\n\t\t\t} else if (areaName.equals(\"Edgeville Bank - North Side\")) {\n\t\t\t\tchosenArea = edgevillenorth;\n\t\t\t} else if (areaName.equals(\"*Fishing Guild\")) {\n\t\t\t\tchosenArea = fishingguild;\n\t\t\t} else if (areaName.equals(\"Duel Arena\")) {\n\t\t\t\tchosenArea = duelarena;\n\t\t\t} else if (areaName.equals(\"Bounty Hunter\")) {\n\t\t\t\tchosenArea = bountyhunter;\n\t\t\t} else if (areaName.equals(\"*Ardougne South Bank\")) {\n\t\t\t\tchosenArea = ardougnesouth;\n\t\t\t} else if (areaName.equals(\"*Ardougne North Bank\")) {\n\t\t\t\tchosenArea = ardougnenorth;\n\t\t\t} else if (areaName.equals(\"*Lletya Bank\")) {\n\t\t\t\tchosenArea = lletya;\n\t\t\t} else if (areaName.equals(\"*Yanille Bank\")) {\n\t\t\t\tchosenArea = yanille;\n\t\t\t} else if (areaName.equals(\"*Seer's Village Bank\")) {\n\t\t\t\tchosenArea = seersvillage;\n\t\t\t} else if (areaName.equals(\"Fist of Guthix\")) {\n\t\t\t\tchosenArea = fistofguthix;\n\t\t\t} else if (areaName.equals(\"*Catherby\")) {\n\t\t\t\tchosenArea = catherby;\n\t\t\t} else if (areaName.equals(\"*Shilo Village\")) {\n\t\t\t\tchosenArea = shilovillage;\n\t\t\t} else if (areaName.equals(\"*TzHaar\")) {\n\t\t\t\tchosenArea = tzhaar;\n\t\t\t} else if (areaName.equals(\"*Jatizso\")) {\n\t\t\t\tchosenArea = jatizso;\n\t\t\t} else if (areaName.equals(\"*Neitiznot\")) {\n\t\t\t\tchosenArea = neitiznot;\n\t\t\t} else if (areaName.equals(\"*Miscellania\")) {\n\t\t\t\tchosenArea = miscellania;\n\t\t\t} else if (areaName.equals(\"*Lunar Isle\")) {\n\t\t\t\tchosenArea = lunarisle;\n\t\t\t} else if (areaName.equals(\"*Lumbridge Basement\")) {\n\t\t\t\tchosenArea = lumbridgebasement;\n\t\t\t} else if (areaName.equals(\"*Canifis\")) {\n\t\t\t\tchosenArea = canifis;\n\t\t\t} else if (areaName.equals(\"*Port Phasmatys (Reqs Ammy!)\")) {\n\t\t\t\tchosenArea = portphasmatys;\n\t\t\t} else if (areaName.equals(\"*Castle Wars\")) {\n\t\t\t\tchosenArea = castlewars;\n\t\t\t} else if (areaName.equals(\"*Pest Control\")) {\n\t\t\t\tchosenArea = pestcontrol;\n\t\t\t} else if (areaName.equals(\"*Oo'glog\")) {\n\t\t\t\tchosenArea = ooglog;\n\t\t\t} else if (areaName.equals(\"Mos Le'Harmless\")) {\n\t\t\t\tchosenArea = mosleharmless;\n\t\t\t} else if (areaName.equals(\"*Nardah\")) {\n\t\t\t\tchosenArea = nardah;\n\t\t\t} else if (areaName.equals(\"*Zanaris\")) {\n\t\t\t\tchosenArea = zanaris;\n\t\t\t} else if (areaName.equals(\"*Dorgesh-Kaan (Goblin City)\")) {\n\t\t\t\tchosenArea = dorgeshkaan;\n\t\t\t} else if (areaName.equals(\"*Keldagrim\")) {\n\t\t\t\tchosenArea = keldagrim;\n\t\t\t} else if (areaName.equals(\"*Rogues Den\")) {\n\t\t\t\tchosenArea = roguesden;\n\t\t\t}\n\n\t\t\t// Foods\n\t\t\tif (foodName.equals(\"anchovies\")) {\n\t\t\t\tfoodID = 321;\n\t\t\t} else if (foodName.equals(\"bass\")) {\n\t\t\t\tfoodID = 363;\n\t\t\t} else if (foodName.equals(\"bear meat\")) {\n\t\t\t\tfoodID = 2136;\n\t\t\t} else if (foodName.equals(\"beef\")) {\n\t\t\t\tfoodID = 2132;\n\t\t\t} else if (foodName.equals(\"cave eel\")) {\n\t\t\t\tfoodID = 5001;\n\t\t\t} else if (foodName.equals(\"chicken\")) {\n\t\t\t\tfoodID = 2138;\n\t\t\t} else if (foodName.equals(\"cod\")) {\n\t\t\t\tfoodID = 341;\n\t\t\t} else if (foodName.equals(\"crayfish\")) {\n\t\t\t\tfoodID = 13435;\n\t\t\t} else if (foodName.equals(\"herring\")) {\n\t\t\t\tfoodID = 345;\n\t\t\t} else if (foodName.equals(\"lobster\")) {\n\t\t\t\tfoodID = 377;\n\t\t\t} else if (foodName.equals(\"mackerel\")) {\n\t\t\t\tfoodID = 353;\n\t\t\t} else if (foodName.equals(\"manta ray\")) {\n\t\t\t\tfoodID = 389;\n\t\t\t} else if (foodName.equals(\"monkfish\")) {\n\t\t\t\tfoodID = 7944;\n\t\t\t} else if (foodName.equals(\"pawya meat\")) {\n\t\t\t\tfoodID = 12535;\n\t\t\t} else if (foodName.equals(\"pike\")) {\n\t\t\t\tfoodID = 349;\n\t\t\t} else if (foodName.equals(\"rabbit\")) {\n\t\t\t\tfoodID = 3226;\n\t\t\t} else if (foodName.equals(\"rainbow fish\")) {\n\t\t\t\tfoodID = 10138;\n\t\t\t} else if (foodName.equals(\"rat meat\")) {\n\t\t\t\tfoodID = 2134;\n\t\t\t} else if (foodName.equals(\"salmon\")) {\n\t\t\t\tfoodID = 331;\n\t\t\t} else if (foodName.equals(\"sardine\")) {\n\t\t\t\tfoodID = 327;\n\t\t\t} else if (foodName.equals(\"sea turtle\")) {\n\t\t\t\tfoodID = 395;\n\t\t\t} else if (foodName.equals(\"shark\")) {\n\t\t\t\tfoodID = 383;\n\t\t\t} else if (foodName.equals(\"shrimps\")) {\n\t\t\t\tfoodID = 317;\n\t\t\t} else if (foodName.equals(\"swordfish\")) {\n\t\t\t\tfoodID = 371;\n\t\t\t} else if (foodName.equals(\"trout\")) {\n\t\t\t\tfoodID = 335;\n\t\t\t} else if (foodName.equals(\"tuna\")) {\n\t\t\t\tfoodID = 359;\n\t\t\t} else if (foodName.equals(\"ugthanki meat\")) {\n\t\t\t\tfoodID = 1859;\n\t\t\t} else if (foodName.equals(\"yak meat\")) {\n\t\t\t\tfoodID = 10816;\n\t\t\t}\n\t\t\tsavedItems[savedItems.length - 1] = foodID;\n\t\t\tPrintWriter out = null;\n\t\t\ttry {\n\t\t\t\tout = new PrintWriter(new FileWriter(\"MHTYChefConfig.txt\"));\n\t\t\t\tfinal String[] settings = { \"\" + (paintChecked ? 1 : 0),\n\t\t\t\t\t\t\"\" + (timeChecked ? 1 : 0), hours.getText(),\n\t\t\t\t\t\tminutes.getText(), food.getSelectedIndex() + \"\",\n\t\t\t\t\t\tlocation.getSelectedIndex() + \"\" };\n\t\t\t\tfor (final String line : settings) {\n\t\t\t\t\tout.println(line);\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t\tlog(\"Configuration saved to MHTYChefConfig.txt!\");\n\t\t\t} catch (final IOException e) {\n\t\t\t\tlog(\"Saving configuration failed!\");\n\t\t\t}\n\t\t}", "public void dropDown() {\n this.setState(\"drop\");\n if (Math.abs(this.yVel) < this.Y_MAX_SPEED) {\n this.yVel += this.dropVel;\n }\n }", "public void setDropDownToFeelGood() {\n scrollNWClick(scroll, \"Feelgood\");\n }", "public void selectCategory() {\n\t\t\r\n\t}", "@FXML\n\tpublic void setSelectedItem(MouseEvent event) {\n\t\ttry {\n\t\t\tString s=inventoryList.getSelectionModel().getSelectedItem();\t// Get selected item\n\t\t\tItem i=Item.getItem(ItemList, s);\n\t\t\titemselect.setText(s);\t// Set selected item information\n\t\t\tif(i.getStat().equals(\"HP\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Health\");\n\t\t\telse if(i.getStat().equals(\"DMG\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Damage\");\n\t\t\telse\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Evasion\");\n\t\t} catch(Exception e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "@Then(\"^I choose by ranking of occupated$\")\n public void i_choose_by_ranking_of_occupated() {\n onViewWithId(R.id.spinnerStatisticsType).click();\n onViewWithText(\"Ranking\").isDisplayed();\n onViewWithText(\"Ranking\").click();\n }", "private void getUserBathroomsChoice() {\n int checkedChipId = mBinding.chipGroupBathrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bathroom) {\n mChipBathroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bathrooms) {\n mChipBathroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bathrooms) {\n mChipBathroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bathrooms) {\n mChipBathroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bathrooms) {\n mChipBathroomsInput = 5;\n } else {\n mChipBathroomsInput = 0;\n }\n }", "void selectCategory() {\n // If user is the active player, ask for the user's category.\n if (activePlayer.getIsHuman()) {\n setGameState(GameState.CATEGORY_REQUIRED);\n }\n // Or get AI active player to select best category.\n else {\n Card activeCard = activePlayer.getTopMostCard();\n activeCategory = activeCard.getBestCategory();\n }\n\n logger.log(\"Selected category: \" + activeCategory + \"=\" +\n activePlayer.getTopMostCard().getCardProperties()\n .get(activeCategory));\n logger.log(divider);\n\n setGameState(GameState.CATEGORY_SELECTED);\n }", "@FXML\n void selectSavings(ActionEvent event) {\n \tdirectDep.setSelected(false);\n \tisLoyal.setSelected(false);\n \tdirectDep.setDisable(true);\n \tisLoyal.setDisable(false);\n }", "public void rightRegionSelections() {\n setPositionSelcted(true);\n\n //setting gamescreen background as per region of position selected\n gameScreenBackground.setImageResource(com.ryansplayllc.ryansplay.R.drawable.baseball_field_zones_rf_on);\n\n //changing position image sources as adjacent to half selected and far positons to empty backgrounds to position buttons\n rfTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.rf_player_selected);\n twoBTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.twob_player_selected);\n oneBTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.oneb_player_selected);\n\n cfTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.cf_player_half_selected);\n pTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.p_player_half_selected);\n cTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.c_player_half_selected);\n\n lfTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.lf_player_unselected);\n ssTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.ss_player_unselected);\n threeBTextView.setBackgroundResource(com.ryansplayllc.ryansplay.R.drawable.threeb_player_unselected);\n\n\n cfTextView.setSelected(false);\n pTextView.setSelected(false);\n cTextView.setSelected(false);\n\n lfTextView.setSelected(false);\n ssTextView.setSelected(false);\n threeBTextView.setSelected(false);\n\n if (rfTextView.isSelected()) {\n rfTextView.setSelected(true);\n oneBTextView.setSelected(false);\n oneBTextView.setSelected(false);\n\n } else if (twoBTextView.isSelected()) {\n twoBTextView.setSelected(true);\n oneBTextView.setSelected(false);\n\n } else if (oneBTextView.isSelected()) {\n oneBTextView.setSelected(true);\n }\n\n //setting top field points visibility as per positions selections\n rightFieldpoints.setVisibility(View.VISIBLE);\n leftFieldPoints.setVisibility(View.VISIBLE);\n centerFieldPoints.setVisibility(View.VISIBLE);\n\n //setting top field points as per selections\n rightFieldpoints.setText(\"+20\");\n leftFieldPoints.setText(\"+5\");\n centerFieldPoints.setText(\"+10\");\n\n //changing top field points text color as per selections\n rightFieldpoints.setTextColor(Color.parseColor(\"#ffffff\"));\n centerFieldPoints.setTextColor(Color.parseColor(\"#b5c3ae\"));\n leftFieldPoints.setTextColor(Color.parseColor(\"#b5c3ae\"));\n\n //swh is disable\n swhImageView.setSelected(false);\n swhImageView.setEnabled(true);\n\n //close guesses enabling\n closePlayButton.setAlpha((float)1);\n closePlayButton.setEnabled(true);\n\n }", "public void chooseFortifyGivers(){\n gameState = GameState.FORTIFYGIVER;\n currentTerritoriesOfInterest = Player.getTerritoryStringArray(currentPlayer.getFortifyGivers());\n notifyObservers();\n }", "@SuppressLint(\"SetTextI18n\")\n public void openDrops() {\n\n usingDropsScreen = true;\n myActivity.setContentView(R.layout.dropping);\n dropsButtonToGame = myActivity.findViewById(R.id.button9);\n final Button confirmButton = myActivity.findViewById(R.id.button11);\n ImageButton pawnButton = myActivity.findViewById(R.id.imageButton4);\n ImageButton rookButton = myActivity.findViewById(R.id.imageButton5);\n ImageButton bishopButton = myActivity.findViewById(R.id.imageButton);\n ImageButton sgButton = myActivity.findViewById(R.id.imageButton6);\n ImageButton ggButton = myActivity.findViewById(R.id.imageButton2);\n ImageButton knightButton = myActivity.findViewById(R.id.imageButton3);\n ImageButton lanceButton = myActivity.findViewById(R.id.imageButton7);\n\n final ArrayList<Piece> myDrops = state.getDrops0();\n final ArrayList<Piece> oppDrops = state.getDrops1();\n int myRCount = 0;\n int myBCount = 0;\n int myLCount = 0;\n int myKCount = 0;\n int myGGCount = 0;\n int mySGCount = 0;\n int myPCount = 0;\n\n int oppRCount = 0;\n int oppBCount = 0;\n int oppLCount = 0;\n int oppKCount = 0;\n int oppGGCount = 0;\n int oppSGCount = 0;\n int oppPCount = 0;\n\n final TextView mySelected = myActivity.findViewById(R.id.textView46);\n TextView myPawns = myActivity.findViewById(R.id.textView47);\n TextView myRooks = myActivity.findViewById(R.id.textView48);\n TextView myLances = myActivity.findViewById(R.id.textView60);\n TextView myKnights = myActivity.findViewById(R.id.textView52);\n TextView myBishops = myActivity.findViewById(R.id.textView49);\n TextView myGGs = myActivity.findViewById(R.id.textView51);\n TextView mySGs = myActivity.findViewById(R.id.textView50);\n\n TextView oppPawns = myActivity.findViewById(R.id.textView54);\n TextView oppRooks = myActivity.findViewById(R.id.textView55);\n TextView oppLances = myActivity.findViewById(R.id.textView61);\n TextView oppKnights = myActivity.findViewById(R.id.textView57);\n TextView oppBishops = myActivity.findViewById(R.id.textView56);\n TextView oppGGs = myActivity.findViewById(R.id.textView59);\n TextView oppSGs = myActivity.findViewById(R.id.textView58);\n\n\n //disable all buttons to start\n pawnButton.setEnabled(false);\n rookButton.setEnabled(false);\n bishopButton.setEnabled(false);\n sgButton.setEnabled(false);\n ggButton.setEnabled(false);\n lanceButton.setEnabled(false);\n knightButton.setEnabled(false);\n\n //count how many pieces of each type the opponent has\n for (Piece p : oppDrops) {\n if (p.getType() == Piece.PieceType.BISHOP ||\n p.getType() == Piece.PieceType.P_BISHOP) {\n oppBCount++;\n }\n if (p.getType() == Piece.PieceType.ROOK ||\n p.getType() == Piece.PieceType.P_ROOK) {\n oppRCount++;\n }\n if (p.getType() == Piece.PieceType.PAWN ||\n p.getType() == Piece.PieceType.P_PAWN) {\n oppPCount++;\n }\n if (p.getType() == Piece.PieceType.LANCE ||\n p.getType() == Piece.PieceType.P_LANCE) {\n oppLCount++;\n }\n if (p.getType() == Piece.PieceType.GOLDGENERAL) {\n oppGGCount++;\n }\n if (p.getType() == Piece.PieceType.SILVERGENERAL ||\n p.getType() == Piece.PieceType.P_SILVER) {\n oppSGCount++;\n }\n if (p.getType() == Piece.PieceType.KNIGHT ||\n p.getType() == Piece.PieceType.P_KNIGHT) {\n oppKCount++;\n }\n }\n\n //only enable the button for each piece if I have one to drop\n //also, count how many of each piece I have\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.BISHOP ||\n p.getType() == Piece.PieceType.P_BISHOP) {\n myBCount++;\n bishopButton.setEnabled(true);\n }\n if (p.getType() == Piece.PieceType.ROOK ||\n p.getType() == Piece.PieceType.P_ROOK) {\n myRCount++;\n rookButton.setEnabled(true);\n }\n if (p.getType() == Piece.PieceType.PAWN ||\n p.getType() == Piece.PieceType.P_PAWN) {\n myPCount++;\n pawnButton.setEnabled(true);\n }\n if (p.getType() == Piece.PieceType.LANCE ||\n p.getType() == Piece.PieceType.P_LANCE) {\n myLCount++;\n lanceButton.setEnabled(true);\n }\n if (p.getType() == Piece.PieceType.GOLDGENERAL) {\n myGGCount++;\n ggButton.setEnabled(true);\n }\n if (p.getType() == Piece.PieceType.SILVERGENERAL ||\n p.getType() == Piece.PieceType.P_SILVER) {\n mySGCount++;\n sgButton.setEnabled(true);\n }\n if (p.getType() == Piece.PieceType.KNIGHT ||\n p.getType() == Piece.PieceType.P_KNIGHT) {\n myKCount++;\n knightButton.setEnabled(true);\n }\n }\n\n //display how many of each piece each player has captured\n myLances.setText(\"Lances:\" + \" \" + myLCount);\n myRooks.setText(\"Rooks:\" + \" \" + myRCount);\n myPawns.setText(\"Pawns:\" + \" \" + myPCount);\n myBishops.setText(\"Bishops:\" + \" \" + myBCount);\n myGGs.setText(\"Gold Generals:\" + \" \" + myGGCount);\n mySGs.setText(\"Silver Generals:\" + \" \" + mySGCount);\n myKnights.setText(\"Knights:\" + \" \" + myKCount);\n\n oppLances.setText(\"Lances:\" + \" \" + oppLCount);\n oppRooks.setText(\"Rooks:\" + \" \" + oppRCount);\n oppPawns.setText(\"Pawns:\" + \" \" + oppPCount);\n oppBishops.setText(\"Bishops:\" + \" \" + oppBCount);\n oppGGs.setText(\"Gold Generals:\" + \" \" + oppGGCount);\n oppSGs.setText(\"Silver Generals:\" + \" \" + oppSGCount);\n oppKnights.setText(\"Knights:\" + \" \" + oppKCount);\n\n\n //show what piece is selected if I have that piece, and enable confirm button\n pawnButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.PAWN) {\n toDrop = p;\n }\n }\n mySelected.setText(\"Selected: Pawn\");\n confirmButton.setEnabled(true);\n }\n }\n );\n rookButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.ROOK) {\n toDrop = p;\n }\n }\n mySelected.setText(\"Selected: Rook\");\n confirmButton.setEnabled(true);\n }\n }\n\n\n );\n bishopButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.BISHOP) {\n toDrop = p;\n }\n }\n mySelected.setText(\"Selected: Bishop\");\n confirmButton.setEnabled(true);\n }\n }\n\n\n );\n sgButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.SILVERGENERAL) {\n toDrop = p;\n }\n }\n mySelected.setText(\"Selected: Silver General\");\n confirmButton.setEnabled(true);\n }\n }\n );\n ggButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.GOLDGENERAL) {\n toDrop = p;\n }\n }\n mySelected.setText(\"Selected: Gold General\");\n confirmButton.setEnabled(true);\n }\n }\n );\n\n lanceButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.LANCE) {\n toDrop = p;\n }\n }\n mySelected.setText(\"Selected: Lance\");\n confirmButton.setEnabled(true);\n }\n }\n );\n\n knightButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n for (Piece p : myDrops) {\n if (p.getType() == Piece.PieceType.KNIGHT) {\n toDrop = p;\n }\n }\n mySelected.setText(\"Selected: Knight\");\n confirmButton.setEnabled(true);\n }\n }\n );\n\n if(toDrop == null){\n confirmButton.setEnabled(false);\n }\n\n dropsButtonToGame.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n mySelected.setText(\"Selected:\");\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingDropsScreen = false;\n toDrop = null;\n if (state != null) {\n receiveInfo(state);\n }\n }\n }\n );\n\n confirmButton.setOnClickListener(\n new View.OnClickListener() {\n\n public void onClick(View v) {\n mySelected.setText(\"Selected:\");\n amDropping = true;\n ShogiHumanPlayer.this.setAsGui(myActivity);\n usingDropsScreen = false;\n ArrayList<Piece> updated = state.getDrops0();\n updated.remove(toDrop);\n state.setDrops0(updated);\n if (state != null) {\n receiveInfo(state);\n }\n }\n });\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t\tcontroller.newShot();\r\n\t\t\t\tint selected = clubList.getSelectedIndex();\r\n\t\t\t\tif (selected >= 0){\r\n\t\t\t\t\tString selectedClub = (String)clubList.getModel().getElementAt(selected);\r\n\t\t\t\t\tcontroller.selectClub(selectedClub);\r\n\t\t\t\t\tcontroller.startShot();\r\n\t\t\t\t\t\r\n\t\t\t\t\tUI.getInstance().show(PanelNames.END_SHOT);\r\n\t\t\t\t\tclubList.clearSelection();\r\n\t\t\t\t}\r\n\t\t\t}", "private void getUserBedroomsChoice() {\n int checkedChipId = mBinding.chipGroupBedrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bedroom) {\n mChipBedroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bedrooms) {\n mChipBedroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bedrooms) {\n mChipBedroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bedrooms) {\n mChipBedroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bedrooms) {\n mChipBedroomsInput = 5;\n } else {\n mChipBedroomsInput = 0;\n }\n }", "void updateSelected(Coord c) {\n this.selected = c;\n }", "void setSelectedSpriteValue(int value);", "public Controllable getSelected()\r\n\t{\r\n\t\t//update army\r\n\t\tif(this.rallyPoint.getSelectedLeaf() != this.selectedRally)\r\n\t\t{\r\n\t\t\tthis.selectedRally=(RallyPoint)this.rallyPoint.getSelectedLeaf();\r\n\t\t\tarmy.removeAllChildren();\r\n\t\t\t\r\n\t\t\tSelectorNode<Controllable> fullArmy=addNode(\"Army\",\"Entire Army\");\r\n\t\t\tSelectorNode<Controllable> combatArmy=addNode(\"Army\",\"Combat Army\");\r\n\t\t\tSelectorNode<Controllable> supportArmy=addNode(\"Army\",\"Support Army\");\r\n\t\t\tif(this.selectedRally!=null)\r\n\t\t\t{\r\n\t\t\t\tList<Unit> fullArmyUnits = this.selectedRally.getFullArmy();\r\n\t\t\t\tList<Unit> combatArmyUnits = this.selectedRally.getCombatArmy();\r\n\t\t\t\tList<Unit> supportArmyUnits = this.selectedRally.getSupportArmy();\r\n\t\t\t\t\r\n\t\t\t\tIterator<Unit> iter1 = fullArmyUnits.iterator();\r\n\t\t\t\twhile(iter1.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tfullArmy.addChild(new SelectorNode<Controllable>(iter1.next()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIterator<Unit> iter2 = combatArmyUnits.iterator();\r\n\t\t\t\twhile(iter2.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatArmy.addChild(new SelectorNode<Controllable>(iter2.next()));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIterator<Unit> iter3 = supportArmyUnits.iterator();\r\n\t\t\t\twhile(iter3.hasNext())\r\n\t\t\t\t{\r\n\t\t\t\t\tsupportArmy.addChild(new SelectorNode<Controllable>(iter3.next()));\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t\treturn super.getSelected();\r\n\t}", "@Override\n public void perform() {\n pickList.advanced().getSourceList().getItem(ChoicePickerHelper.byIndex().last()).select();\n pickList.advanced().getAddButtonElement().click();\n pickList.advanced().getRemoveButtonElement().click();\n }", "@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }", "private void actionSwitchSelect()\r\n\t{\r\n\t\tif (FormMainMouse.isSampleSelectOn)\r\n\t\t{\r\n\t\t\thelperSwitchSelectOff();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\thelperSwitchSelectOn();\r\n\r\n\t\t\t//---- If we can select sample, we can not move it\r\n\t\t\thelperSwitchMoveOff();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\trepaint();\n\n\t\t\t\tif (e.getStateChange() == 1) {\n\t\t\t\t\traceChoosen = (String) e.getItem();\n\n\t\t\t\t\tif (raceChoosen.equals(\"Elf\")) {\n\t\t\t\t\t\tvitesseSlider.setMinimum(8);\n\t\t\t\t\t\tvitesseSlider.setMaximum(10);\n\t\t\t\t\t\tvitesseSlider.setValue(9);\n\t\t\t\t\t\tforceSlider.setMinimum(1);\n\t\t\t\t\t\tforceSlider.setMaximum(3);\n\t\t\t\t\t\tforceSlider.setValue(2);\n\t\t\t\t\t} else if (raceChoosen.equals(\"Ogre\")) {\n\t\t\t\t\t\tvitesseSlider.setMinimum(1);\n\t\t\t\t\t\tvitesseSlider.setMaximum(7);\n\t\t\t\t\t\tvitesseSlider.setValue(4);\n\t\t\t\t\t\tforceSlider.setMinimum(4);\n\t\t\t\t\t\tforceSlider.setMaximum(10);\n\t\t\t\t\t\tforceSlider.setValue(7);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvitesseSlider.setMinimum(4);\n\t\t\t\t\t\tvitesseSlider.setMaximum(10);\n\t\t\t\t\t\tvitesseSlider.setValue(7);\n\t\t\t\t\t\tforceSlider.setMinimum(1);\n\t\t\t\t\t\tforceSlider.setMaximum(7);\n\t\t\t\t\t\tforceSlider.setValue(4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void seeSoldItem() {\n\t\tShip selectedShip = game.getSelectedShip();\n\t\tHashMap<Goods, ArrayList<String>> soldItems = selectedShip.getSoldItems();\n\t\tint index = 1;\n\t\tSystem.out.println(\"Items that has been sold: \");\n\t\tfor (HashMap.Entry<Goods, ArrayList<String>> set: soldItems.entrySet()) {\n\t\t\tString name = set.getKey().getName();\n\t\t\tint quantity = set.getKey().getQuantitySold();\n\t\t\tSystem.out.println(\"(\" + index + \") Name: \" + name + \" Quantity: \" + quantity + \" Loaction it was sold: \" + set.getValue());\n\t\t\tindex++;\n\t\t\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\ttry {\n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\t\n\t\t\t\t\tstate = true;\n\t\t\t\t\tgame.seeShipSpec();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t}", "public static void defaultGameOptions() {\r\n\t\tGameOptions.doubleNilValueTextField.setText(\"200\");\r\n\t\tGameOptions.winScoreTextField.setText(\"500\");\r\n\t\tGameOptions.loseScoreTextField.setText(\"-200\");\r\n\t\t\r\n\t\tMain.doubleNilValue = \"200\";\r\n\t\tMain.winScore = \"500\";\r\n\t\tMain.loseScore = \"-200\";\r\n\r\n\t\t//Use the appropriate value for bagValue when three handed.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tGameOptions.bagValue.select(\"2\");\r\n\t\t\tGameOptions.nilValueTextField.setText(\"100\");\r\n\t\t\tGameOptions.nilAllowed.setState(true);\r\n\t\t\tGameOptions.doubleNilAllowed.setState(true);\r\n\t\t\tGameOptions.nilValueTextField.setEditable(true);\r\n\t\t\tGameOptions.doubleNilValueTextField.setEditable(true);\r\n\r\n\t\t\tMain.bagValue = \"2\";\r\n\t\t\tMain.nilValue = \"100\";\r\n\t\t\tMain.isNilAllowed = true;\r\n\t\t\tMain.isDoubleNilAllowed = true;\r\n\t\t//Use the appropriate value for bagValue when four handed single.\r\n\t\t} else if (Main.isFourHandedSingle){\r\n\t\t\tGameOptions.bagValue.select(\"1\");\r\n\t\t\tGameOptions.nilValueTextField.setText(\"50\");\r\n\t\t\tGameOptions.nilAllowed.setState(true);\r\n\t\t\tGameOptions.doubleNilAllowed.setState(false);\r\n\t\t\tGameOptions.nilValueTextField.setEditable(true);\r\n\t\t\tGameOptions.doubleNilValueTextField.setEditable(false);\r\n\r\n\t\t\tMain.bagValue = \"1\";\r\n\t\t\tMain.nilValue = \"50\";\r\n\t\t\tMain.isNilAllowed = true;\r\n\t\t\tMain.isDoubleNilAllowed = false;\r\n\t\t//Use the appropriate value for bagValue when four handed teams.\r\n\t\t} else {\r\n\t\t\tGameOptions.bagValue.select(\"1\");\r\n\t\t\tGameOptions.nilValueTextField.setText(\"50\");\r\n\t\t\tGameOptions.nilAllowed.setState(true);\r\n\t\t\tGameOptions.doubleNilAllowed.setState(true);\r\n\t\t\tGameOptions.nilValueTextField.setEditable(true);\r\n\t\t\tGameOptions.doubleNilValueTextField.setEditable(true);\r\n\r\n\t\t\tMain.bagValue = \"1\";\r\n\t\t\tMain.nilValue = \"50\";\r\n\t\t\tMain.isNilAllowed = true;\r\n\t\t\tMain.isDoubleNilAllowed = true;\r\n\t\t}\r\n\t}", "@FXML\n\tpublic void selectingDifficulty(ActionEvent event){\n\t\t\n\t\tif (level1.isSelected() || level2.isSelected() || level3.isSelected() || level4.isSelected()) {\n\t\t\tRadioButton rb = (RadioButton) difficulty.getSelectedToggle();\n\t\t\tint level = Character.getNumericValue(rb.getId().charAt(5));\n\t\t\tFileHandling.sortWordsIntoDifficulty(level+4);\n\t\t\tdifficultyLevel = level + 4;\n\t\t\tnextButton.setDisable(false);\n\t\t}\n\t}", "public void onClick(View v) {\n showSchedule(v);\n league_selected = leagues_sp.getSelectedItemPosition();\n Log.d(\"MainActivity\", \"Selected league is \" +league_selected);\n team_selected = teams_sp.getSelectedItem().toString();\n Log.d(\"MainActivity\", \"Selected team is \" +team_selected);\n }", "@Override\n\tpublic void onSelectionChanged(ListSelectionEvent e, List<ShoppingListObject> values) {\n\n\t}", "private void shopSwitchToMainMenu() {\n potionNum = 1;\n defenseNum = 1;\n pause();\n Pane canvas = new Pane();\n Stage stage = new Stage();\n stage.setTitle(\"Shopping Store\");\n Label winLabel = new Label(\"Shopping Castle!\");\n ShopItem[] buyItems = new ShopItem[8];\n ShopItem[] sellItems = new ShopItem[8];\n for (int i = 0; i < 8; i++) {\n int gold = world.getCharacter().getGold().get();\n ShopItem item = ShoppingItem(i, gold, true);\n Button newButton = new Button(\"Buy\" + item.getName() + \" \" + item.getPrice());\n newButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n buyItem(item);\n }\n });\n if (gold < item.getPrice()) {\n newButton.disableProperty().set(true);\n }\n newButton.relocate(30 + i * 100, 80);\n canvas.getChildren().addAll(newButton);\n\n buyItems[i] = item;\n buyItems[i].setButton(newButton);\n }\n\n for (int i = 0; i < 8; i++) {\n int gold = world.getCharacter().getGold().get();\n ShopItem item = ShoppingItem(i, gold, false);\n Button newButton = new Button(\"Sell\" + item.getName() + \" \" + item.getPrice());\n\n if (!world.ifHasItem(item.getName())) {\n newButton.disableProperty().set(true);\n }\n\n newButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n sellItem(item);\n }\n });\n\n newButton.relocate(30 + i * 100, 150);\n canvas.getChildren().addAll(newButton);\n\n sellItems[i] = item;\n sellItems[i].setButton(newButton);\n }\n Button tempButton;\n for (int i = 0; i < 8; i++) {\n tempButton = buyItems[i].getButton();\n tempButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n updateButtonState(buyItems, sellItems);\n }\n });\n tempButton = sellItems[i].getButton();\n tempButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n updateButtonState(buyItems, sellItems);\n }\n });\n }\n\n Button returnGameButton = new Button(\"Back to Game Menu\");\n returnGameButton.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n public void handle(MouseEvent event) {\n stage.close();\n startTimer();\n }\n });\n canvas.setPrefSize(1000, 400);\n winLabel.relocate(123, 30);\n returnGameButton.relocate(80, 200);\n canvas.getChildren().addAll(winLabel, returnGameButton);\n stage.setScene(new Scene(canvas, 1000, 400));\n stage.sizeToScene();\n stage.show();\n }", "public void showConsumableVendorScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/VendorSelectedScreen.fxml\"));\n mainScreenController.getSecondaryScreen().getChildren().clear();\n mainScreenController.getSecondaryScreen().getChildren().add((AnchorPane) loader.load());\n \n VendorSelectedScreenController controller = loader.getController();\n controller.setGame(this, gameData.getConsumableVendor());\n }catch(IOException e){\n }\n }", "private void populateSprinklerStatus()\n\t{\n\t\t//get data\n\t\tSprinkler newSprinkler=sprinklerService.getSprinklerByName(selectedId);\n\t\t\n\t\tchkFunctional.setVisible(true);\n\t\tbtnSave.setVisible(true);\n\t\t//btnCancel.setVisible(true);\n\t\t\n\t\tif(newSprinkler.isFunctional())\n\t\t{\n\t\t\tchkFunctional.setSelected(true);//checks functional checkbox.\n\t\t\taddSetting=new AddSetting(selectedId, isSprinklerSelected);\n\t\t\taddSetting.setScheduleListener(new ScheduleListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void scheduleAdded() {\n\t\t\t\t\t// refresh Schedule panel\n\t\t\t\t\tSystem.out.println(\"1.\"+selectedId);\n\t\t\t\t\tschedulePane.removeAll();\n\t\t\t\t\tschedulePane.add(new Schedule(selectedId, isSprinklerSelected));\n\t\t\t\t\tschedulePane.validate();\n\t\t\t\t\tschedulePane.repaint();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t//settingPane.removeAll();\n\t\t\tsettingPane.remove(1);\n\t\t\tsettingPane.add(addSetting, 1);\n\t\t\taddSetting.setVisible(true);\n\t\t\t//newWeek.setVisible(true);\n\t\t\tschedule.setVisible(true);\n\t\t\t\n\t\t\tif(newSprinkler.getSprinklerStatus().equals(\"OFF\"))\n\t\t\t{\n\t\t\t\t//if sprinkler is off, show ON option \n\t\t\t\t////chkOff.setSelected(true);\n\t\t\t\tbtnOff.setVisible(false);//chkOff.setVisible(false);\n\t\t\t\tbtnOn.setVisible(true);//chkOn.setSelected(false);\n\t\t\t\t//chkOn.setVisible(true);\n\t\t\t\t\n\t\t\t\t//show status as text\n\t\t\t\tlblStatus.setText(\"Status:OFF\");\n\t\t\t\t//show 'off' icon \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(newSprinkler.getSprinklerStatus().equals(\"ON\"))\n\t\t\t{\n\t\t\t\t//if sprinkler is on, show OFF option \n\t\t\t\tbtnOff.setVisible(true);//chkOff.setSelected(false);\n\t\t\t\tbtnOn.setVisible(false);//chkOff.setVisible(true);\n\t\t\t\t////chkOn.setSelected(true);\n\t\t\t\t//chkOn.setVisible(false);\n\t\t\t\t//show status as text\n\t\t\t\tlblStatus.setText(\"Status:ON\");\n\t\t\t\t//show 'on' icon \n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse//sprinkler is not functional\n\t\t{\n\t\t\t//uncheck functional checkbox\n\t\t\tchkFunctional.setSelected(false);\n\t\t\t//lblstatus=off and not functional\n\t\t\tlblStatus.setText(\"Status:OFF, Not Functional\");\n\t\t\t//icon=not functional image\n\t\t\t\n\t\t\t//disable add settings/weekly schedule panel\n\t\t\taddSetting.setVisible(false);\n\t\t\t//newWeek.setVisible(false);\n\t\t\tschedule.setVisible(false);\n\t\t\t//only the functional checkbox and save button will be accessible\n\t\t\tbtnOff.setVisible(false);//chkOn.setVisible(false);\n\t\t\tbtnOn.setVisible(false);//chkOff.setVisible(false);\n\n\t\t}\n\t}", "@Override\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tString name = ((JList) e.getSource()).getName();\n\t\tif (name.equals(\"pred\")){\n\t\t\tint selected = displayPred.getSelectedIndex();\n\t\t\tif (selected == -1)\n\t\t\t\tselected = 0;\n\t\t\tString loc = predParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tint selected = displayPrey.getSelectedIndex();\n\t\t\tString loc = preyParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t}\n\t}", "private void PLAYERS_ComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(PLAYERS_ComboBox1.getSelectedIndex() == 1)\n Machin_playin = true;\n else\n Machin_playin = false;\n \n }", "public void actionPerformed(ActionEvent e) \r\n\t\t\t{\n\t\t\t\tIngredient tempObject = (Ingredient) comboBox_IngredientsDropDown.getSelectedItem();\r\n\t\t\t\ttextField_IngredientName.setText(tempObject.getName());\t//gets ingredient name\r\n\t\t\t\ttextField_QuantityLevel.setText(\"\" + tempObject.getSupplyLevels());\t//gets ingredient supply level\r\n\t\t\t}", "private void triggerDropItem(double percentage) {\n if (isDropped(percentage)) {\n String name;\n int tar = rd.nextInt(6);\n switch (tar) { // 7 is the total type of building card\n case 0:\n name = \"Sword\";\n break;\n case 1:\n name = \"Stake\";\n break;\n case 2:\n name = \"Staff\";\n break;\n case 3:\n name = \"Shield\";\n break;\n case 4:\n name = \"Helmet\";\n break;\n case 5:\n name = \"Armour\";\n break;\n default:\n return;\n }\n loadItem(name);\n }\n }", "@FXML\n\tpublic void useItem(ActionEvent event){\n\t\t\tString itemName=\"\";\n\t\t\titemName = itemselect.getText();\n\t\t\n\t\t\tif(itemName.equals(\"\")) {\t// Checks if selected item is blank\n\t\t\t\n\t\t\t\tevents.appendText(\"Select an item from the Inventory box before clicking this button!\\n\");\t\n\t\t\t\treturn;\n\t\t\t\n\t\t\t} else {\t// Begins getting item information\n\t\t\t\tItem i;\n\t\t\t\tint x;\n\t\t\t\ti=Item.getItem(ItemList, itemName);\t// Get item from the item list\n\t\t\t\t\n\t\t\t\tif(i == null) {\t// Check if the item isnt found in the item list\n\t\t\t\t\t\n\t\t\t\t\tevents.appendText(\"Item not Found!\\n\");\n\t\t\t\t\titemselect.setText(\"\");\n\t\t\t\t\titemStats.setText(\"\");\n\t\t\t\t} else {\t// Check what type of item was used\n\t\t\t\t\tif(i.getStat().equals(\"HP\")) {\n\t\t\t\t\t\tint y=p.getHP()+i.getChange();\n\t\t\t\t\t\tif(y>p.getMaxHP()) {\n\t\t\t\t\t\t\tp.setHP(p.getMaxHP());\n\t\t\t\t\t\t\tevents.appendText(\"Health Restored to Full!\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tp.setHP(y);\n\t\t\t\t\t\tevents.appendText(\"Health Restored by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tcurrentHp.setText(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t\t}else if(i.getStat().equals(\"DMG\")) {\n\t\t\t\t\tp.setDMG(p.getDMG()+i.getChange());\n\t\t\t\t\tgdmg.setText(\"\"+p.getDMG());\n\t\t\t\t\tevents.appendText(\"Damage Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t}else {\n\t\t\t\t\tif(p.getEV()+i.getChange()>100) {\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + (100-p.getEV())+\", Max Evasion is 100\\n\");\n\t\t\t\t\t\tp.setEV(100);\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t}else {\n\t\t\t\t\t\tp.setEV(p.getEV()+i.getChange());\n\t\t\t\t\t\tgev.setText(\"\"+p.getEV());\n\t\t\t\t\t\tevents.appendText(\"EV Increased by \" + i.getChange()+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Remove the item from the inventory\n\t\t\t\tx=Inventory.indexOf(i);\n\t\t\t\tInventory.remove(x);\n\t\t\t\tinventoryList.getItems().remove(x);\n\t\t\t\titemselect.setText(\"\");\n\t\t\t\titemStats.setText(\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t}", "public void chooseCards() {\n\n if (availableGods.isEmpty()) {\n createChallenger();\n notifyChoose(cardsChosen, this.getGodListNames(), this.getCurrentTurn().getCurrentPlayer().getNickname());\n } else {\n notifyChoose(true, this.getGodListNames(), this.getCurrentTurn().getCurrentPlayer().getNickname());\n }\n\n }", "@Override\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tComands comand = null;\n\t\t\tswitch(selected){\n\t\t\tcase 0: comand = Comands.DROP_ITEM_0; break;\n\t\t\tcase 1: comand = Comands.DROP_ITEM_1; break;\n\t\t\tcase 2: comand = Comands.DROP_ITEM_2; break;\n\t\t\tcase 3: comand = Comands.DROP_ITEM_3; break;\n\t\t\tcase 4: comand = Comands.DROP_ITEM_4; break;\n\t\t\tcase 5: comand = Comands.DROP_ITEM_5; break;\n\t\t\tcase 6: comand = Comands.DROP_ITEM_6; break;\n\t\t\tcase 7: comand = Comands.DROP_ITEM_7; break;\n\t\t\tcase 8: comand = Comands.DROP_ITEM_8; break;\n\t\t\tcase 9: comand = Comands.DROP_ITEM_9; break;\n\t\t\tdefault: return;\n\t\t\t}\n\t\t\ttry{\n\t\t\t\tcomms.write(comand);\n\t\t\t}\n\t\t\tcatch(IOException err){\n\t\t\t\tSystem.out.println(err);\n\t\t\t}\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString input = (String)comboBoxProductTitle.getSelectedItem();\n\t\t\t\t//String input = productTitleTextField.getText();\n\t\t\t\t\n\t\t\t\tif(input.trim().equals(\"Select\")){ \n\t\t\t\t\tproductTextArea.setText(\"\");\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select Product Title From Drop Down Menu\");\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tproductTextArea.setText(product.viewProductByTitle(input, products));\t//viewInvoiceByCustomer() is in the Invoice class\n\t\t\t\t\tproductTextArea.setCaretPosition(0);\n\t\t\t\t\tlistOfProdIds.setSelectedItem(\"Select\");\n\t\t\t\t\tlistofProductTitle.setSelectedItem(\"Select\");\n\t\t\t\t\tlistOfProductAuthor.setSelectedItem(\"Select\");\n\t\t\t\t\tpriceRange.clearSelection();\n\t\t\t\t\tquantity.clearSelection();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif ((Integer.parseInt((String) AISelect.getSelectedItem()) + Integer.parseInt((String) humanSelect.getSelectedItem())) > 1) {\n\t\t\tnames = new String[currentNumberofPlayers];\n\n\t\t\tfor (int i = 0; i < currentNumberofPlayers; i++) {\n\t\t\t\tif (nameFields[i].getText().length() > 10) {\n\t\t\t\t\tnames[i] = nameFields[i].getText().substring(0, 10);\n\t\t\t\t}else {\n\t\t\t\t\tnames[i] = nameFields[i].getText();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (comboBox.getSelectedItem().equals(\"Sand\")) {\n\t\t\t\tphysics.Friction.Sand();\n\t\t\t\tMain.manualTanks = Integer.parseInt((String) humanSelect.getSelectedItem());;\n\t\t\t\tMain.AITanks = Integer.parseInt((String) AISelect.getSelectedItem());\n\t\t\t\tMain.startSand(names);\n\t\t\t\t\n\t\t\t}else if (comboBox.getSelectedItem().equals(\"Snow\")) {\n\t\t\t\tphysics.Friction.Snow();\n\t\t\t\tMain.manualTanks = Integer.parseInt((String) humanSelect.getSelectedItem());;\n\t\t\t\tMain.AITanks = Integer.parseInt((String) AISelect.getSelectedItem());\n\t\t\t\tMain.startSnow(names);\n\t\t\t\t\n\t\t\t} else if (comboBox.getSelectedItem().equals(\"Grasslands\")) {\n\t\t\t\tphysics.Friction.Forest();\n\t\t\t\tMain.manualTanks = Integer.parseInt((String) humanSelect.getSelectedItem());;\n\t\t\t\tMain.AITanks = Integer.parseInt((String) AISelect.getSelectedItem());\n\t\t\t\tMain.startForrest(names);\n\t\t\t\t\n\t\t\t}\n\n\t\t\tMain.setTickerPause(false);\n\t\t}\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n DiscardAmmoOrPowerUpToPayTargeting discardAmmoOrPowerUpToPayTargeting = new DiscardAmmoOrPowerUpToPayTargeting(\"\", event.getNicknameInvolved());\n switch (e.getActionCommand()){\n case \"BlueAmmo\":\n discardAmmoOrPowerUpToPayTargeting.setBlueAmmo(true);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n\n case \"RedAmmo\":\n discardAmmoOrPowerUpToPayTargeting.setRedAmmo(true);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n\n case \"YellowAmmo\":\n discardAmmoOrPowerUpToPayTargeting.setYellowAmmo(true);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n\n default:\n\n String[] nameAndColor = e.getActionCommand().split(\",\");\n for(ServerEvent.AliasCard card : mainFrame.getRemoteView().getMyPlayerBoardView().getPowerUpCardsDeck()){\n if(card.getName().equals(nameAndColor[0])&& card.getColor().toString().equalsIgnoreCase(nameAndColor[1])) {\n discardAmmoOrPowerUpToPayTargeting.setPowerUpCard(card);\n dialog.setVisible(false);\n mainFrame.getRemoteView().notify(discardAmmoOrPowerUpToPayTargeting);\n break;\n }\n }\n }\n\n }", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgsv.startSelectState();\n\t\t\t}", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "public static void getBattleChoice() {\n \t\tMainGame.display.disp(\"What do you want to do?:\");\r\n \t\tMainGame.display.Enable(MainGame.display.attack, MainGame.display.defend, MainGame.display.heal);\r\n \t}", "@Override\n public void actionPerformed(ActionEvent e) {\n int selection = statsTable.getSelectedRow();\n if(selection != -1) {\n int modelIndex = statsTable.getRowSorter().convertRowIndexToModel(selection);\n String str = (String) statsTable.getModel().getValueAt(modelIndex, 0);\n int index = map.getSettlement(str);\n Settlement settlementSelected = map.getSettlements()[index];\n\n int numberOfSick = (int) (settlementSelected.getNumOfHealthy() * 0.1);\n\n for (int i = 0; i < numberOfSick; i++) {\n Person currentHealthy = settlementSelected.getHealthyPerson().get(0); // take the first person Healthy in the list of HealthyPeople\n settlementSelected.isSick(currentHealthy, Main.randomVirus(map));\n }\n statsTable.repaint();\n mainWin.repaint();\n }\n else{\n JOptionPane.showMessageDialog(new JFrame(), \"Select a row!\", \"Statistics Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }" ]
[ "0.60132885", "0.59634256", "0.58919376", "0.5857334", "0.58231115", "0.5814316", "0.57740945", "0.57672536", "0.5763438", "0.5730481", "0.57288796", "0.5720916", "0.5695653", "0.56766415", "0.5644863", "0.56396544", "0.56222224", "0.56165385", "0.5601179", "0.5574488", "0.5569184", "0.5547986", "0.5547391", "0.55321586", "0.55234736", "0.5518773", "0.5438464", "0.5435421", "0.54152834", "0.5410041", "0.5409596", "0.54008675", "0.5387648", "0.53793734", "0.53793454", "0.5371001", "0.5366086", "0.5358492", "0.53530717", "0.5349842", "0.5343668", "0.5338967", "0.5338678", "0.5337026", "0.5334993", "0.5332153", "0.5325034", "0.53199387", "0.5318482", "0.53061485", "0.5301838", "0.53015125", "0.529595", "0.52941346", "0.5286966", "0.5286232", "0.52717733", "0.52717054", "0.5265863", "0.5260023", "0.5257074", "0.5254778", "0.5252075", "0.525011", "0.52487725", "0.52431697", "0.5241741", "0.5241465", "0.52367723", "0.52231646", "0.52226555", "0.5221541", "0.521411", "0.5212886", "0.5212815", "0.5210791", "0.52107805", "0.52069384", "0.52028877", "0.5201541", "0.5201524", "0.5199549", "0.5198505", "0.5187595", "0.51853997", "0.5177288", "0.5176431", "0.5176268", "0.5174369", "0.516942", "0.5169288", "0.5166902", "0.5166318", "0.51656103", "0.5164015", "0.5161426", "0.51602525", "0.5160197", "0.5159947", "0.51583457" ]
0.5296129
52
TODO Autogenerated method stub
@Override public String getInfo() { return "Jersey + Spring!!!"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Arg1 : String URL Arg2 : String MAC
@Override protected Integer doInBackground(String... bundle) { try{ URL url = new URL(bundle[0]); URLConnection conn = url.openConnection(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(conn.getInputStream()); NodeList nodes = doc.getElementsByTagName("document"); NodeList titles = nodes.item(0).getChildNodes(); for (int i = 0; i < titles.getLength(); i++) { if(titles.item(i) instanceof Element){ Element element = (Element) titles.item(i); if(element.getAttribute("addrtype").equals("mac")){ nbKoters ++; if(element.getAttribute("addr").equals(bundle[1])){ Log.i(TAG,"You're Mac has been matched\nYou'll be redirected"); }else{ Log.i(TAG, "You're MAC don't match\nPlease use this app in a KotNekted house!"); } Log.i(TAG, "MAC : " + element.getAttribute("addr")); } } } }catch(Exception e){ e.printStackTrace(); Log.i(TAG,bundle[0]+ " file access issues"); } return nbKoters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DownloadInfo mo54422b(String str, String str2);", "protected boolean sameFile(URL paramURL1, URL paramURL2) {\n/* 400 */ if (paramURL1.getProtocol() != paramURL2.getProtocol() && (paramURL1\n/* 401 */ .getProtocol() == null || \n/* 402 */ !paramURL1.getProtocol().equalsIgnoreCase(paramURL2.getProtocol()))) {\n/* 403 */ return false;\n/* */ }\n/* */ \n/* 406 */ if (paramURL1.getFile() != paramURL2.getFile() && (paramURL1\n/* 407 */ .getFile() == null || !paramURL1.getFile().equals(paramURL2.getFile()))) {\n/* 408 */ return false;\n/* */ }\n/* */ \n/* */ \n/* 412 */ int i = (paramURL1.getPort() != -1) ? paramURL1.getPort() : paramURL1.handler.getDefaultPort();\n/* 413 */ int j = (paramURL2.getPort() != -1) ? paramURL2.getPort() : paramURL2.handler.getDefaultPort();\n/* 414 */ if (i != j) {\n/* 415 */ return false;\n/* */ }\n/* */ \n/* 418 */ if (!hostsEqual(paramURL1, paramURL2)) {\n/* 419 */ return false;\n/* */ }\n/* 421 */ return true;\n/* */ }", "static String m1377m(String str, String str2) {\n return str2 == null ? str.length() > 0 ? str : null : Uri.parse(\"http://hostname/?\" + str).getQueryParameter(str2);\n }", "public static void main(String[] args) {\n\t\tString url = \"http://hell.com/?pw=8936,id='fsfds'\";\n\t\t\n\t\tint location = url.indexOf(\"pw=\");\n\t\tString str2 = url.substring(location+7);\n\t\tString str1 = url.substring(0,location+3);\n\t\tSystem.out.println(str1+\"****\"+str2);\n\t\t\n\t}", "@Test\n public void doRequestURL() throws IOException, NoSuchAlgorithmException, KeyManagementException {\n doRequest(\"https://login.cloud.huawei.com/oauth2/v2/token\");\n\n\n //doRequestWithOutHttps(\"https://124.74.46.118:7012/business/service\");\n //doRequestWithOutHttpsPool(\"https://124.74.46.118:7012/business/service\");\n }", "public static void m11990a(String str, String str2) {\n HashMap hashMap = new HashMap();\n hashMap.put(\"url\", str);\n hashMap.put(\"error_msg\", str2);\n C3172e.m11999a(m11988a(\"ttlive_image_load_status\"), 1, 0, (Map<String, Object>) hashMap);\n C3172e.m11999a(m11991b(\"ttlive_image_load_status\"), 1, 0, (Map<String, Object>) hashMap);\n }", "public java.lang.String getUser_mac();", "public static void main(String h[]) throws IOException\n {\n try {\n String link_url = \"https://www.facebook.com\";\n URL obj1 = new URL(link_url); //URL Connection Created...\n HttpURLConnection con1 = (HttpURLConnection) obj1.openConnection(); //Http URL Connection Created...\n System.out.println(\"https://www.facebook.com\");\n System.out.println(\"Connection Response Message : \");\n con1.disconnect();\n }\n catch (Exception e) {\n System.out.println( e);\n }\n }", "public static void main(String[] args) {\n\t\tFistURLTest test = new FistURLTest();\n\t\tString url = \"http://bbs.hupu.com/3712591.html\";\n\t\turl = test.changeUrl(url);\n\t\tSystem.out.println(url);\n\t}", "public static void main(String[] args) {\n boolean httpUrl = StringUtil.isHttpUrl(\"https://www.bequgexs.com\");\r\n System.out.println(httpUrl);\r\n\t}", "public final void mo15948g(HttpURLConnection httpURLConnection, @Nullable String str, @NonNull String str2) {\n try {\n JSONObject jSONObject = new JSONObject();\n jSONObject.put(\"fid\", str);\n jSONObject.put(\"appId\", str2);\n jSONObject.put(\"authVersion\", \"FIS_v2\");\n jSONObject.put(\"sdkVersion\", \"a:16.3.5\");\n m7911i(httpURLConnection, jSONObject.toString().getBytes(\"UTF-8\"));\n } catch (JSONException e) {\n throw new IllegalStateException(e);\n }\n }", "void gotMyMac();", "protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) {\n/* 126 */ String str1 = paramURL.getProtocol();\n/* 127 */ String str2 = paramURL.getAuthority();\n/* 128 */ String str3 = paramURL.getUserInfo();\n/* 129 */ String str4 = paramURL.getHost();\n/* 130 */ int i = paramURL.getPort();\n/* 131 */ String str5 = paramURL.getPath();\n/* 132 */ String str6 = paramURL.getQuery();\n/* */ \n/* */ \n/* 135 */ String str7 = paramURL.getRef();\n/* */ \n/* 137 */ boolean bool1 = false;\n/* 138 */ boolean bool2 = false;\n/* */ \n/* */ \n/* */ \n/* 142 */ if (paramInt1 < paramInt2) {\n/* 143 */ int k = paramString.indexOf('?');\n/* 144 */ bool2 = (k == paramInt1) ? true : false;\n/* 145 */ if (k != -1 && k < paramInt2) {\n/* 146 */ str6 = paramString.substring(k + 1, paramInt2);\n/* 147 */ if (paramInt2 > k)\n/* 148 */ paramInt2 = k; \n/* 149 */ paramString = paramString.substring(0, k);\n/* */ } \n/* */ } \n/* */ \n/* 153 */ int j = 0;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 159 */ boolean bool3 = (paramInt1 <= paramInt2 - 4 && paramString.charAt(paramInt1) == '/' && paramString.charAt(paramInt1 + 1) == '/' && paramString.charAt(paramInt1 + 2) == '/' && paramString.charAt(paramInt1 + 3) == '/') ? true : false;\n/* 160 */ if (!bool3 && paramInt1 <= paramInt2 - 2 && paramString.charAt(paramInt1) == '/' && paramString\n/* 161 */ .charAt(paramInt1 + 1) == '/') {\n/* 162 */ paramInt1 += 2;\n/* 163 */ j = paramString.indexOf('/', paramInt1);\n/* 164 */ if (j < 0 || j > paramInt2) {\n/* 165 */ j = paramString.indexOf('?', paramInt1);\n/* 166 */ if (j < 0 || j > paramInt2) {\n/* 167 */ j = paramInt2;\n/* */ }\n/* */ } \n/* 170 */ str4 = str2 = paramString.substring(paramInt1, j);\n/* */ \n/* 172 */ int k = str2.indexOf('@');\n/* 173 */ if (k != -1) {\n/* 174 */ if (k != str2.lastIndexOf('@')) {\n/* */ \n/* 176 */ str3 = null;\n/* 177 */ str4 = null;\n/* */ } else {\n/* 179 */ str3 = str2.substring(0, k);\n/* 180 */ str4 = str2.substring(k + 1);\n/* */ } \n/* */ } else {\n/* 183 */ str3 = null;\n/* */ } \n/* 185 */ if (str4 != null) {\n/* */ \n/* */ \n/* 188 */ if (str4.length() > 0 && str4.charAt(0) == '[') {\n/* 189 */ if ((k = str4.indexOf(']')) > 2) {\n/* */ \n/* 191 */ String str = str4;\n/* 192 */ str4 = str.substring(0, k + 1);\n/* */ \n/* 194 */ if (!IPAddressUtil.isIPv6LiteralAddress(str4.substring(1, k))) {\n/* 195 */ throw new IllegalArgumentException(\"Invalid host: \" + str4);\n/* */ }\n/* */ \n/* */ \n/* 199 */ i = -1;\n/* 200 */ if (str.length() > k + 1) {\n/* 201 */ if (str.charAt(k + 1) == ':') {\n/* 202 */ k++;\n/* */ \n/* 204 */ if (str.length() > k + 1) {\n/* 205 */ i = Integer.parseInt(str.substring(k + 1));\n/* */ }\n/* */ } else {\n/* 208 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ }\n/* */ } else {\n/* */ \n/* 213 */ throw new IllegalArgumentException(\"Invalid authority field: \" + str2);\n/* */ } \n/* */ } else {\n/* */ \n/* 217 */ k = str4.indexOf(':');\n/* 218 */ i = -1;\n/* 219 */ if (k >= 0) {\n/* */ \n/* 221 */ if (str4.length() > k + 1) {\n/* 222 */ i = Integer.parseInt(str4.substring(k + 1));\n/* */ }\n/* 224 */ str4 = str4.substring(0, k);\n/* */ } \n/* */ } \n/* */ } else {\n/* 228 */ str4 = \"\";\n/* */ } \n/* 230 */ if (i < -1) {\n/* 231 */ throw new IllegalArgumentException(\"Invalid port number :\" + i);\n/* */ }\n/* 233 */ paramInt1 = j;\n/* */ \n/* */ \n/* 236 */ if (str2 != null && str2.length() > 0) {\n/* 237 */ str5 = \"\";\n/* */ }\n/* */ } \n/* 240 */ if (str4 == null) {\n/* 241 */ str4 = \"\";\n/* */ }\n/* */ \n/* */ \n/* 245 */ if (paramInt1 < paramInt2) {\n/* 246 */ if (paramString.charAt(paramInt1) == '/') {\n/* 247 */ str5 = paramString.substring(paramInt1, paramInt2);\n/* 248 */ } else if (str5 != null && str5.length() > 0) {\n/* 249 */ bool1 = true;\n/* 250 */ int k = str5.lastIndexOf('/');\n/* 251 */ String str = \"\";\n/* 252 */ if (k == -1 && str2 != null) {\n/* 253 */ str = \"/\";\n/* */ }\n/* 255 */ str5 = str5.substring(0, k + 1) + str + paramString.substring(paramInt1, paramInt2);\n/* */ } else {\n/* */ \n/* 258 */ String str = (str2 != null) ? \"/\" : \"\";\n/* 259 */ str5 = str + paramString.substring(paramInt1, paramInt2);\n/* */ } \n/* 261 */ } else if (bool2 && str5 != null) {\n/* 262 */ int k = str5.lastIndexOf('/');\n/* 263 */ if (k < 0)\n/* 264 */ k = 0; \n/* 265 */ str5 = str5.substring(0, k) + \"/\";\n/* */ } \n/* 267 */ if (str5 == null) {\n/* 268 */ str5 = \"\";\n/* */ }\n/* 270 */ if (bool1) {\n/* */ \n/* 272 */ while ((j = str5.indexOf(\"/./\")) >= 0) {\n/* 273 */ str5 = str5.substring(0, j) + str5.substring(j + 2);\n/* */ }\n/* */ \n/* 276 */ j = 0;\n/* 277 */ while ((j = str5.indexOf(\"/../\", j)) >= 0) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 284 */ if (j > 0 && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0 && str5\n/* 285 */ .indexOf(\"/../\", paramInt2) != 0) {\n/* 286 */ str5 = str5.substring(0, paramInt2) + str5.substring(j + 3);\n/* 287 */ j = 0; continue;\n/* */ } \n/* 289 */ j += 3;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 294 */ j = str5.indexOf(\"/..\");\n/* 295 */ while (str5.endsWith(\"/..\") && (paramInt2 = str5.lastIndexOf('/', j - 1)) >= 0) {\n/* 296 */ str5 = str5.substring(0, paramInt2 + 1);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 302 */ if (str5.startsWith(\"./\") && str5.length() > 2) {\n/* 303 */ str5 = str5.substring(2);\n/* */ }\n/* */ \n/* 306 */ if (str5.endsWith(\"/.\")) {\n/* 307 */ str5 = str5.substring(0, str5.length() - 1);\n/* */ }\n/* */ } \n/* 310 */ setURL(paramURL, str1, str4, i, str2, str3, str5, str6, str7);\n/* */ }", "void mo29850a(zzxz zzxz, String str, String str2) throws RemoteException;", "@Test\n\tpublic void test_002() {\n\t\tJdProgramRequestParms.put(\"U$FUNZ\", new StringValue(\"URL\"));\n\t\tJdProgramRequestParms.put(\"U$METO\", new StringValue(\"HTTP\"));\n\t\tJdProgramRequestParms.put(\"U$SVARSK\", new StringValue(\"malformed_url\"));\n\n\t\tJdProgramResponseParms = JdProgram.execute(javaSystemInterface, JdProgramRequestParms);\n\t\tassertTrue(JdProgramResponseParms.get(2).asString().getValue().startsWith(\"*ERROR\"));\n\t\tassertTrue(JdProgramResponseParms.get(2).asString().getValue().contains(\"malformed_url\"));\n\t}", "Uri mo1686a();", "public String testGet(String arg1) {\n HttpClient client = new DefaultHttpClient();\n HttpGet get = new HttpGet(URL);\n\n try {\n HttpResponse response = client.execute(get);\n HttpEntity resEntity = response.getEntity();\n return EntityUtils.toString(resEntity);\n } catch (Exception e) { }\n\n return null;\n }", "public void checkOdlOpenflowMacAddress2(String x) throws SnmpStatusException;", "public final void mo6817a(String str) {\n HttpURLConnection httpURLConnection;\n try {\n String valueOf = String.valueOf(str);\n C0633h.m5664a(valueOf.length() == 0 ? new String(\"Pinging URL: \") : \"Pinging URL: \".concat(valueOf));\n httpURLConnection = (HttpURLConnection) new URL(str).openConnection();\n C0341h.m5274a();\n String str2 = this.f8968a;\n httpURLConnection.setConnectTimeout(Felica.MAX_TIMEOUT);\n httpURLConnection.setInstanceFollowRedirects(true);\n httpURLConnection.setReadTimeout(Felica.MAX_TIMEOUT);\n if (str2 != null) {\n httpURLConnection.setRequestProperty(\"User-Agent\", str2);\n }\n httpURLConnection.setUseCaches(false);\n C0632g gVar = new C0632g();\n gVar.mo6813a(httpURLConnection, (byte[]) null);\n int responseCode = httpURLConnection.getResponseCode();\n gVar.mo6812a(httpURLConnection, responseCode);\n if (responseCode < 200) {\n }\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 65);\n sb.append(\"Received non-success response code \");\n sb.append(responseCode);\n sb.append(\" from pinging URL: \");\n sb.append(str);\n C0633h.m5672d(sb.toString());\n httpURLConnection.disconnect();\n } catch (IndexOutOfBoundsException e) {\n String message = e.getMessage();\n StringBuilder sb2 = new StringBuilder(String.valueOf(str).length() + 32 + String.valueOf(message).length());\n sb2.append(\"Error while parsing ping URL: \");\n sb2.append(str);\n sb2.append(\". \");\n sb2.append(message);\n C0633h.m5672d(sb2.toString());\n } catch (IOException e2) {\n String message2 = e2.getMessage();\n StringBuilder sb3 = new StringBuilder(String.valueOf(str).length() + 27 + String.valueOf(message2).length());\n sb3.append(\"Error while pinging URL: \");\n sb3.append(str);\n sb3.append(\". \");\n sb3.append(message2);\n C0633h.m5672d(sb3.toString());\n } catch (RuntimeException e3) {\n String message3 = e3.getMessage();\n StringBuilder sb4 = new StringBuilder(String.valueOf(str).length() + 27 + String.valueOf(message3).length());\n sb4.append(\"Error while pinging URL: \");\n sb4.append(str);\n sb4.append(\". \");\n sb4.append(message3);\n C0633h.m5672d(sb4.toString());\n } catch (Throwable th) {\n httpURLConnection.disconnect();\n throw th;\n }\n }", "protected boolean hostsEqual(URL paramURL1, URL paramURL2) {\n/* 461 */ InetAddress inetAddress1 = getHostAddress(paramURL1);\n/* 462 */ InetAddress inetAddress2 = getHostAddress(paramURL2);\n/* */ \n/* 464 */ if (inetAddress1 != null && inetAddress2 != null) {\n/* 465 */ return inetAddress1.equals(inetAddress2);\n/* */ }\n/* 467 */ if (paramURL1.getHost() != null && paramURL2.getHost() != null) {\n/* 468 */ return paramURL1.getHost().equalsIgnoreCase(paramURL2.getHost());\n/* */ }\n/* 470 */ return (paramURL1.getHost() == null && paramURL2.getHost() == null);\n/* */ }", "private Uri m1180a(Uri uri, String str, String str2) throws UnsupportedOperationException {\n String uri2 = uri.toString();\n int indexOf = uri2.indexOf(\"&adurl\");\n if (indexOf == -1) {\n indexOf = uri2.indexOf(\"?adurl\");\n }\n return indexOf != -1 ? Uri.parse(new StringBuilder(uri2.substring(0, indexOf + 1)).append(str).append(\"=\").append(str2).append(\"&\").append(uri2.substring(indexOf + 1)).toString()) : uri.buildUpon().appendQueryParameter(str, str2).build();\n }", "public static void main(String[] args) {\n\t\tString myUrl = \"http://github.com/abhi20aug\";\n\t\ttry {\n\t\t\tURL newUrl = new URL(myUrl);\n\t\t\tSystem.out.println(\"simple url\"+newUrl.toString());\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "void openLinkInSystemBrowser(String url, int errorMsg);", "public void setUser_mac(java.lang.String newUser_mac);", "@Given(\"^User Clicks on url \\\"([^\\\"]*)\\\"$\")\n\tpublic void user_Clicks_on_url(String arg1) throws Throwable {\n\t\tthis.driver.navigate().to(\"https://wallethub.com/profile/test-insurance-company-13732055i\");\n\t}", "public static void main(String args[]) throws Exception\n {\n URL myurl = new URL(args[0]);\n // get inputstream of the URL\n InputStream is = myurl.openStream();\n\n int ch;\n\n while ((ch = is.read()) != -1)\n System.out.print( (char)ch);\n }", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public static URL buildurl(String url1)\n {\n URL url = null;\n try\n {\n url = new URL(url1.toString());\n\n }\n catch(MalformedURLException e)\n {\n e.printStackTrace();\n }\n return url;\n }", "@Then(\"^verify the login-one \\\"([^\\\"]*)\\\"$\")\n\tpublic void verify_the_login_one(String arg1) throws InterruptedException {\n\t\tThread.sleep(2000);\n\t\tAssert.assertEquals(arg1, driver.getCurrentUrl());\n\t \n\t}", "HttpURLConnection mo120621a(Uri uri) throws IOException;", "public String mopUrl2RealUrl(String url) {\n LOG.mo8825d(\"url \" + url);\n String ret = url.substring(6);\n if (StringUtils.isEmpty(this.mTerminalid)) {\n this.mTerminalid = SystemProperties.get(\"ro.serialno\");\n }\n String user = SWSysProp.getStringParam(\"user_name\", XmlPullParser.NO_NAMESPACE);\n LOG.mo8825d(\"user \" + user);\n String curOisUrl = this.mSdkRemoteManager.getCurOisUrl();\n LOG.mo8825d(\"curOisUrl \" + curOisUrl);\n String ret2 = \"http://\" + curOisUrl.replace(\"5001\", \"5000/\") + ret + \".m3u8?protocal=hls&user=\" + user + \"&tid=\" + this.mTerminalid + \"&sid=\" + ((MediaBean) this.mAllChannelList.get(this.clickIndex)).getId() + \"&type=stb&token=\" + this.mSdkRemoteManager.getOisToken();\n LOG.mo8825d(\"mopUrl2RealUrl \" + ret2);\n return ret2;\n }", "protected void setURL(URL paramURL, String paramString1, String paramString2, int paramInt, String paramString3, String paramString4, String paramString5, String paramString6, String paramString7) {\n/* 538 */ if (this != paramURL.handler) {\n/* 539 */ throw new SecurityException(\"handler for url different from this handler\");\n/* */ }\n/* 541 */ if (paramString2 != null && paramURL.isBuiltinStreamHandler(this)) {\n/* 542 */ String str = IPAddressUtil.checkHostString(paramString2);\n/* 543 */ if (str != null) throw new IllegalArgumentException(str);\n/* */ \n/* */ } \n/* 546 */ paramURL.set(paramURL.getProtocol(), paramString2, paramInt, paramString3, paramString4, paramString5, paramString6, paramString7);\n/* */ }", "public static void main(String[] args) {\n String redirectUrl1 = DownloadUtil.getRedirectUrl(\"http://www.pc6.com/down.asp?id=68253\");\n String redirectUrl2 = DownloadUtil.getRedirectUrl(redirectUrl1);\n String redirectUrl3 = DownloadUtil.getRedirectUrl(redirectUrl2);\n System.out.println(redirectUrl1);\n System.out.println(redirectUrl2);\n System.out.println(redirectUrl3);\n }", "public String c(String str) {\n String str2;\n String str3 = null;\n if (TextUtils.isEmpty(str)) {\n return null;\n }\n try {\n String host = Uri.parse(str).getHost();\n String aBTestValue = TUnionTradeSDK.getInstance().getABTestService().getABTestValue(\"config\");\n if (!TextUtils.isEmpty(aBTestValue)) {\n String optString = new JSONObject(aBTestValue).optString(\"domain\");\n TULog.d(\"abTestRequestUrl, url: \" + str + \" host: \" + host + \" domains: \" + optString, new Object[0]);\n if (!TextUtils.isEmpty(host) && !TextUtils.isEmpty(optString)) {\n JSONArray jSONArray = new JSONArray(optString);\n if (jSONArray.length() > 0) {\n int length = jSONArray.length();\n int i = 0;\n while (true) {\n if (i >= length) {\n break;\n } else if (host.contains(jSONArray.getString(i))) {\n String encode = URLEncoder.encode(str, \"utf-8\");\n try {\n TULog.d(\"abTestRequestUrl, loginJumpUrl :\" + str2, new Object[0]);\n } catch (Exception unused) {\n }\n str3 = str2;\n break;\n } else {\n i++;\n }\n }\n }\n }\n }\n } catch (Exception unused2) {\n }\n return str3;\n }", "private String getHeaderValueImpl(String paramString1, String paramString2) {\n/* */ String str1, str8, str9;\n/* 351 */ char[] arrayOfChar = this.pw.getPassword();\n/* 352 */ boolean bool = this.params.authQop();\n/* 353 */ String str2 = this.params.getOpaque();\n/* 354 */ String str3 = this.params.getCnonce();\n/* 355 */ String str4 = this.params.getNonce();\n/* 356 */ String str5 = this.params.getAlgorithm();\n/* 357 */ this.params.incrementNC();\n/* 358 */ int i = this.params.getNCCount();\n/* 359 */ String str6 = null;\n/* */ \n/* 361 */ if (i != -1) {\n/* 362 */ str6 = Integer.toHexString(i).toLowerCase();\n/* 363 */ int j = str6.length();\n/* 364 */ if (j < 8) {\n/* 365 */ str6 = zeroPad[j] + str6;\n/* */ }\n/* */ } \n/* */ try {\n/* 369 */ str1 = computeDigest(true, this.pw.getUserName(), arrayOfChar, this.realm, paramString2, paramString1, str4, str3, str6);\n/* */ }\n/* 371 */ catch (NoSuchAlgorithmException noSuchAlgorithmException) {\n/* 372 */ return null;\n/* */ } \n/* */ \n/* 375 */ String str7 = \"\\\"\";\n/* 376 */ if (bool) {\n/* 377 */ str7 = \"\\\", nc=\" + str6;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 382 */ if (delimCompatFlag) {\n/* */ \n/* 384 */ str8 = \", algorithm=\\\"\" + str5 + \"\\\"\";\n/* 385 */ str9 = \", qop=\\\"auth\\\"\";\n/* */ } else {\n/* */ \n/* 388 */ str8 = \", algorithm=\" + str5;\n/* 389 */ str9 = \", qop=auth\";\n/* */ } \n/* */ \n/* */ \n/* 393 */ String str10 = this.authMethod + \" username=\\\"\" + this.pw.getUserName() + \"\\\", realm=\\\"\" + this.realm + \"\\\", nonce=\\\"\" + str4 + str7 + \", uri=\\\"\" + paramString1 + \"\\\", response=\\\"\" + str1 + \"\\\"\" + str8;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 400 */ if (str2 != null) {\n/* 401 */ str10 = str10 + \", opaque=\\\"\" + str2 + \"\\\"\";\n/* */ }\n/* 403 */ if (str3 != null) {\n/* 404 */ str10 = str10 + \", cnonce=\\\"\" + str3 + \"\\\"\";\n/* */ }\n/* 406 */ if (bool) {\n/* 407 */ str10 = str10 + str9;\n/* */ }\n/* 409 */ return str10;\n/* */ }", "public login_1_argument(String arg_arg1, String arg_arg2) {\n arg1 = arg_arg1;\n arg2 = arg_arg2;\n }", "@When(\"^User login into application with \\\"([^\\\"]*)\\\" and \\\"([^\\\"]*)\\\"$\")\r\n public void user_login_into_application_with_something_and_something(String strArg1, String strArg2) throws Throwable {\n \tSystem.out.println(strArg1);\r\n \tSystem.out.println(strArg2);\t\r\n \r\n }", "public static void main(String args[]) throws Exception\r\n\t{\n\t\tURL obj = new URL(\"http://facebook.com/login.html\");\t\r\n\t\t\r\n\t\tSystem.out.println(\"Protocol used : \"+obj.getProtocol());\r\n\t\tSystem.out.println(\"Host name : \"+obj.getHost()); \r\n\t\tSystem.out.println(\"File name : \"+obj.getFile());\r\n\t\tSystem.out.println(\"Port number :\"+obj.getPort());\r\n\t\tSystem.out.println(\"Path : \"+obj.getPath());\r\n\t}", "@Override\n\t\tpublic void onGetRGCShareUrlResult(String arg0, int arg1) {\n\n\t\t}", "public void acc3And4(int arg1,int arg2)\n {\n \n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts\"+\"?id=\"+arg1+\"&id=\"+arg2);\n response.then().assertThat().statusCode(200);\n response.prettyPrint();\n \n \n }", "static String hashURL(String url){\n\t\treturn url.replace('/', 's').replace(':','c');\n\t}", "public static String myConnection(String webUrl,String name, String username, String password, String address, String email, String mobile, String id, String imageURL) {//2\n try {\n URL url = new URL(webUrl);\n URLConnection con = url.openConnection();\n con.setDoOutput(true);\n\n\n OutputStreamWriter writer = new OutputStreamWriter(con.getOutputStream());\n\n String data = URLEncoder.encode(\"name\", \"UTF-8\") + \"=\" + URLEncoder.encode(name, \"UTF-8\") + \"&\" +\n URLEncoder.encode(\"username\", \"UTF-8\") + \"=\" + URLEncoder.encode(username, \"UTF-8\") + \"&\" +\n URLEncoder.encode(\"password\", \"UTF-8\") + \"=\" + URLEncoder.encode(password, \"UTF-8\") + \"&\" +\n URLEncoder.encode(\"address\", \"UTF-8\") + \"=\" + URLEncoder.encode(address, \"UTF-8\") + \"&\" +\n URLEncoder.encode(\"email\", \"UTF-8\") + \"=\" + URLEncoder.encode(email, \"UTF-8\") + \"&\" +\n URLEncoder.encode(\"mobile\", \"UTF-8\") + \"=\" + URLEncoder.encode(mobile, \"UTF-8\") + \"&\" +\n URLEncoder.encode(\"id\", \"UTF-8\") + \"=\" + URLEncoder.encode(id, \"UTF-8\") + \"&\" +\n URLEncoder.encode(\"imageURL\", \"UTF-8\") + \"=\" + URLEncoder.encode(imageURL, \"UTF-8\");\n writer.write(data);\n writer.flush();\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));\n StringBuilder sb = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n\n sb.append(line);\n break;\n }\n return sb.toString();\n\n\n } catch (Exception e) {\n\n\n System.out.println(e);\n return \"Error : Check your Connection\";\n\n }\n }", "public static void main(String[] args) {\n String urlStr = URLEncoder.encode(\"疯狂动物城\");\n System.out.println(urlStr);\n String decoder = URLDecoder.decode(urlStr);\n System.out.println(decoder);\n }", "java.lang.String getAgentMac();", "private String urlShort(String url){\n\n\t\treturn null;\n\t}", "String wget(String url);", "public void get_B8(String URL);", "@Given(\"^we have valid url \\\"([^\\\"]*)\\\"$\")\n\tpublic void we_have_valid_url(String arg1) {\n\t\t\n\t apiClient.setBasePath(arg1);\n\t}", "private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }", "public static String exampleTwo(){\n HttpURLConnection connection = null;\n Scanner cs = null;\n try {\n URL url = buildURL(\"3\");\n connection = (HttpURLConnection) url.openConnection();\n connection.connect();\n InputStream inputStream = connection.getInputStream();\n cs = new Scanner(inputStream);\n boolean hasNext = cs.hasNext();\n if(hasNext){\n return cs.next();\n } else {\n return null;\n }\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (connection != null){\n connection.disconnect();\n }\n if (cs != null){\n cs.close();\n }\n }\n return null;\n }", "String getRequestURL();", "private final String m11182a(String str, int i, String str2) {\n if (this.f10029c.mo6511a(\"feature:targetedDownloadLinkFeature\")) {\n ReferrerDetails referrerDetails = new ReferrerDetails(str, C3739a.f10002k.mo10286a(this.f10027a, str2), C3744d.f10023r.mo10294a(i), null, 8, null);\n C12948z zVar = C12948z.f33530a;\n C3756e eVar = this.f10030d;\n String uri = referrerDetails.mo10279e().toString();\n C12932j.m33815a((Object) uri, \"referrerDetails.toUri().toString()\");\n Object[] objArr = {eVar.mo10313b(uri)};\n String format = String.format(\"https://zenlyapp.com/r/%s\", Arrays.copyOf(objArr, objArr.length));\n C12932j.m33815a((Object) format, \"java.lang.String.format(format, *args)\");\n String string = this.f10027a.getString(R.string.z_track5exp1var1_sms_conversion, new Object[]{format});\n C12932j.m33815a((Object) string, \"context.getString(R.stri…ar1_sms_conversion, link)\");\n return string;\n }\n String string2 = this.f10027a.getString(R.string.sms_conversion);\n C12932j.m33815a((Object) string2, \"context.getString(R.string.sms_conversion)\");\n return string2;\n }", "public static void main (String[] args) throws IOException\n\t{\n\t\tString urlString;\n\t\t\n\t\tif(args.length == 1)\n\t\t{\n\t\t\turlString = args[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\turlString = \"http://www.oracle.com/\";\n\t\t\tSystem.out.println(\"Using \" + urlString);\n\t\t}\n\t\t\n\t\t//open connection\n\t\tURL u = new URL (urlString);\n\t\tURLConnection connection = u.openConnection();\n\t\t\n\t\t//check if response code is HTTP_OK (200)\n\t\tHttpURLConnection httpConnection = (HttpURLConnection) connection;\n\t\tint code = httpConnection.getResponseCode();\n\t\tString message = httpConnection.getResponseMessage();\n\t\tSystem.out.println(code + \" \" + message);\n\t\t\n\t\tif (code != HttpURLConnection.HTTP_OK)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//read server response\n\t\tInputStream instream = connection.getInputStream();\n\t\tScanner in = new Scanner(instream);\n\t\t\n\t\twhile (in.hasNextLine())\n\t\t{\n\t\t\tString input = in.nextLine();\n\t\t\tSystem.out.println(input);\n\t\t}\n\t}", "public void changlink(String url2) {\n\t\t_webView.loadUrl(url2);\n\t}", "public void wapTinyurl() {\n String url = \"http://m.nuomi.com/mianyang/deal/l5kkhcqr\";\r\n Pattern p = Pattern.compile(\"^http://\\\\w+\\\\.nuomi\\\\.com/\\\\w+/deal/(\\\\w+$)\");\r\n Matcher m = p.matcher(url);\r\n if (m.find()) {\r\n p(m.group(1));\r\n }\r\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\t// get URL string from command line or use default\n\t\t\tString urlString;\n\t\t\tif(args.length>0) urlString=args[0];\n\t\t\telse urlString=\"https://www.oracle.com/technetwork/java/index.html\";\n\t\t\t// open reader for URL\n\t\t\tInputStreamReader in=new InputStreamReader(new URL(urlString).openStream());\n\t\t\t// read contents into string builder\n\t\t\tStringBuilder input=new StringBuilder();\n\t\t\tint ch;\n\t\t\twhile((ch=in.read())!=-1) {\n\t\t\t\tinput.append((char)ch);\n\t\t\t}\n\t\t\t// search for all occurrences of pattern\n\t\t\tString patternString=\"<a\\\\s+href\\\\s*=\\\\s*(\\\"[^\\\"]*\\\"|[^\\\\s>]*)\\\\s*>\";\n\t\t\tPattern pattern=Pattern.compile(patternString,Pattern.CASE_INSENSITIVE);\n\t\t\tMatcher matcher=pattern.matcher(input);\n\t\t\twhile(matcher.find()) {\n\t\t\t\tint start=matcher.start();\n\t\t\t\tint end=matcher.end();\n\t\t\t\tString match=input.substring(start-end);\n\t\t\t\tSystem.out.println(match);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}catch (PatternSyntaxException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private String m2343a(String str, String str2) {\n StringBuilder sb;\n String replace = str2.replace(Constants.URL_PATH_DELIMITER, \"_\");\n String G = this.f2759a.mo9869G();\n if (C1277l.m3042b(G)) {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(G);\n sb2.append(replace);\n replace = sb2.toString();\n }\n File a = this.f2761d.mo10273a(replace, this.f2745b.mo10179D());\n if (a == null) {\n return null;\n }\n String str3 = \"file://\";\n if (a.exists()) {\n this.f2763f.mo10021b(a.length());\n sb = new StringBuilder();\n } else {\n StringBuilder sb3 = new StringBuilder();\n sb3.append(str);\n sb3.append(str2);\n if (!this.f2761d.mo10278a(a, sb3.toString(), Arrays.asList(new String[]{str}), this.f2763f)) {\n return null;\n }\n sb = new StringBuilder();\n }\n sb.append(str3);\n sb.append(a.getAbsolutePath());\n return sb.toString();\n }", "void host(String host);", "void host(String host);", "void openUrl (String url);", "public static void main(String[] args) {\n String site = \"www.ics.upjs.sk\";\n int port = 80;\n Socket socket = null;\n try {\n socket = new Socket(site, port);\n OutputStream os = socket.getOutputStream();\n PrintWriter pw = new PrintWriter(os);\n\n InputStream is = socket.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n BufferedReader br = new BufferedReader(isr);\n\n // poslanie poziadavky\n pw.println(\"GET / HTTP/1.1\");\n pw.println(\"Host: \"+site);\n pw.println();\n\n // odoslanie dat ktore su pripavene v streame\n pw.flush();\n\n // spravovanie poziadavky\n\n String riadok;\n while ((riadok = br.readLine()) != null) {\n System.out.println(riadok);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (socket != null) {\n try {\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }", "public static void main(String[] args) {\n\t\tURLContent uc = new URLContent();\n\t\tuc.fetchTitleString(\"http://www.nytimes.com/2003/08/07/us/first-test-for-freshmen-picking-roommates.html\");\n\t}", "public static void main(String[] args) {\n try\n {\n \tURL url = new URL(\"http://www.sina.com.cn\");\n \tURLConnection conn = url.openConnection();\n \tif(conn!=null)\n \t{\n \t\tSystem.out.println(\"正常连接到新浪网!\");\n \t}\n \telse\n \t{\n \t\tSystem.out.println(\"连接失败!\");\n \t}\n \tSystem.out.println(\"数据包的长度:\"+conn.getContentLength());\n \tSystem.out.println(\"数据包的类型:\"+conn.getContentType());\n \tSystem.out.println(\"数据包的字符编码:\"+conn.getContentEncoding());\n \tInputStream in = url.openStream();\n \tScanner scanner = new Scanner(in);\n \tscanner.useDelimiter(\"\\n\"); //设置换行回车为分隔符\n \twhile(scanner.hasNext())\n \t{\n \t\tSystem.out.println(scanner.next());\n \t}\n \tscanner.close();\n }\n catch(Exception ex)\n {\n \tex.printStackTrace();\n }\n\t}", "public void urlCommand(String com, String url) throws IOException, IllegalArgumentException {\n if (url == null || url.length() == 0) {\n throw new IllegalArgumentException(\"Zero length url\");\n }\n checkCommand(com);\n connect();\n writeHeader();\n _dos.writeBytes(com);\n _dos.writeInt(url.length() + 1);\n _dos.writeBytes(url + \"\\0\");\n _baos.writeTo(_out);\n }", "public void setOdlOpenflowMacAddress2(String x) throws SnmpStatusException;", "public static void main(String[] args) throws Exception \r\n\t{\n\t\tURL url = new URL(\"http://volume1.coreservlets.com\");\r\n BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));\r\n\r\n String inputLine;\r\n while ((inputLine = in.readLine()) != null)\r\n\t\t{\r\n System.out.println(inputLine);\r\n }\r\n\t\tin.close();\r\n }", "String login(String string2, String string3) throws IOException {\n Protocol protocol = this;\n synchronized (protocol) {\n Response response;\n String string4 = this.apopChallenge;\n String string5 = null;\n if (string4 != null) {\n string5 = this.getDigest(string3);\n }\n if (this.apopChallenge != null && string5 != null) {\n response = this.simpleCommand(\"APOP \" + string2 + \" \" + string5);\n } else {\n Response response2 = this.simpleCommand(\"USER \" + string2);\n if (!response2.ok) {\n if (response2.data == null) return \"USER command failed\";\n return response2.data;\n }\n response = this.simpleCommand(\"PASS \" + string3);\n }\n if (response.ok) return null;\n if (response.data == null) return \"login failed\";\n return response.data;\n }\n }", "private static String urlAdderP2PNodeName(String url) {\n if (url.endsWith(\"/\")) {\n url += P2P_NODE_NAME;\n } else {\n url += (\"/\" + P2P_NODE_NAME);\n }\n \n return url;\n }", "public static void main(String[] args) {\n\n Request getReq = new Request();\n\n try {\n// getReq.sendReq(\"127.0.0.1\", \"/\", 80);\n getReq.sendReq(\"127.0.0.1\", \"/\", 40289);\n } catch (IOException e) {\n\n e.printStackTrace();\n }\n\n\n }", "public static void downloadUrlToPath(String url2, String path) {\n BufferedInputStream bInput = null;\n BufferedOutputStream bOutput = null;\n try {\n HttpURLConnection conn = null;\n URL url = new URL(url2);\n conn = (HttpURLConnection) url.openConnection();\n bInput = getBufferedInput(conn);\n bOutput = getBufferedOutput(path);\n byte[] buffer = new byte[1024];\n int cnt;\n while ((cnt = bInput.read(buffer)) != -1) {\n bOutput.write(buffer, 0, cnt);\n }\n bOutput.flush();\n if (conn != null) {\n conn.disconnect();\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (bInput != null)\n bInput.close();\n if (bOutput != null)\n bOutput.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "public String getOdlOpenflowMacAddress2() throws SnmpStatusException;", "public static void main(String[] args)\n {\n getCurrentOS();\n logFilePath = createLogFile();\n\n // http://ценыконкурентов.рф/\n// String generalURL = \"https://yandex.ru/search/?msid=1482176371.93869.22866.28043&text=%D1%86%D0%B5%D0%BD%D1%8B%D0%BA%D0%BE%D0%BD%D0%BA%D1%83%D1%80%D0%B5%D0%BD%D1%82%D0%BE%D0%B2.%D1%80%D1%84&lr=213\";\n// String generalURL = \"https://yandex.ru/search/?lr=90&msid=1482652454.05074.22877.5047&text=%D1%86%D0%B5%D0%BD%D1%8B%20%D0%BA%D0%BE%D0%BD%D0%BA%D1%83%D1%80%D0%B5%D0%BD%D1%82%D0%BE%D0%B2%20%D1%80%D1%84&vkbd=1\";\n String generalURL = \"https://yandex.ru/search/?text=%D1%86%D0%B5%D0%BD%D1%8B%20%D0%BA%D0%BE%D0%BD%D0%BA%D1%83%D1%80%D0%B5%D0%BD%D1%82%D0%BE%D0%B2\";\n// String generalURL = \"http://pestravka.frontime.ru\";\n startTime = System.currentTimeMillis();\n\n// new StartThread(generalURL, proxy, countIteration >= countTreads).start();\n countIteration = 0;\n// while (countIteration < MAX_COUNT_ITERATION){\n while (countSuccess <= MAX_COUNT_SUCCESS){\n StartTask newTask = new StartTask();\n if (USE_PROXY){\n for (String proxy:getRandomProxy(1).split(\",\")\n ) {\n countIteration++;\n newTask.start(generalURL, proxy);\n }\n }else {\n countIteration++;\n newTask.start(generalURL, \"\");\n }\n\n }\n\n addToResultString(\"Finish work!\");\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(contains(\"http://www.baidu.com\"));\n\t\taadUrl(\"http://www.baidu.com\");\n\t\tSystem.out.println(contains(\"http://www.baidu.com\"));\n\t\t\n\t}", "private void handleActionScanLanForPs4(String param1, String param2) {\n // TODO: Handle action Foo\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "int mo54403a(String str, String str2);", "public static void main(String[] args) {\n\t\ttry\r\n\t\t{\r\n\t\t\tURL url = new URL(\"http://www.sina.com\");\r\n\t\t\tURLConnection con = url.openConnection();\r\n\t\t\tif(con!=null)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"已连接到\"+url.getHost());\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"无法连接到\"+url.getHost());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(con.getContentLength()+\" \"+con.getContentType()+\" \"+con.getContentEncoding());\r\n\t\t\tSystem.out.println(con.getContentType());\r\n//\t\t\tInputStream in = con.getInputStream();//方法1\r\n\t\t\tInputStream in = url.openStream();//方法2\r\n\t\t\t\r\n\t\t\tInputStreamReader content = new InputStreamReader(in,\"UTF-8\");\t\t\t\t\r\n\t\t\tScanner scanner = new Scanner(content);\r\n\t\t\tscanner.useDelimiter(\"\\n\");//设置回车换行为分割符\r\n\t\t\twhile(scanner.hasNext())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(scanner.next());\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t\tin.close();\r\n\t\t\tcontent.close();\r\n\t\t\t\r\n//\t\t\tStringBuff str = new \r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public String determineURL(HttpServletRequest request)\n {\n String url = \"http://\"+request.getHeader(\"host\")+request.getContextPath()+\"/omserver\";\n return url;\n }", "String getHost();", "public static SendResult checkurl2(LinkedHashMap param) {\n\t\tSendResult sr=new SendResult(\"0\", \"\", \"\");\r\n\t\tif(param.containsKey(\"locktype\")) {\r\n\t\t\tString locktype=(String)param.get(\"locktype\");\r\n\t\t\tif(\"1\".equals(locktype)) {\r\n\t\t\t\tSet<Map.Entry<String, String>> params = param.entrySet();\r\n\t\t\t\tfor(Map.Entry<String, String> p :params) {\r\n\t\t\t\t\tString key=p.getKey();\r\n\t\t\t\t\tString value=p.getValue();\r\n\t\t\t\t\tif(key.equals(\"gatewaycode2\")) {\r\n\t\t\t\t\t\tif(value.toString()==null||value.toString().equals(\"\")||value.toString().equals(\"null\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10003\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"网关唯一ID不能为空\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}else if(value.toString().length()!=10||value.toString().toUpperCase().matches(\".*[G-Z].*\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10004\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"网关唯一ID必须为10位十六进制字符串\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}else {\r\n\t\t\t\tSet<Map.Entry<String, String>> params = param.entrySet();\r\n\t\t\t\tfor(Map.Entry<String, String> p :params) {\r\n\t\t\t\t\tString key=p.getKey();\r\n\t\t\t\t\tString value=p.getValue();\r\n\t\t\t\t\tif(key.equals(\"roomcode2\")) {\r\n\t\t\t\t\t\tif(value.toString()==null||value.toString().equals(\"\")||value.toString().equals(\"null\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10005\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"门锁唯一ID不能为空\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}else if(value.toString().length()!=10||value.toString().toUpperCase().matches(\".*[G-Z].*\")) {\r\n\t\t\t\t\t\t\tsr.setResultCode(\"-10006\");\r\n\t\t\t\t\t\t\tsr.setResultMsg(\"门锁唯一ID必须为10位十六进制字符串\");\r\n\t\t\t\t\t\t\treturn sr;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tsr.setResultCode(\"-10007\");\r\n\t\t\tsr.setResultMsg(\"门锁类型不能为空\");\r\n\t\t}\r\n\t\treturn sr;\r\n\t}", "private static void m751a(Activity activity, String str, String str2, String str3) {\n if (!TextUtils.isEmpty(str2) && !TextUtils.isEmpty(str3)) {\n Intent intent = new Intent();\n try {\n intent.setPackage(\"hk.alipay.wallet\");\n intent.setData(Uri.parse(\"alipayhk://platformapi/startApp?appId=20000125&schemePaySession=\" + URLEncoder.encode(str, Utf8Charset.NAME) + \"&orderSuffix=\" + URLEncoder.encode(str2, Utf8Charset.NAME) + \"&packageName=\" + URLEncoder.encode(str3, Utf8Charset.NAME) + \"&externalPkgName=\" + URLEncoder.encode(str3, Utf8Charset.NAME)));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n C0646c.m1017b(\"msp\", \"PayTask:payReuslt: UnsupportedEncodingException:\" + e);\n }\n if (activity != null) {\n activity.startActivity(intent);\n }\n }\n }", "private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }", "private void handleActionConnectToPs4(String param1, String param2) {\n // TODO: Handle action Baz\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private static URL m23464a(Context context, String str) {\n try {\n return new URL(str);\n } catch (MalformedURLException e) {\n C5376d dVar = C5376d.EXCEPTION;\n StringBuilder sb = new StringBuilder();\n sb.append(\"OMSDK: can't create URL - \");\n sb.append(str);\n C5378f.m23016a(context, dVar, sb.toString(), e.getMessage(), \"\");\n return null;\n }\n }", "protected boolean equals(URL paramURL1, URL paramURL2) {\n/* 336 */ String str1 = paramURL1.getRef();\n/* 337 */ String str2 = paramURL2.getRef();\n/* 338 */ return ((str1 == str2 || (str1 != null && str1.equals(str2))) && \n/* 339 */ sameFile(paramURL1, paramURL2));\n/* */ }", "public C5601a m20396b(String str, String str2) {\n this.f18048a.add(HttpUrl.m19656a(str, \" \\\"':;<=>@[]^`{}|/\\\\?#&!$(),~\", true, false, true, true));\n this.f18049b.add(HttpUrl.m19656a(str2, \" \\\"':;<=>@[]^`{}|/\\\\?#&!$(),~\", true, false, true, true));\n return this;\n }", "public void openURL(String url) {\r\n\t\t\r\n\t\tfinal String errMsg = \"Error attempting to launch web browser\";\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\ttry {\r\n\t\t\tif (osName.startsWith(\"Mac OS\")) {\r\n\t\t\t\tClass fileMgr = Class.forName(\"com.apple.eio.FileManager\");\r\n\t\t\t\tMethod openURL = fileMgr.getDeclaredMethod(\"openURL\",\r\n\t\t\t\t\t\tnew Class[] {String.class});\r\n\t\t\t\topenURL.invoke(null, new Object[] {url});\r\n\t\t\t}\r\n\t\t\telse if (osName.startsWith(\"Windows\"))\r\n\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + url);\r\n\t\t\telse { //assume Unix or Linux\r\n\t\t\t\tString[] browsers = {\r\n\t\t\t\t\t\t\"firefox\", \"opera\", \"konqueror\", \"epiphany\", \"mozilla\", \"netscape\" };\r\n\t\t\t\tString browser = null;\r\n\t\t\t\tfor (int count = 0; count < browsers.length && browser == null; count++)\r\n\t\t\t\t\tif (Runtime.getRuntime().exec(\r\n\t\t\t\t\t\t\tnew String[] {\"which\", browsers[count]}).waitFor() == 0)\r\n\t\t\t\t\t\tbrowser = browsers[count];\r\n\t\t\t\tif (browser == null)\r\n\t\t\t\t\tthrow new Exception(\"Could not find web browser\");\r\n\t\t\t\telse\r\n\t\t\t\t\tRuntime.getRuntime().exec(new String[] {browser, url});\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n//\t\t\tJOptionPane.showMessageDialog(null, errMsg + \":\\n\" + e.getLocalizedMessage());\r\n\t\t\tAboutDialog dlgSupport = new AboutDialog(actController.getUIInstance(), \"Support\", \t\"<html> Couldn't find web browser!\"+ \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> Please start your browser and type in the following URL:\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> www.battleship.bymaxe.de</html>\");\r\n\t\t}\r\n\t}", "public static final String m130159a(String str) {\n String str2;\n if (TextUtils.isEmpty(str)) {\n return \"\";\n }\n Uri parse = Uri.parse(str);\n if (parse != null) {\n str2 = parse.getHost();\n } else {\n str2 = null;\n }\n if (TextUtils.equals(str2, C22912d.f60641a)) {\n return \"web_url\";\n }\n return C22912d.f60642b;\n }", "void mo131986a(String str, String str2);", "@Test\n public void getRequest2() {\n str = METHOD_GET + \"/wiki/page.html \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": ru.wikipedia.org\" + ENDL +\n USER_AGENT + \": Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n CONNECTION_CLOSE;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/wiki/page.html\");\n assertEquals(request.getHeader(HOST_HEADER), \"ru.wikipedia.org\");\n assertEquals(request.getHeader(USER_AGENT),\n \"Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(CONNECTION), CLOSE_STR);\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public static String sendGetRequest(String addr,String[] head)\n\t{\n\t\tString response = null;\n\t\n\t\ttry\n\t\t{\n\t\t\tURL url = new URL(addr);\n\t\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\t\t\t//String encoding = new sun.misc.BASE64Encoder().encode(\"username \t assword\".getBytes());\n\t\t\t//conn.setRequestProperty (\"Authorization\", \"Basic \" + encoding);\n\t\t\tif(head!=null)\n {\n\t for(int i=0;i<head.length;i=i+2)\n\t {\n\t \tconnection.setRequestProperty(head[i], head[i+1]);\n\t \t\n\t }\n }\n\t\t\tconnection.setRequestMethod(\"GET\");\n\t\t\n\t\t\tconnection.connect();\n\t\t\tInputStream in = connection.getInputStream();\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\t\tconnection.disconnect();\n\t\t\tresponse = reader.readLine();\n\t\t\t//System.out.println(text);\n\t\t\n\t\t\t\n\t\t\t}catch(IOException ex)\n\t\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tSystem.out.println(\"made it here\");\n\t\t}\n\treturn response;\n\t\n\t}", "String getRequest(String url);", "public boolean setHeaders(HttpURLConnection paramHttpURLConnection, HeaderParser paramHeaderParser, String paramString) {\n/* */ String str2;\n/* 296 */ this.params.setNonce(paramHeaderParser.findValue(\"nonce\"));\n/* 297 */ this.params.setOpaque(paramHeaderParser.findValue(\"opaque\"));\n/* 298 */ this.params.setQop(paramHeaderParser.findValue(\"qop\"));\n/* */ \n/* 300 */ String str1 = \"\";\n/* */ \n/* 302 */ if (this.type == 'p' && paramHttpURLConnection\n/* 303 */ .tunnelState() == HttpURLConnection.TunnelState.SETUP) {\n/* 304 */ str1 = HttpURLConnection.connectRequestURI(paramHttpURLConnection.getURL());\n/* 305 */ str2 = HttpURLConnection.HTTP_CONNECT;\n/* */ } else {\n/* */ try {\n/* 308 */ str1 = paramHttpURLConnection.getRequestURI();\n/* 309 */ } catch (IOException iOException) {}\n/* 310 */ str2 = paramHttpURLConnection.getMethod();\n/* */ } \n/* */ \n/* 313 */ if (this.params.nonce == null || this.authMethod == null || this.pw == null || this.realm == null) {\n/* 314 */ return false;\n/* */ }\n/* 316 */ if (this.authMethod.length() >= 1)\n/* */ {\n/* */ \n/* */ \n/* 320 */ this\n/* 321 */ .authMethod = Character.toUpperCase(this.authMethod.charAt(0)) + this.authMethod.substring(1).toLowerCase();\n/* */ }\n/* 323 */ String str3 = paramHeaderParser.findValue(\"algorithm\");\n/* 324 */ if (str3 == null || \"\".equals(str3)) {\n/* 325 */ str3 = \"MD5\";\n/* */ }\n/* 327 */ this.params.setAlgorithm(str3);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 333 */ if (this.params.authQop()) {\n/* 334 */ this.params.setNewCnonce();\n/* */ }\n/* */ \n/* 337 */ String str4 = getHeaderValueImpl(str1, str2);\n/* 338 */ if (str4 != null) {\n/* 339 */ paramHttpURLConnection.setAuthenticationProperty(getHeaderName(), str4);\n/* 340 */ return true;\n/* */ } \n/* 342 */ return false;\n/* */ }", "public static void main(String[] args) {\n\r\n\t\tMultiValueMap<String, String> s = new LinkedMultiValueMap<String, String>();\r\n\t\tString useragent=\"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36\";\r\n\t\ts.add(\"User-Agent\",useragent);\r\n\t\ts.add(\"Host\",\"https://www.baidu.com\");\r\n\t\tHttpHeaders headers =new HttpHeaders();\r\n\t\theaders.add(\"User-Agent\",useragent);\r\n\t\tString baidu=sendGetRequest(\"https://www.baidu.com\", s, headers);\r\n\t\tSystem.out.println(baidu);\r\n\t}", "private String parsingURL(String requestURL) {\n\t\tint pos = 0;\n\t\tif (requestURL.startsWith(\"http://\")) {\n\t\t\tpos = \"http://\".length();\n\t\t}\n\t\telse {\n\t\t\tpos = \"https://\".length();\n\t\t}\n\t\t\n\t\tint pos2 = requestURL.indexOf(\":\", pos);\n\t\tif (pos2 < 0) {\n\t\t\tpos2 = requestURL.length();\n\t\t}\n\t\t\n\t\tint pos3 = requestURL.indexOf(\"/\", pos);\n\t\tif (pos3 < 0) {\n\t\t\tpos3 = requestURL.length();\n\t\t}\n\t\t\n\t\tpos2 = Math.min(pos2, pos3);\n\t\t\n\t\tString host = requestURL.substring(pos, pos2);\n\t\t/**\n\t\t * parsing request url\n\t\t */\n\t\treturn host;\n\t}", "public static void main(String args[] ) {\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the url to consult.\");\r\n\t\tScanner ent = new Scanner(System.in);\r\n\r\n\t\tLinkedList<String> listcookies = getFromFile();\r\n\t\tSystem.out.println(\"Table of previous urls: \" + listcookies);\r\n\t\tString cookies = \"\";\r\n\t\tString cookiev = null;\r\n\t\tString reply = \"GET /\"+ent.nextLine()+\" HTTP1.1\\r\\n\";\r\n\t\tent.close();\r\n\t\t\r\n\t\tSocket myClient;\r\n\t\tDataInputStream entry;\r\n\t\tDataOutputStream exit;\r\n\t\tint i = 0;\r\n\t\tif (listcookies != null) for (String s : listcookies) {cookies+=i+\"=\"+s+\"; \"; i++;}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tmyClient = new Socket(\"localhost\", 9999);\r\n\t\t\tentry = new DataInputStream(myClient.getInputStream());\r\n\t\t\texit = new DataOutputStream(myClient.getOutputStream());\r\n\t\t\t\r\n\t\t\tif (!cookies.equals(\"\")) reply += \"Cookie: \"+cookies+\"\\r\\n\";\r\n\t\t\treply += \"\\r\\n\";\r\n\t\t\tSystem.out.println(\"Current query: \"+reply);\r\n\t\t\texit.writeBytes(reply);\r\n\t\t\t\r\n\t\t\tString inf = entry.readLine();\r\n\t\t\twhile (inf != null) {\r\n\t\t\t\tSystem.out.println(inf);\r\n\t\t\t\tString[] parts = inf.split(\" \");\r\n\t\t\t\tif (parts[0].equals(\"Set-Cookie:\")) cookiev = parts[1];\r\n\t\t\t\tinf = entry.readLine();\r\n\t\t\t}\r\n\t\t\tif (cookiev != null) putInFile(cookiev);\r\n\t\t\tentry.close();\r\n\t\t\texit.close();\r\n\t\t} catch (IOException e) {System.out.println(e);}\r\n\t}", "@Override\n\t\t\tpublic void onConnectRemoteNode(String url) {\t \t\t\t\n\t\t\t}", "private Uri computeUri(Context param1) {\n }", "void mo13161c(String str, String str2);", "static String request(String requestMethod, String input, String endURL)\n {\n StringBuilder result;\n result = new StringBuilder();\n try\n {\n String targetURL = firstURL + endURL;\n URL ServiceURL = new URL(targetURL);\n HttpURLConnection httpConnection = (HttpURLConnection) ServiceURL.openConnection();\n httpConnection.setRequestMethod(requestMethod);\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json; charset=UTF-8\");\n httpConnection.setDoOutput(true);\n\n switch (requestMethod) {\n case \"POST\":\n\n httpConnection.setDoInput(true);\n OutputStream outputStream = httpConnection.getOutputStream();\n outputStream.write(input.getBytes());\n outputStream.flush();\n\n result = new StringBuilder(\"1\");\n break;\n case \"GET\":\n\n BufferedReader responseBuffer = new BufferedReader(new InputStreamReader((httpConnection.getInputStream())));\n String tmp;\n while ((tmp = responseBuffer.readLine()) != null) {\n result.append(tmp);\n }\n break;\n }\n\n if (httpConnection.getResponseCode() != 200)\n throw new RuntimeException(\"HTTP GET Request Failed with Error code : \" + httpConnection.getResponseCode());\n\n httpConnection.disconnect();\n\n } catch (IOException exception) {\n exception.printStackTrace();\n }\n return result.toString();\n }", "private AuthenticationScheme basic(String string, String string2) {\n\t\treturn null;\n\t}" ]
[ "0.6234304", "0.5636333", "0.5628513", "0.5621401", "0.5490532", "0.5447457", "0.53943723", "0.5317728", "0.5244931", "0.5240546", "0.5232969", "0.52086055", "0.5193646", "0.51920474", "0.51903325", "0.51853853", "0.5152229", "0.51466596", "0.51382595", "0.5134447", "0.51174927", "0.51010865", "0.51002693", "0.50899404", "0.50732595", "0.5070685", "0.5062077", "0.5057696", "0.5048564", "0.5041777", "0.50325257", "0.50320923", "0.50169283", "0.50156474", "0.5015023", "0.50141394", "0.5008394", "0.49957657", "0.49752337", "0.49741492", "0.49643168", "0.49363008", "0.4931259", "0.49268267", "0.49182773", "0.49177912", "0.49176028", "0.4905996", "0.49026844", "0.49007374", "0.48990554", "0.4897745", "0.4890061", "0.4874024", "0.48648915", "0.48632607", "0.48589095", "0.48588285", "0.48588285", "0.4858341", "0.48484397", "0.48391947", "0.48377132", "0.48354715", "0.48324287", "0.48323384", "0.48245692", "0.48212397", "0.4820449", "0.4808871", "0.48054975", "0.48034596", "0.4800953", "0.47934744", "0.47933996", "0.47925442", "0.47909993", "0.47894406", "0.47830647", "0.47743905", "0.47741637", "0.4764609", "0.47642034", "0.47634932", "0.47603646", "0.4750919", "0.47378257", "0.47376278", "0.4725466", "0.47221908", "0.47148645", "0.4714636", "0.47118202", "0.47090667", "0.4707233", "0.47059727", "0.4703861", "0.4702608", "0.46908262", "0.46824026" ]
0.51210076
20
/ Get fontmetrics and calculate position.
private void createRotatedImage(Graphics g, String text, Color bgColor, Color fgColor, int angle1) { double angle = (double)angle1 * radiansPerDegree; FontMetrics fm = g.getFontMetrics(); int width = fm.stringWidth(text); int height = fm.getHeight(); int ascent = fm.getMaxAscent(); int leading = fm.getLeading(); int verMarzin = (height+ascent+leading - height)/2; int h = verMarzin + ascent + leading; // /* // * Create the image. // */ // destroyOffscreen(); // if (OffscreenI == null) // { // createOffscreen(width + 8, height); // } // updateOffscreen(width + 8, height); // // //Image image = parent.getApplet().createImage(width + 8, height); // // /* // * Set graphics attributes and draw the string. // */ // //Graphics gr = image.getGraphics(); // OffscreenG.setColor(bgColor); // //OffscreenG.fillRect(0, 0, OffscreenI.getWidth(parent.getApplet()), OffscreenI.getHeight(parent.getApplet())); // // OffscreenG.setFont(g.getFont()); // // OffscreenG.setColor(fgColor); // OffscreenG.drawString(text, 4, ascent + leading); /* * Create an imagefilter to rotate the image. */ //ImageFilter filter = new RotateFilter(angle); /* * Produce the rotated image. */ //ImageProducer producer = new FilteredImageSource(OffscreenI.getSource(), filter); /* * Create the rotated image. */ // if (true) return image; //OffscreenI = parent.getApplet().createImage(producer); //return image; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FontMetrics getFontMetrics(Font f)\r\n\t{\r\n\t\treturn _g2.getFontMetrics();\r\n\t}", "private float drawText(Graphics2D g2d) {\n float yOffset = 0; // 1\" top margin\r\n for (TextLayout tl : textLayouts) {\r\n yOffset += tl.getAscent();\r\n tl.draw(g2d, 0, yOffset);\r\n yOffset += tl.getDescent();\r\n yOffset += tl.getLeading();\r\n }\r\n return yOffset;\r\n }", "@Override\n public String getTextAlign() {\n return graphicsEnvironmentImpl.getTextAlign(canvas);\n }", "@Override\n public FontMetrics getFontMetrics(final Font f) {\n final Graphics g = getOnscreenGraphics();\n if (g != null) {\n try {\n return g.getFontMetrics(f);\n } finally {\n g.dispose();\n }\n }\n synchronized (getDelegateLock()) {\n return delegateContainer.getFontMetrics(f);\n }\n }", "abstract Font getFont();", "private Point2D computeLayoutOrigin() {\r\n\r\n\t\tDimension size = getSize();\r\n\r\n\t\tPoint2D.Float origin = new Point2D.Float();\r\n\r\n\t\torigin.x = (float) (size.width - textLayout.getAdvance()) / 2;\r\n\t\torigin.y = (float) (size.height - textLayout.getDescent() + textLayout\r\n\t\t\t\t.getAscent()) / 2;\r\n\r\n\t\treturn origin;\r\n\t}", "public BoundingBox getFontBBox() throws IOException;", "private void getTextBounds(CharSequence text, Paint paint, float[] p) {\n if (p == null || p.length < 3) {\n return;\n }\n float textWidth = paint.measureText(text.toString());\n Paint.FontMetrics fontM = paint.getFontMetrics();\n //baseLine:一行文字的底线。\n //Ascent: 字符顶部到baseLine的距离。\n //Descent: 字符底部到baseLine的距离。\n //Leading: 字符行间距。\n float bottom = fontM.bottom;\n float top = fontM.top;\n p[0] = textWidth;// text width\n p[1] = bottom - top;// text height\n p[2] = top;\n Log.i(TAG, \"fontM.ascent=\"+fontM.ascent + \" fontM.bottom=\"+fontM.bottom+\" fontM.descent=\"+fontM.descent+\" fontM.top=\"+fontM.top);\n }", "private void calculateCharSize() {\n int charMaxAscent;\n int charLeading;\n FontMetrics fm = getFontMetrics(getFont());\n charWidth = -1; // !!! Does not seem to work: fm.getMaxAdvance();\n charHeight = fm.getHeight() + lineSpaceDelta;\n charMaxAscent = fm.getMaxAscent();\n fm.getMaxDescent();\n charLeading = fm.getLeading();\n baselineIndex = charMaxAscent + charLeading - 1;\n\n if (charWidth == -1) {\n int widths[] = fm.getWidths();\n for (int i=32; i<127; i++) {\n if (widths[i] > charWidth) {\n charWidth = widths[i];\n }\n }\n }\n }", "public Position getTextPosition()\n {\n int hpos = getComponent().getHorizontalTextPosition();\n int vpos = getComponent().getVerticalTextPosition();\n return Position.get(hpos, vpos);\n }", "public abstract Font getFont();", "public List<Number> getFontMatrix() throws IOException;", "public int[] getRawCharBBox(int i, String str) {\n Object[] objArr;\n if (str == null) {\n objArr = (Object[]) this.CharMetrics.get(new Integer(i));\n } else if (str.equals(BaseFont.notdef)) {\n return null;\n } else {\n objArr = (Object[]) this.CharMetrics.get(str);\n }\n if (objArr != null) {\n return (int[]) objArr[3];\n }\n return null;\n }", "private float getFontHeight(Paint paint) {\n Rect rect = new Rect();\n paint.getTextBounds(\"1\", 0, 1, rect);\n return rect.height();\n }", "float getFontSize()\r\n\t{\r\n\t\tif (!appearanceTokens.isEmpty())\r\n\t\t{\r\n\t\t\t// daString looks like \"BMC /Helv 3.4 Tf EMC\"\r\n\t\t\t// use the fontsize of the default existing apperance stream\r\n\t\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\t\tif (fontIndex != -1)\r\n\t\t\t{\r\n\t\t\t\treturn ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0f;\r\n\t}", "private Sprite.UV[] buildFontSpriteCoords() {\n Sprite.UV[] uvs = new Sprite.UV[16*16];\n float step = 1.0f / 16.0f;\n\n for (int y=0; y<16; y++) {\n for (int x=0; x<16; x++) {\n int offset = (y*16)+x;\n uvs[offset] = new Sprite.UV();\n uvs[offset].s = (x * step) + step;\n uvs[offset].t = (y * step) + step;\n uvs[offset].u = x * step;\n uvs[offset].v = y * step;\n }\n }\n\n return uvs;\n }", "public StandardGlyphVector layout(Font paramFont, FontRenderContext paramFontRenderContext, char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, StandardGlyphVector paramStandardGlyphVector)\n/* */ {\n/* 365 */ if ((paramArrayOfChar == null) || (paramInt1 < 0) || (paramInt2 < 0) || (paramInt2 > paramArrayOfChar.length - paramInt1)) {\n/* 366 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 369 */ init(paramInt2);\n/* */ \n/* */ \n/* */ \n/* 373 */ if (paramFont.hasLayoutAttributes()) {\n/* 374 */ localObject1 = ((AttributeMap)paramFont.getAttributes()).getValues();\n/* 375 */ if (((AttributeValues)localObject1).getKerning() != 0) this._typo_flags |= 0x1;\n/* 376 */ if (((AttributeValues)localObject1).getLigatures() != 0) { this._typo_flags |= 0x2;\n/* */ }\n/* */ }\n/* 379 */ this._offset = paramInt1;\n/* */ \n/* */ \n/* */ \n/* 383 */ Object localObject1 = SDCache.get(paramFont, paramFontRenderContext);\n/* 384 */ this._mat[0] = ((float)((SDCache)localObject1).gtx.getScaleX());\n/* 385 */ this._mat[1] = ((float)((SDCache)localObject1).gtx.getShearY());\n/* 386 */ this._mat[2] = ((float)((SDCache)localObject1).gtx.getShearX());\n/* 387 */ this._mat[3] = ((float)((SDCache)localObject1).gtx.getScaleY());\n/* 388 */ this._pt.setLocation(((SDCache)localObject1).delta);\n/* */ \n/* 390 */ int i = paramInt1 + paramInt2;\n/* */ \n/* 392 */ int j = 0;\n/* 393 */ int k = paramArrayOfChar.length;\n/* 394 */ if (paramInt3 != 0) {\n/* 395 */ if ((paramInt3 & 0x1) != 0) {\n/* 396 */ this._typo_flags |= 0x80000000;\n/* */ }\n/* */ \n/* 399 */ if ((paramInt3 & 0x2) != 0) {\n/* 400 */ j = paramInt1;\n/* */ }\n/* */ \n/* 403 */ if ((paramInt3 & 0x4) != 0) {\n/* 404 */ k = i;\n/* */ }\n/* */ }\n/* */ \n/* 408 */ int m = -1;\n/* */ \n/* 410 */ Object localObject2 = FontUtilities.getFont2D(paramFont);\n/* 411 */ if ((localObject2 instanceof FontSubstitution)) {\n/* 412 */ localObject2 = ((FontSubstitution)localObject2).getCompositeFont2D();\n/* */ }\n/* */ \n/* 415 */ this._textRecord.init(paramArrayOfChar, paramInt1, i, j, k);\n/* 416 */ int n = paramInt1;\n/* 417 */ if ((localObject2 instanceof CompositeFont)) {\n/* 418 */ this._scriptRuns.init(paramArrayOfChar, paramInt1, paramInt2);\n/* 419 */ this._fontRuns.init((CompositeFont)localObject2, paramArrayOfChar, paramInt1, i);\n/* 420 */ while (this._scriptRuns.next()) {\n/* 421 */ i1 = this._scriptRuns.getScriptLimit();\n/* 422 */ i2 = this._scriptRuns.getScriptCode();\n/* 423 */ while (this._fontRuns.next(i2, i1)) {\n/* 424 */ PhysicalFont localPhysicalFont = this._fontRuns.getFont();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 431 */ if ((localPhysicalFont instanceof NativeFont)) {\n/* 432 */ localPhysicalFont = ((NativeFont)localPhysicalFont).getDelegateFont();\n/* */ }\n/* 434 */ int i4 = this._fontRuns.getGlyphMask();\n/* 435 */ int i5 = this._fontRuns.getPos();\n/* 436 */ nextEngineRecord(n, i5, i2, m, localPhysicalFont, i4);\n/* 437 */ n = i5;\n/* */ }\n/* */ }\n/* */ }\n/* 441 */ this._scriptRuns.init(paramArrayOfChar, paramInt1, paramInt2);\n/* 442 */ while (this._scriptRuns.next()) {\n/* 443 */ i1 = this._scriptRuns.getScriptLimit();\n/* 444 */ i2 = this._scriptRuns.getScriptCode();\n/* 445 */ nextEngineRecord(n, i1, i2, m, (Font2D)localObject2, 0);\n/* 446 */ n = i1;\n/* */ }\n/* */ \n/* */ \n/* 450 */ int i1 = 0;\n/* 451 */ int i2 = this._ercount;\n/* 452 */ int i3 = 1;\n/* */ \n/* 454 */ if (this._typo_flags < 0) {\n/* 455 */ i1 = i2 - 1;\n/* 456 */ i2 = -1;\n/* 457 */ i3 = -1;\n/* */ }\n/* */ \n/* */ \n/* 461 */ this._sd = ((SDCache)localObject1).sd;\n/* 462 */ Object localObject3; for (; i1 != i2; i1 += i3) {\n/* 463 */ localObject3 = (EngineRecord)this._erecords.get(i1);\n/* */ for (;;) {\n/* */ try {\n/* 466 */ ((EngineRecord)localObject3).layout();\n/* */ }\n/* */ catch (IndexOutOfBoundsException localIndexOutOfBoundsException)\n/* */ {\n/* 470 */ if (this._gvdata._count >= 0) {\n/* 471 */ this._gvdata.grow();\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* 476 */ if (this._gvdata._count < 0) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 489 */ if (this._gvdata._count < 0) {\n/* 490 */ localObject3 = new StandardGlyphVector(paramFont, paramArrayOfChar, paramInt1, paramInt2, paramFontRenderContext);\n/* 491 */ if (FontUtilities.debugFonts()) {\n/* 492 */ FontUtilities.getLogger().warning(\"OpenType layout failed on font: \" + paramFont);\n/* */ }\n/* */ }\n/* */ else {\n/* 496 */ localObject3 = this._gvdata.createGlyphVector(paramFont, paramFontRenderContext, paramStandardGlyphVector);\n/* */ }\n/* */ \n/* 499 */ return (StandardGlyphVector)localObject3;\n/* */ }", "public Font getLabelFont();", "private float drawTextUsingCurrentVertLoc ( \r\n\t String text,\r\n\t Graphics2D g2\r\n\t )\r\n\t{\n\t\tif ( ( text == null ) || text.equals ( \"\" ) )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif ( horizontalLocationOfRelation <= 0 )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tTextLayout tl = new TextLayout( text, SYMBOL_FONT, FONT_RENDER_CTXT );\r\n\t\tRectangle2D.Float bound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\tfloat xAdjustment = bound.width / 2.0f;\r\n\r\n\t\t//int yAdjustment = ( int ) ( bound.height / 2.0f );\r\n\t\ttl.draw ( \r\n\t\t g2,\r\n\t\t horizontalLocationOfRelation + xAdjustment,\r\n\t\t currentVertLocationOfSymbol - WORM_LINE_THICKNESS - 1 - SYMBOL_LINE_LENGTH\r\n\t\t );\r\n\r\n\t\t//tl.draw(g2, 100.0f, 100.0f);\r\n\t\t//return bound.height;\r\n\t\ttl = new TextLayout( text, NUMBER_FONT, FONT_RENDER_CTXT );\r\n\t\tbound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\t//Util.info(\"bound = \" + bound);\r\n\t\treturn bound.width;\r\n\t}", "public Point getLabelPosition();", "public void updateText()\r\n\t{\r\n\t\tdouble smallest = Math.min(menu.getController().getWidth(), menu.getController().getHeight());\r\n\t\tdouble equivalent12 = smallest/55;//Equivalent of 12 point font on base dimensions\r\n\t\t\r\n\t\ttextRenderer = new TextRenderer(new Font(fontName, Font.PLAIN, (int)(equivalent12*size)), true, true);\r\n\t}", "private Rectangle2D getTextExtents(\n final String text, final Font font, final Graphics graphics ) {\n return getFontMetrics( font ).getStringBounds( text, graphics );\n }", "private static void loadTextSizes(Context context)\n\t{\n\t\tDisplayMetrics metrics = context.getResources().getDisplayMetrics();\n\t\tTEXT_SIZE = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 14, metrics);\n\t\tTEXT_SIZE_BIG = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, metrics);\n\t\tPADDING = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, metrics);\n\t\tTEXT_SPACE = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 150, metrics);\n\t}", "public float getTextSizePx() {\n return mPaint.getTextSize();\n }", "public int getFirstPos ()\r\n {\r\n return glyph.getBounds().y;\r\n }", "StrikeMetrics getFontMetrics() {\n if (strikeMetrics == null) {\n if (pScalerContext != 0) {\n strikeMetrics = super.getFontMetrics();\n }\n if (strikeMetrics == null) {\n strikeMetrics = delegateStrike.getFontMetrics();\n }\n }\n return strikeMetrics;\n }", "private PriorityQueue<FontMatch> getFontMatches(PDFontDescriptor fontDescriptor, PDCIDSystemInfo cidSystemInfo) {\n/* 543 */ PriorityQueue<FontMatch> queue = new PriorityQueue<FontMatch>(20);\n/* */ \n/* 545 */ for (FontInfo info : this.fontInfoByName.values()) {\n/* */ \n/* */ \n/* 548 */ if (cidSystemInfo != null && !isCharSetMatch(cidSystemInfo, info)) {\n/* */ continue;\n/* */ }\n/* */ \n/* */ \n/* 553 */ FontMatch match = new FontMatch(info);\n/* */ \n/* */ \n/* 556 */ if (fontDescriptor.getPanose() != null && info.getPanose() != null) {\n/* */ \n/* 558 */ PDPanoseClassification panose = fontDescriptor.getPanose().getPanose();\n/* 559 */ if (panose.getFamilyKind() == info.getPanose().getFamilyKind())\n/* */ {\n/* 561 */ if (panose.getFamilyKind() == 0 && (info\n/* 562 */ .getPostScriptName().toLowerCase().contains(\"barcode\") || info\n/* 563 */ .getPostScriptName().startsWith(\"Code\")) && \n/* 564 */ !probablyBarcodeFont(fontDescriptor)) {\n/* */ continue;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 570 */ if (panose.getSerifStyle() == info.getPanose().getSerifStyle()) {\n/* */ \n/* */ \n/* 573 */ match.score += 2.0D;\n/* */ }\n/* 575 */ else if (panose.getSerifStyle() >= 2 && panose.getSerifStyle() <= 5 && info\n/* 576 */ .getPanose().getSerifStyle() >= 2 && info\n/* 577 */ .getPanose().getSerifStyle() <= 5) {\n/* */ \n/* */ \n/* 580 */ match.score++;\n/* */ }\n/* 582 */ else if (panose.getSerifStyle() >= 11 && panose.getSerifStyle() <= 13 && info\n/* 583 */ .getPanose().getSerifStyle() >= 11 && info\n/* 584 */ .getPanose().getSerifStyle() <= 13) {\n/* */ \n/* */ \n/* 587 */ match.score++;\n/* */ }\n/* 589 */ else if (panose.getSerifStyle() != 0 && info.getPanose().getSerifStyle() != 0) {\n/* */ \n/* */ \n/* 592 */ match.score--;\n/* */ } \n/* */ \n/* */ \n/* 596 */ int weight = info.getPanose().getWeight();\n/* 597 */ int weightClass = info.getWeightClassAsPanose();\n/* 598 */ if (Math.abs(weight - weightClass) > 2)\n/* */ {\n/* */ \n/* 601 */ weight = weightClass;\n/* */ }\n/* */ \n/* 604 */ if (panose.getWeight() == weight)\n/* */ {\n/* */ \n/* 607 */ match.score += 2.0D;\n/* */ }\n/* 609 */ else if (panose.getWeight() > 1 && weight > 1)\n/* */ {\n/* 611 */ float dist = Math.abs(panose.getWeight() - weight);\n/* 612 */ match.score += 1.0D - dist * 0.5D;\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 619 */ else if (fontDescriptor.getFontWeight() > 0.0F && info.getWeightClass() > 0) {\n/* */ \n/* */ \n/* 622 */ float dist = Math.abs(fontDescriptor.getFontWeight() - info.getWeightClass());\n/* 623 */ match.score += 1.0D - (dist / 100.0F) * 0.5D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 628 */ queue.add(match);\n/* */ } \n/* 630 */ return queue;\n/* */ }", "@Override\n public String getTextBaseline() {\n return graphicsEnvironmentImpl.getTextBaseline(canvas);\n }", "public float getFontSize();", "public void calculateOffsets() {\n /* 113 */\n float legendLeft = 0.0F, legendRight = 0.0F, legendBottom = 0.0F, legendTop = 0.0F;\n /* */\n /* 115 */\n if (this.mLegend != null && this.mLegend.isEnabled() && !this.mLegend.isDrawInsideEnabled()) {\n /* */\n /* 117 */\n float yLegendOffset, fullLegendWidth = Math.min(this.mLegend.mNeededWidth, this.mViewPortHandler\n/* 118 */.getChartWidth() * this.mLegend.getMaxSizePercent());\n /* */\n /* 120 */\n switch (this.mLegend.getOrientation()) {\n /* */\n case VERTICAL:\n /* 122 */\n float xLegendOffset = 0.0F;\n /* */\n /* 124 */\n if (this.mLegend.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.LEFT || this.mLegend\n/* 125 */.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.RIGHT) {\n /* 126 */\n if (this.mLegend.getVerticalAlignment() == Legend.LegendVerticalAlignment.CENTER) {\n /* */\n /* 128 */\n float spacing = Utils.convertDpToPixel(13.0F);\n /* */\n /* 130 */\n xLegendOffset = fullLegendWidth + spacing;\n /* */\n }\n /* */\n else {\n /* */\n /* 134 */\n float spacing = Utils.convertDpToPixel(8.0F);\n /* */\n /* 136 */\n float legendWidth = fullLegendWidth + spacing;\n /* 137 */\n float legendHeight = this.mLegend.mNeededHeight + this.mLegend.mTextHeightMax;\n /* */\n /* 139 */\n MPPointF center = getCenter();\n /* */\n /* */\n /* */\n /* 143 */\n float bottomX = (this.mLegend.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.RIGHT) ? (getWidth() - legendWidth + 15.0F) : (legendWidth - 15.0F);\n /* */\n /* 145 */\n float bottomY = legendHeight + 15.0F;\n /* 146 */\n float distLegend = distanceToCenter(bottomX, bottomY);\n /* */\n /* 148 */\n MPPointF reference = getPosition(center, getRadius(),\n /* 149 */ getAngleForPoint(bottomX, bottomY));\n /* */\n /* 151 */\n float distReference = distanceToCenter(reference.x, reference.y);\n /* 152 */\n float minOffset = Utils.convertDpToPixel(5.0F);\n /* */\n /* 154 */\n if (bottomY >= center.y && getHeight() - legendWidth > getWidth()) {\n /* 155 */\n xLegendOffset = legendWidth;\n /* 156 */\n } else if (distLegend < distReference) {\n /* */\n /* 158 */\n float diff = distReference - distLegend;\n /* 159 */\n xLegendOffset = minOffset + diff;\n /* */\n }\n /* */\n /* 162 */\n MPPointF.recycleInstance(center);\n /* 163 */\n MPPointF.recycleInstance(reference);\n /* */\n }\n /* */\n }\n /* */\n /* 167 */\n switch (this.mLegend.getHorizontalAlignment()) {\n /* */\n// case VERTICAL:\n// /* 169 */\n// legendLeft = xLegendOffset;\n// /* */\n// break;\n// /* */\n// /* */\n// case HORIZONTAL:\n// /* 173 */\n// legendRight = xLegendOffset;\n// break;\n }\n switch (this.mLegend.getVerticalAlignment())\n /* */ {\n// case VERTICAL:\n// /* 179 */\n// legendTop = Math.min(this.mLegend.mNeededHeight, this.mViewPortHandler\n///* 180 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n// break;\n// /* */\n// case HORIZONTAL:\n// /* */\n// case null:\n// /* 183 */\n// break;\n }\n legendBottom = Math.min(this.mLegend.mNeededHeight, this.mViewPortHandler\n/* 184 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n /* */\n break;\n /* */\n /* */\n /* */\n /* */\n /* */\n /* */\n /* */\n case HORIZONTAL:\n /* 193 */\n yLegendOffset = 0.0F;\n /* */\n /* 195 */\n if (this.mLegend.getVerticalAlignment() == Legend.LegendVerticalAlignment.TOP || this.mLegend\n/* 196 */.getVerticalAlignment() == Legend.LegendVerticalAlignment.BOTTOM) {\n /* */\n /* */\n /* */\n /* */\n /* 201 */\n float yOffset = getRequiredLegendOffset();\n /* */\n /* 203 */\n yLegendOffset = Math.min(this.mLegend.mNeededHeight + yOffset, this.mViewPortHandler\n/* 204 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n /* */\n /* 206 */\n switch (this.mLegend.getVerticalAlignment())\n /* */ {\n// case VERTICAL:\n// /* 208 */\n// legendTop = yLegendOffset;\n// break;\n// /* */\n// case HORIZONTAL:\n// /* */\n// case null:\n// /* 211 */\n// break;\n }\n legendBottom = yLegendOffset;\n /* */\n }\n /* */\n break;\n /* */\n }\n /* */\n /* */\n /* */\n /* 218 */\n legendLeft += getRequiredBaseOffset();\n /* 219 */\n legendRight += getRequiredBaseOffset();\n /* 220 */\n legendTop += getRequiredBaseOffset();\n /* 221 */\n legendBottom += getRequiredBaseOffset();\n /* */\n }\n /* */\n /* 224 */\n float minOffset = Utils.convertDpToPixel(this.mMinOffset);\n /* */\n /* 226 */\n if (this instanceof RadarChart) {\n /* 227 */\n XAxis x = getXAxis();\n /* */\n /* 229 */\n if (x.isEnabled() && x.isDrawLabelsEnabled()) {\n /* 230 */\n minOffset = Math.max(minOffset, x.mLabelRotatedWidth);\n /* */\n }\n /* */\n }\n /* */\n /* 234 */\n legendTop += getExtraTopOffset();\n /* 235 */\n legendRight += getExtraRightOffset();\n /* 236 */\n legendBottom += getExtraBottomOffset();\n /* 237 */\n legendLeft += getExtraLeftOffset();\n /* */\n /* 239 */\n float offsetLeft = Math.max(minOffset, legendLeft);\n /* 240 */\n float offsetTop = Math.max(minOffset, legendTop);\n /* 241 */\n float offsetRight = Math.max(minOffset, legendRight);\n /* 242 */\n float offsetBottom = Math.max(minOffset, Math.max(getRequiredBaseOffset(), legendBottom));\n /* */\n /* 244 */\n this.mViewPortHandler.restrainViewPort(offsetLeft, offsetTop, offsetRight, offsetBottom);\n /* */\n /* 246 */\n if (this.mLogEnabled) {\n /* 247 */\n Log.i(\"MPAndroidChart\", \"offsetLeft: \" + offsetLeft + \", offsetTop: \" + offsetTop + \", offsetRight: \" + offsetRight + \", offsetBottom: \" + offsetBottom);\n /* */\n }\n /* */\n }", "@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }", "public int getTextPosition() {\r\n return TextPosition;\r\n }", "Font createFont();", "RealLocalizable getPosition();", "public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}", "private Font getScreenFont() {\n Font scoreFont = null;\n try {\n scoreFont = Font.createFont(Font.TRUETYPE_FONT,\n getClass().getResource(\"\\\\assets\\\\font\\\\game_over.ttf\").openStream());\n } catch (FontFormatException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return scoreFont;\n }", "public interface IText extends ISinglePoint {\n\n /**\n * Defines whether the text rotation is relative to the screen or geographic\n * north\n * \n * @author sgilbert\n * \n */\n public static enum TextRotation {\n SCREEN_RELATIVE, NORTH_RELATIVE\n }\n\n /**\n * Defines the text justification options\n * \n * @author sgilbert\n * \n */\n public static enum TextJustification {\n LEFT_JUSTIFY, CENTER, RIGHT_JUSTIFY\n }\n\n /**\n * Defines available font styles\n * \n * @author sgilbert\n * \n */\n public static enum FontStyle {\n REGULAR, BOLD, ITALIC, BOLD_ITALIC\n }\n\n public static enum DisplayType {\n NORMAL, BOX, UNDERLINE, OVERLINE\n }\n\n /**\n * Gets the text to draw\n * \n * @return Array of text strings\n */\n public String[] getString();\n\n /**\n * Gets the name of the font to use\n * \n * @return font name\n */\n public String getFontName();\n\n /**\n * Gets the size of the font\n * \n * @return font size\n */\n public float getFontSize();\n\n /**\n * Gets the font style to use\n * \n * @return font style\n */\n public FontStyle getStyle();\n\n /**\n * Gets the lat/lon refernce position for the text display\n * \n * @return lat/lon coordinate\n */\n public Coordinate getPosition();\n\n /**\n * Gets the color to use for the text\n * \n * @return text color\n */\n public Color getTextColor();\n\n /**\n * Gets the specified justification\n * \n * @return the text justification\n */\n public TextJustification getJustification();\n\n /**\n * Gets the rotation angle to use\n * \n * @return rotation angle\n */\n public double getRotation();\n\n /**\n * Gets how the rotation angle is applied\n * \n * @return the rotation relativity\n */\n public TextRotation getRotationRelativity();\n\n /**\n * Determines whether the text should be displayed with an outline box\n * \n * @return true, if outline box should be displayed\n */\n public DisplayType getDisplayType();\n\n /**\n * Determines whether text background should be masked out.\n * \n * @return true, if background is to be masked\n */\n public Boolean maskText();\n\n /**\n * Gets the offset in the x direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The x direction offset\n */\n public int getXOffset();\n\n /**\n * Gets the offset in the y direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The y direction offset\n */\n public int getYOffset();\n\n public Boolean getHide();\n\n public Boolean getAuto();\n\n public int getIthw();\n\n public int getIwidth();\n\n}", "public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }", "public String getMatchFontName();", "public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }", "private Point calcStringPosition(String str, int textSize, Bitmap bg,\n Paint paint) {\n final Point tempPos = new Point();\n if (str == null) {\n tempPos.x = -1;\n tempPos.y = -1;\n return tempPos;\n }\n\n Rect rect = new Rect();\n paint.setTextSize(textSize);\n /*\n * If you are confused with Paint.getTextBounds,read the link below:\n * {@link http://stackoverflow.com/questions/7549182/android-paint-measuretext-vs-gettextbounds }\n */\n paint.getTextBounds(str, 0, str.length(), rect);\n\n int leftTopPointX = (bg.getWidth() - rect.width() ) / 2 + INDICATOR_BOUNDRY_X;\n int leftTopPointY = (bg.getHeight() - rect.height()) / 2 + INDICATOR_BOUNDRY_Y;\n\n tempPos.x = leftTopPointX - rect.left;\n tempPos.y = leftTopPointY - rect.top;\n\n return tempPos;\n }", "public CanvasFont getFont() {\n return this.textFont;\n }", "private void calc_screen_size(){\r\n \tscn_grid.setFont(scn_font);\r\n \tscn_context = scn_grid.getFontRenderContext();\r\n \t scn_layout = new TextLayout(\"X\",scn_font,scn_context);\r\n scn_char_rect = scn_layout.getBlackBoxBounds(0,1).getBounds();\r\n scn_char_height = (int) (scn_char_rect.getHeight()); // RPI 630 was Width in err, 6 to *1.5\r\n \tscn_char_base = scn_char_height/2+1;\r\n \tscn_char_height = scn_char_height + scn_char_base+2;\r\n scn_char_width = (int) (scn_char_rect.getWidth()); // RPI 630 was Height in err\r\n \tscn_height = scn_rows * scn_char_height; // RPI 408 + 5 \r\n \tscn_width = scn_cols * scn_char_width + 3; // RPI 408 + 5 \r\n \tscn_size = new Dimension(scn_width,scn_height);\r\n \tscn_image = new BufferedImage(scn_width,scn_height,BufferedImage.TYPE_INT_ARGB);\r\n \tscn_grid = scn_image.createGraphics();\r\n \tscn_grid.setFont(scn_font); \r\n scn_grid.setColor(scn_text_color);\r\n \t scn_context = scn_grid.getFontRenderContext();\r\n scn_grid.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n }", "private static GFont getIndexFont(GFont f) {\n\t\tint newSize = Math.max((int) (f.getSize() * 0.9), 8);\n\t\treturn f.deriveFont(f.getStyle(), newSize);\n\t}", "FontMatch(FontInfo info) {\n/* 704 */ this.info = info;\n/* */ }", "public String getFontName();", "public String getFontName();", "public String getFontName();", "public static Font getFont() {\n return getFont(12);\n }", "public int getRawWidth(int i, String str) {\n Object[] objArr;\n if (str == null) {\n objArr = (Object[]) this.CharMetrics.get(new Integer(i));\n } else if (str.equals(BaseFont.notdef)) {\n return 0;\n } else {\n objArr = (Object[]) this.CharMetrics.get(str);\n }\n if (objArr != null) {\n return ((Integer) objArr[1]).intValue();\n }\n return 0;\n }", "public FontProps getFontProps() {\n\t\treturn mFont;\n\t}", "public Font getFont(\n )\n {return font;}", "private void initFonts() {\n Typeface typeFace = Typeface.createFromAsset(getAssets(), \"fonts/BuriedBeforeBB_Reg.otf\");\n\n TextView textViewScore = (TextView) findViewById(R.id.txtScore);\n TextView textViewLives = (TextView) findViewById(R.id.txtLives);\n TextView txtGameOver = (TextView) findViewById(R.id.txtGameOver);\n TextView txtGameOver2 = (TextView) findViewById(R.id.txtGameOver2);\n\n textViewScore.setTypeface(typeFace);\n textViewLives.setTypeface(typeFace);\n txtGameOver.setTypeface(typeFace);\n txtGameOver2.setTypeface(typeFace);\n txtNextLevel.setTypeface(typeFace);\n }", "public void GetFontW (){\n fontBolW = false;\n fontBolS = true;\n fontBolA = true;\n fontBol = true;\n }", "private GlyphLayout()\n/* */ {\n/* 507 */ this._gvdata = new GVData();\n/* 508 */ this._textRecord = new TextRecord();\n/* 509 */ this._scriptRuns = new ScriptRun();\n/* 510 */ this._fontRuns = new FontRunIterator();\n/* 511 */ this._erecords = new ArrayList(10);\n/* 512 */ this._pt = new Point2D.Float();\n/* 513 */ this._sd = new FontStrikeDesc();\n/* 514 */ this._mat = new float[4];\n/* */ }", "public void GetFontA (){\n fontBolA = false;\n fontBolS = true;\n fontBol = true;\n fontBolW = true;\n }", "public Point2D.Double getTextCenter() {\n\t\treturn new Point2D.Double(_parent.getTxtLocPinX(), _parent.getTxtLocPinY());\n\t}", "public int getFontSize();", "public void GetFontS (){\n fontBolS = false;\n fontBol = true;\n fontBolA = true;\n fontBolW = true;\n }", "public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }", "public Font getFont() {\n return this.font;\n }", "private void renderCardStat(Graphics2D g,String str,int yOffset) {\n\t\twhile((currentCardBounds.x + currentCardBounds.width/2 - this.makeRectangleWidth(g.getFont(), str)/2) + (this.makeRectangleWidth(g.getFont(), str)) > (this.displayCardBounds.x + this.displayCardBounds.width)) {\r\n\t\t\tg.setFont(new Font(g.getFont().getFamily(),g.getFont().getStyle(),g.getFont().getSize()-1));\r\n\t\t}\r\n\t\tg.drawString(str, currentCardBounds.x + currentCardBounds.width/2 - this.makeRectangleWidth(g.getFont(), str)/2, currentCardBounds.y + currentCardBounds.height + this.makeRectangleHeight(g.getFont(), str) + (yOffset));\r\n\t\t//g.setFont(originalFont);\r\n\t}", "FONT createFONT();", "private int getFontSize(LabelGeometry geom)\r\n {\r\n float fontSize = AWTUtilities.getFontSize(geom.getRenderProperties().getFont());\r\n\r\n // Scale based on the view\r\n Function<Kilometers, Float> scaleFunction = geom.getRenderProperties().getScaleFunction();\r\n if (scaleFunction != null)\r\n {\r\n float viewScale = scaleFunction.apply(myViewAltitudeSupplier.get()).floatValue();\r\n fontSize *= viewScale;\r\n }\r\n\r\n return Math.round(fontSize);\r\n }", "public int getNumGlyphs() {\n\treturn getFont2D().getNumGlyphs();\n }", "protected float getOffset(int line,int column) {\n prepareLine(line);\n mPaint.setTypeface(mTypefaceText);\n return measureText(mChars,0,column) + measureLineNumber() + mDividerMargin * 2 + mDividerWidth - getOffsetX();\n }", "public Font getFont() {\r\n return font;\r\n }", "public Font getFont() {\r\n return font;\r\n }", "@Override\r\n public void draw(Canvas canvas) {\r\n if (text == null) {\r\n throw new IllegalStateException(\"Attempting to draw a null text.\");\r\n }\r\n\r\n // Draws the bounding box around the TextBlock.\r\n RectF rect = new RectF(text.getBoundingBox());\r\n rect.left = translateX(rect.left);\r\n rect.top = translateY(rect.top);\r\n rect.right = translateX(rect.right);\r\n rect.bottom = translateY(rect.bottom);\r\n canvas.drawRect(rect, rectPaint);\r\n\r\n // Log.d(\"area\", \"text: \" + text.getText() + \"\\nArea: \" + Area);\r\n /**Here we are defining a Map which takes a string(Text) and a Integer X_Axis.The text will act as key to the X_Axis.\r\n Once We Got the X_Axis we will pass its value to a SparseIntArray which will Assign X Axis To Y Axis\r\n .Then We might Create another Map which will Store Both The text and the coordinates*/\r\n int X_Axis = (int) rect.left;\r\n int Y_Axis = (int) rect.bottom;\r\n\r\n // Renders the text at the bottom of the box.\r\n Log.d(\"PositionXY\", \"x: \"+X_Axis +\" |Y: \"+ Y_Axis);\r\n canvas.drawText(text.getText(), rect.left, rect.bottom, textPaint); // rect.left and rect.bottom are the coordinates of the text they can be used for mapping puposes\r\n\r\n\r\n }", "int getLabelOffset();", "private void checkPaintMeasures() {\r\n\t\t\r\n\t\t//Check from change\r\n\t\tint sizeNow = fontSize;\r\n\t\tif(sizeNow == sizeThen)return;\r\n\t\tsizeThen = sizeNow;\r\n\t\t\r\n\t\t//Set units\r\n\t\tmarkWidth = (double) sizeNow / 15;\r\n\t\tsizePaintLength = p.textLength(text, surface, sizeNow, bold, italic);\r\n\t\tif (viewPaintLength != viewPaintLength) viewPaintLength = sizePaintLength;\r\n\t}", "public Font getFont() {\n\treturn font;\n }", "public Font getFont() {\n\treturn font;\n }", "public static float textHeight(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).height;\n }", "private void drawDistanceText(float[] fishPosition, float[] fishRotation) {\n\t\t//Draw distance texts\n\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t//Draw X text\n\t\t\tgl.glRasterPos3f(fishPosition[0]/2,0.002f,fishPosition[2]);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, fishPosition[0]+\"\");\n\t\t\tgl.glEnd();\n\t\t//Draw Y text\n\t\t\tgl.glRasterPos3f(fishPosition[0]-0.002f,fishPosition[1]/2,fishPosition[2]-0.002f);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, fishPosition[1]+\"\");\n\t\t\tgl.glEnd();\n\t\t//Draw Z text\n\t\t\tgl.glRasterPos3f(fishPosition[0],0.002f,fishPosition[2]/2);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, fishPosition[2]+\"\");\n\t\t\tgl.glEnd();\n\t\t//Draw Angle text\n\t\t\tgl.glRasterPos3f(fishPosition[0],fishPosition[1]+0.06f,fishPosition[2]);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, \"Rotation: \"+fishRotation[0]+\" °\");\n\t\t\tgl.glEnd();\n\t\t\t\n\t\t//Draw text of distance from 0,0,0 to fish\n\t\tfloat distanceBetween = (float)Math.sqrt((Math.pow((fishPosition[0]-0f), 2f))+(Math.pow((fishPosition[1]-0f), 2f))+(Math.pow((fishPosition[2]-0f), 2f)));\n\t\tgl.glRasterPos3f(fishPosition[0]/2, fishPosition[1]/2, fishPosition[2]/2);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, distanceBetween+\"\");\n\t\tgl.glEnd();\n\t}", "public int getStart ()\r\n {\r\n return glyph.getBounds().x;\r\n }", "private FontBoxFont findFont(FontFormat format, String postScriptName) {\n/* 403 */ if (postScriptName == null)\n/* */ {\n/* 405 */ return null;\n/* */ }\n/* */ \n/* */ \n/* 409 */ if (this.fontProvider == null)\n/* */ {\n/* 411 */ getProvider();\n/* */ }\n/* */ \n/* */ \n/* 415 */ FontInfo info = getFont(format, postScriptName);\n/* 416 */ if (info != null)\n/* */ {\n/* 418 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 422 */ info = getFont(format, postScriptName.replaceAll(\"-\", \"\"));\n/* 423 */ if (info != null)\n/* */ {\n/* 425 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 429 */ for (String substituteName : getSubstitutes(postScriptName)) {\n/* */ \n/* 431 */ info = getFont(format, substituteName);\n/* 432 */ if (info != null)\n/* */ {\n/* 434 */ return info.getFont();\n/* */ }\n/* */ } \n/* */ \n/* */ \n/* 439 */ info = getFont(format, postScriptName.replaceAll(\",\", \"-\"));\n/* 440 */ if (info != null)\n/* */ {\n/* 442 */ return info.getFont();\n/* */ }\n/* */ \n/* */ \n/* 446 */ info = getFont(format, postScriptName + \"-Regular\");\n/* 447 */ if (info != null)\n/* */ {\n/* 449 */ return info.getFont();\n/* */ }\n/* */ \n/* 452 */ return null;\n/* */ }", "public float getWidth() {\n\t\t\n\t\tfloat width= 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\twidth += font.getChar(text.charAt(i)).X_ADVANCE * size;\n\t\t}\n\t\t\n\t\treturn width;\n\t}", "public RMFont getFont()\n {\n return getStyle().getFont();\n }", "COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}", "public float getPos() {\n return (spos - xpos) / (swidth - sheight);\n }", "public FontStyle getStyle();", "public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }", "static FontMetrics pickFont(Graphics2D g2,\n String longString,\n int xSpace) \n\t{\n\t Font font = g2.getFont();\n\t String name = font.getName();\n\t int style = font.getStyle();\n\t\tg2.setFont(font = new Font(name, style, minFontSize+20));\n\t do\n\t\t{\n\t\t\tFontMetrics fontMetrics = g2.getFontMetrics();\n\t \tif ( (fontMetrics.getHeight() <= maxCharHeight)\n \t\t && (fontMetrics.stringWidth(longString)) <= xSpace)\n\t\t\tbreak;\n\t\t\tint size=g2.getFont().getSize();\n\t\t\tg2.setFont(font = new Font(name, style, size-1));\n \t} while (g2.getFont().getSize() > minFontSize);\n\n\t return g2.getFontMetrics();\n\t}", "public Point getCharacterPosition() {\n\t\treturn this.characterPosition;\n\t}", "public static Position getTextPosition(final Tree tree) {\n \treturn new Position(tree.getLine(), tree.getCharPositionInLine());\n }", "public int[] calculateAutoAdjustPosition() {\n int[] result = new int[2];\n if (mMainView.getLayoutParams() == null || !(mMainView.getLayoutParams() instanceof MarginLayoutParams)) {\n return result;\n }\n // adjust position so it will align pdfviewctrl layout\n measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);\n MarginLayoutParams mlp = (MarginLayoutParams) mMainView.getLayoutParams();\n\n\n int y;\n int verticalGravity = mGravity & Gravity.VERTICAL_GRAVITY_MASK;\n switch (verticalGravity) {\n case Gravity.TOP:\n y = mPDFViewCtrl.getTop() + mlp.topMargin;\n break;\n case Gravity.CENTER_VERTICAL:\n y = mPDFViewCtrl.getTop() + mPDFViewCtrl.getHeight() / 2 - getMeasuredHeight() / 2 + mlp.topMargin;\n break;\n default:\n y = mPDFViewCtrl.getBottom() - getMeasuredHeight() - mlp.bottomMargin;\n break;\n }\n\n result[1] = y;\n\n int x;\n int gravity = Utils.isJellyBeanMR1() ? Gravity.getAbsoluteGravity(mGravity, getLayoutDirection()) : mGravity;\n int horizontalGravity = gravity & Gravity.HORIZONTAL_GRAVITY_MASK;\n switch (horizontalGravity) {\n case Gravity.RIGHT:\n x = mPDFViewCtrl.getRight() - getMeasuredWidth()\n - mlp.leftMargin - mlp.rightMargin;\n break;\n case Gravity.CENTER_HORIZONTAL:\n x = mPDFViewCtrl.getLeft() + mPDFViewCtrl.getWidth() / 2 - getMeasuredWidth() / 2 + mlp.leftMargin;\n break;\n default:\n x = mPDFViewCtrl.getLeft() + mlp.leftMargin;\n break;\n }\n result[0] = x;\n return result;\n }", "private void setFont() {\n\t}", "public String getFont() {\n return font;\n }", "public Font getFont() {\n return font;\n }", "public Font getFont() {\n\t\treturn f;\n\t}", "private void m27464b() {\n this.f25306u = 0;\n this.f25307v = 0;\n if (this.f25277aa) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(0)));\n } else if (m27462a(this.f25273T)) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(this.f25273T)));\n } else if (!TextUtils.isEmpty(this.f25302q)) {\n this.f25306u = (int) this.f25288c.measureText(this.f25302q);\n } else {\n for (Object valueOf : this.f25301p) {\n this.f25306u = Math.max(this.f25306u, (int) this.f25288c.measureText(String.valueOf(valueOf)));\n }\n }\n FontMetrics fontMetrics = this.f25288c.getFontMetrics();\n this.f25307v = (int) (fontMetrics.bottom - fontMetrics.top);\n }", "public Rectangle2D.Double getTextBounds() {\n\t\t\n\t\tdouble txtPinX = _parent.getTxtPinX();\n\t\tdouble txtPinY = _parent.getTxtPinY();\n\t\t\n\t\tdouble txtLocPinX = _parent.getTxtLocPinX();\n\t\tdouble txtLocPinY = _parent.getTxtLocPinY();\n\t\t\n\t\tdouble txtWidth = _parent.getTxtWidth();\n\t\tdouble txtHeight = _parent.getTxtHeight();\n\t\t\n\t\tdouble x = txtPinX - txtLocPinX;\n\t\tdouble y = txtPinY - txtLocPinY;\n\t\t\n\t\treturn new Rectangle2D.Double(x, y, txtWidth, txtHeight);\n\t}", "public double[] calcAvgCharMetrics() {\n double[] darrayMetrics = new double[TOTAL_IDX_CNT];\n if (!isChildListType()) {\n darrayMetrics[AVG_CHAR_WIDTH_IDX] = mnWidth;\n darrayMetrics[AVG_CHAR_HEIGHT_IDX] = mnHeight;\n darrayMetrics[CHAR_CNT_IDX] = 1.0; // weight.\n if (mType != UnitProtoType.Type.TYPE_UNKNOWN\n && mType != UnitProtoType.Type.TYPE_DOT\n && mType != UnitProtoType.Type.TYPE_ROUND_BRACKET\n && mType != UnitProtoType.Type.TYPE_SQUARE_BRACKET\n && mType != UnitProtoType.Type.TYPE_BRACE\n && mType != UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET\n && mType != UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET\n && mType != UnitProtoType.Type.TYPE_CLOSE_BRACE\n && mType != UnitProtoType.Type.TYPE_VERTICAL_LINE\n && mType != UnitProtoType.Type.TYPE_SUBTRACT\n && mType != UnitProtoType.Type.TYPE_SQRT_LEFT\n && mType != UnitProtoType.Type.TYPE_SQRT_SHORT\n && mType != UnitProtoType.Type.TYPE_SQRT_MEDIUM\n && mType != UnitProtoType.Type.TYPE_SQRT_LONG\n && mType != UnitProtoType.Type.TYPE_SQRT_TALL\n && mType != UnitProtoType.Type.TYPE_SQRT_VERY_TALL) {\n darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = mnWidth;\n darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = mnHeight;\n darrayMetrics[NORMAL_CHAR_CNT_IDX] = 1.0; // weight.\n } else {\n darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = mnWidth;\n darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = mnHeight;\n darrayMetrics[NORMAL_CHAR_CNT_IDX] = 0.0; // weight.\n }\n darrayMetrics[AVG_VGAP_IDX] = mnWidth;\n darrayMetrics[VGAP_CNT_IDX] = 0.0; // weight\n } else {\n double dSumWidth = 0, dSumNormalCharWidth = 0;\n double dSumHeight = 0, dSumNormalCharHeight = 0;\n double dTotalWeight = 0, dTotalNormalCharWeight = 0;\n double dVGap = 0, dTotalVGapWeight = 0;\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n double[] darrayThisMetrics = mlistChildren.get(idx).calcAvgCharMetrics();\n dSumWidth += darrayThisMetrics[AVG_CHAR_WIDTH_IDX] * darrayThisMetrics[CHAR_CNT_IDX];\n dSumNormalCharWidth += darrayThisMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] * darrayThisMetrics[NORMAL_CHAR_CNT_IDX];\n dSumHeight += darrayThisMetrics[AVG_CHAR_HEIGHT_IDX] * darrayThisMetrics[CHAR_CNT_IDX];\n dSumNormalCharHeight += darrayThisMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] * darrayThisMetrics[NORMAL_CHAR_CNT_IDX];\n dTotalWeight += darrayThisMetrics[CHAR_CNT_IDX];\n dTotalNormalCharWeight += darrayThisMetrics[NORMAL_CHAR_CNT_IDX];\n dVGap += darrayThisMetrics[AVG_VGAP_IDX] * darrayThisMetrics[VGAP_CNT_IDX];\n dTotalVGapWeight += darrayThisMetrics[VGAP_CNT_IDX];\n if (idx > 0 && (mnExprRecogType == EXPRRECOGTYPE_VBLANKCUT || mnExprRecogType == EXPRRECOGTYPE_VCUTMATRIX)) {\n double dThisVGap = mlistChildren.get(idx).mnLeft - mlistChildren.get(idx - 1).getRightPlus1();\n dVGap += (dThisVGap > 0)?dThisVGap:0;\n dTotalVGapWeight += (dThisVGap > 0)?1.0:0;\n }\n }\n darrayMetrics[AVG_CHAR_WIDTH_IDX] = Math.max(ConstantsMgr.msnMinCharWidthInUnit, dSumWidth / dTotalWeight);\n darrayMetrics[AVG_CHAR_HEIGHT_IDX] = Math.max(ConstantsMgr.msnMinCharHeightInUnit, dSumHeight / dTotalWeight);\n darrayMetrics[CHAR_CNT_IDX] = dTotalWeight;\n if (dTotalNormalCharWeight == 0) {\n darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = darrayMetrics[AVG_CHAR_WIDTH_IDX];\n darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = darrayMetrics[AVG_CHAR_HEIGHT_IDX];\n } else {\n darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = Math.max(ConstantsMgr.msnMinCharWidthInUnit, dSumNormalCharWidth / dTotalNormalCharWeight);\n darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = Math.max(ConstantsMgr.msnMinCharHeightInUnit, dSumNormalCharHeight / dTotalNormalCharWeight);\n }\n darrayMetrics[NORMAL_CHAR_CNT_IDX] = dTotalNormalCharWeight;\n if (dTotalVGapWeight == 0) {\n darrayMetrics[AVG_VGAP_IDX] = darrayMetrics[AVG_CHAR_WIDTH_IDX];\n } else {\n darrayMetrics[AVG_VGAP_IDX] = Math.max(ConstantsMgr.msnMinVGapWidthInUnit, dVGap / dTotalVGapWeight);\n }\n darrayMetrics[VGAP_CNT_IDX] = dTotalVGapWeight;\n }\n return darrayMetrics;\n }", "public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }", "@Override\n\tpublic Rectangle getBounds(String text) {\n\t\tint height = 0;\n\t\tint width = 0;\n\t\t//Initialize y to the maximum int\n\t\tint y = Integer.MAX_VALUE;\n\t\t\n\t\tchar[] chars = text.toCharArray();\n\t\t//First, find the lowest yoffset\n\t\tfor (char c : chars) {\n\t\t\tGlyph g = getGlyph(c);\n\t\t\tif (g != null) y = Math.min(g.getYOff(), y);\n\t\t}\n\t\tfor (char c : chars) {\n\t\t\tGlyph g = getGlyph(c);\n\t\t\tif (g != null) {\n\t\t\t\theight = Math.max(g.getHeight() + (g.getYOff() - y), height);\n\t\t\t\twidth += g.getXAdvance();\n\t\t\t}\n\t\t}\n\t\treturn new Rectangle(0, y, width, height);\n\t}", "private int calculateFontSize(ImageProcessor processor, double ratioHeightForLabel) {\n // Converts sumSizes into the average size in each dimension\n sumSizes.scale(1.0 / labels.size());\n FontSizeCalculator calculator = new FontSizeCalculator(processor, labels.stream());\n return calculator.calculateOptimalFontSize(sumSizes, ratioHeightForLabel);\n }", "public PRectangle getFontBBox() {\n Object value = library.getObject(entries, FONT_BBOX);\n if (value instanceof Vector) {\n Vector rectangle = (Vector) value;\n return new PRectangle(rectangle);\n }\n return null;\n }", "public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }", "private void calculateLineHeight() {\n\tGC gc = getGC();\n\tlineEndSpaceWidth = gc.stringExtent(\" \").x;\t\n\t\n\t// don't assume that bold and normal fonts have the same height\n\t// fixes bug 41773\n\tFont originalFont = gc.getFont();\n\tFontMetrics metrics = gc.getFontMetrics();\n\tascent = Math.max(ascent, metrics.getAscent() + metrics.getLeading());\n\tdescent = Math.max(descent, metrics.getDescent());\n\taverageCharWidth = Math.max(averageCharWidth, metrics.getAverageCharWidth());\n\tgc.setFont(getFont(SWT.BOLD));\n\tmetrics = gc.getFontMetrics();\n\tascent = Math.max(ascent, metrics.getAscent() + metrics.getLeading());\n\tdescent = Math.max(descent, metrics.getDescent());\n\taverageCharWidth = Math.max(averageCharWidth, metrics.getAverageCharWidth());\n\tgc.setFont(getFont(SWT.ITALIC));\n\tmetrics = gc.getFontMetrics();\n\tascent = Math.max(ascent, metrics.getAscent() + metrics.getLeading());\n\tdescent = Math.max(descent, metrics.getDescent());\n\taverageCharWidth = Math.max(averageCharWidth, metrics.getAverageCharWidth());\n\tgc.setFont(getFont(SWT.BOLD | SWT.ITALIC));\n\tmetrics = gc.getFontMetrics();\n\tascent = Math.max(ascent, metrics.getAscent() + metrics.getLeading());\n\tdescent = Math.max(descent, metrics.getDescent());\n\taverageCharWidth = Math.max(averageCharWidth, metrics.getAverageCharWidth());\n\tgc.setFont(originalFont);\n\tdisposeGC(gc);\n\t\n\t// clear the font cache\n\tif (boldFont != null) boldFont.dispose();\n\tif (italicFont != null) italicFont.dispose();\n\tif (boldItalicFont != null) boldItalicFont.dispose();\n\tboldFont = italicFont = boldItalicFont = null;\n}", "public DisplayText (GraphicsContext gc, Canvas gameCanvas, int size) {\n\t\tthis.gc = gc;\n\t\tthis.gameCanvas = gameCanvas;\n\t\t\n\t\t vector = Font.loadFont(getClass().getResourceAsStream(\"/fonts/Vectorb.ttf\"), size); //load my custom font at the specified size \n\t}" ]
[ "0.68209356", "0.6188208", "0.6015358", "0.5940602", "0.5936584", "0.59121275", "0.5899726", "0.5881555", "0.58537817", "0.5808929", "0.5797055", "0.5789813", "0.57858294", "0.5775746", "0.57517624", "0.57411015", "0.573105", "0.5702817", "0.5700128", "0.5685358", "0.56848127", "0.5664861", "0.5659315", "0.565802", "0.56280744", "0.56271726", "0.5623402", "0.56055176", "0.5604776", "0.5583627", "0.55391943", "0.5513196", "0.5510408", "0.5503932", "0.55031896", "0.5501625", "0.54752254", "0.5470966", "0.54632676", "0.5424544", "0.54193705", "0.5412241", "0.541186", "0.54117864", "0.5407274", "0.53983814", "0.53983814", "0.53983814", "0.5381664", "0.53787225", "0.5347517", "0.5337461", "0.5330979", "0.5316973", "0.53155917", "0.5303518", "0.5293734", "0.52919614", "0.5273218", "0.5247235", "0.52445614", "0.52297354", "0.5218583", "0.52170664", "0.5216515", "0.52132213", "0.5201588", "0.5201588", "0.5197034", "0.5183571", "0.5181924", "0.518052", "0.518052", "0.517956", "0.5179276", "0.51681", "0.51661944", "0.5164004", "0.5160965", "0.51569074", "0.5154358", "0.5152438", "0.5149327", "0.5148957", "0.5147015", "0.5144143", "0.5140053", "0.51386654", "0.513679", "0.5135835", "0.5134584", "0.51328015", "0.51325786", "0.512582", "0.51201683", "0.51194715", "0.5107081", "0.51059", "0.5105557", "0.5102777", "0.50985366" ]
0.0
-1
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump.
private com.fasterxml.jackson.core.JsonToken m13148b(boolean r15) { /* r14 = this; r10 = 45; r12 = 57; r11 = 48; r1 = 1; r2 = 0; r0 = r14.f8609n; r4 = r0.m13317l(); if (r15 == 0) goto L_0x0197; L_0x0010: r4[r2] = r10; r0 = r1; L_0x0013: r3 = r14.f8599d; r5 = r14.f8600e; if (r3 >= r5) goto L_0x0120; L_0x0019: r3 = r14.f8574N; r5 = r14.f8599d; r6 = r5 + 1; r14.d = r6; r3 = r3[r5]; L_0x0023: if (r3 != r11) goto L_0x0029; L_0x0025: r3 = r14.m13139W(); L_0x0029: r5 = r2; r13 = r3; r3 = r4; r4 = r13; L_0x002d: if (r4 < r11) goto L_0x0190; L_0x002f: if (r4 > r12) goto L_0x0190; L_0x0031: r5 = r5 + 1; r6 = r3.length; if (r0 < r6) goto L_0x003e; L_0x0036: r0 = r14.f8609n; r0 = r0.m13319n(); r3 = r0; r0 = r2; L_0x003e: r6 = r0 + 1; r3[r0] = r4; r0 = r14.f8599d; r4 = r14.f8600e; if (r0 < r4) goto L_0x0128; L_0x0048: r0 = r14.mo1754L(); if (r0 != 0) goto L_0x0128; L_0x004e: r7 = r1; r0 = r2; r9 = r5; r4 = r3; r5 = r6; L_0x0053: if (r9 != 0) goto L_0x0071; L_0x0055: r3 = new java.lang.StringBuilder; r6 = "Missing integer part (next char "; r3.<init>(r6); r6 = com.fasterxml.jackson.core.base.ParserMinimalBase.m13218e(r0); r3 = r3.append(r6); r6 = ")"; r3 = r3.append(r6); r3 = r3.toString(); r14.m13205c(r3); L_0x0071: r3 = 46; if (r0 != r3) goto L_0x0188; L_0x0075: r3 = r5 + 1; r4[r5] = r0; r5 = r4; r4 = r3; r3 = r0; r0 = r2; L_0x007d: r6 = r14.f8599d; r8 = r14.f8600e; if (r6 < r8) goto L_0x0135; L_0x0083: r6 = r14.mo1754L(); if (r6 != 0) goto L_0x0135; L_0x0089: r6 = r1; L_0x008a: if (r0 != 0) goto L_0x0091; L_0x008c: r7 = "Decimal point not followed by a digit"; r14.m13202a(r3, r7); L_0x0091: r8 = r0; r0 = r4; r13 = r3; r3 = r5; r5 = r13; L_0x0096: r4 = 101; // 0x65 float:1.42E-43 double:5.0E-322; if (r5 == r4) goto L_0x009e; L_0x009a: r4 = 69; if (r5 != r4) goto L_0x0180; L_0x009e: r4 = r3.length; if (r0 < r4) goto L_0x00a9; L_0x00a1: r0 = r14.f8609n; r0 = r0.m13319n(); r3 = r0; r0 = r2; L_0x00a9: r4 = r0 + 1; r3[r0] = r5; r0 = r14.f8599d; r5 = r14.f8600e; if (r0 >= r5) goto L_0x0155; L_0x00b3: r0 = r14.f8574N; r5 = r14.f8599d; r7 = r5 + 1; r14.d = r7; r5 = r0[r5]; L_0x00bd: if (r5 == r10) goto L_0x00c3; L_0x00bf: r0 = 43; if (r5 != r0) goto L_0x017a; L_0x00c3: r0 = r3.length; if (r4 < r0) goto L_0x0177; L_0x00c6: r0 = r14.f8609n; r3 = r0.m13319n(); r0 = r2; L_0x00cd: r4 = r0 + 1; r3[r0] = r5; r0 = r14.f8599d; r5 = r14.f8600e; if (r0 >= r5) goto L_0x015d; L_0x00d7: r0 = r14.f8574N; r5 = r14.f8599d; r7 = r5 + 1; r14.d = r7; r0 = r0[r5]; r5 = r3; r3 = r2; L_0x00e3: r7 = r0; r0 = r4; L_0x00e5: if (r7 > r12) goto L_0x0173; L_0x00e7: if (r7 < r11) goto L_0x0173; L_0x00e9: r3 = r3 + 1; r4 = r5.length; if (r0 < r4) goto L_0x00f5; L_0x00ee: r0 = r14.f8609n; r5 = r0.m13319n(); r0 = r2; L_0x00f5: r4 = r0 + 1; r5[r0] = r7; r0 = r14.f8599d; r10 = r14.f8600e; if (r0 < r10) goto L_0x0167; L_0x00ff: r0 = r14.mo1754L(); if (r0 != 0) goto L_0x0167; L_0x0105: r2 = r3; r0 = r1; r1 = r4; L_0x0108: if (r2 != 0) goto L_0x010f; L_0x010a: r3 = "Exponent indicator not followed by a digit"; r14.m13202a(r7, r3); L_0x010f: if (r0 != 0) goto L_0x0117; L_0x0111: r0 = r14.f8599d; r0 = r0 + -1; r14.d = r0; L_0x0117: r0 = r14.f8609n; r0.f8626j = r1; r0 = r14.m13200a(r15, r9, r8, r2); return r0; L_0x0120: r3 = "No digit following minus sign"; r3 = r14.m13150f(r3); goto L_0x0023; L_0x0128: r0 = r14.f8574N; r4 = r14.f8599d; r7 = r4 + 1; r14.d = r7; r4 = r0[r4]; r0 = r6; goto L_0x002d; L_0x0135: r3 = r14.f8574N; r6 = r14.f8599d; r8 = r6 + 1; r14.d = r8; r3 = r3[r6]; if (r3 < r11) goto L_0x0185; L_0x0141: if (r3 > r12) goto L_0x0185; L_0x0143: r0 = r0 + 1; r6 = r5.length; if (r4 < r6) goto L_0x0183; L_0x0148: r4 = r14.f8609n; r5 = r4.m13319n(); r6 = r2; L_0x014f: r4 = r6 + 1; r5[r6] = r3; goto L_0x007d; L_0x0155: r0 = "expected a digit for number exponent"; r5 = r14.m13150f(r0); goto L_0x00bd; L_0x015d: r0 = "expected a digit for number exponent"; r0 = r14.m13150f(r0); r5 = r3; r3 = r2; goto L_0x00e3; L_0x0167: r0 = r14.f8574N; r7 = r14.f8599d; r10 = r7 + 1; r14.d = r10; r0 = r0[r7]; goto L_0x00e3; L_0x0173: r2 = r3; r1 = r0; r0 = r6; goto L_0x0108; L_0x0177: r0 = r4; goto L_0x00cd; L_0x017a: r7 = r5; r0 = r4; r5 = r3; r3 = r2; goto L_0x00e5; L_0x0180: r1 = r0; r0 = r6; goto L_0x010f; L_0x0183: r6 = r4; goto L_0x014f; L_0x0185: r6 = r7; goto L_0x008a; L_0x0188: r8 = r2; r6 = r7; r3 = r4; r13 = r5; r5 = r0; r0 = r13; goto L_0x0096; L_0x0190: r7 = r2; r9 = r5; r5 = r0; r0 = r4; r4 = r3; goto L_0x0053; L_0x0197: r0 = r2; goto L_0x0013; */ throw new UnsupportedOperationException("Method not decompiled: com.fasterxml.jackson.core.json.ReaderBasedJsonParser.b(boolean):com.fasterxml.jackson.core.JsonToken"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }", "static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }", "public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }", "static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }", "private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }", "private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }", "public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }", "private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }", "private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }", "public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }", "public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }", "private void m50366E() {\n }", "public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }", "void m5768b() throws C0841b;", "void m1864a() {\r\n }", "public boolean method_2088(class_689 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5770d() throws C0841b;", "public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public final void mo91715d() {\n }", "public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }", "public void method_4270() {}", "private static void m13381a(long r3, float r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\n r0.beginTransaction();\t Catch:{ Exception -> 0x001f }\n r1 = \"INSERT INTO battery_watcher (timestamp, level) VALUES (?, ?)\";\t Catch:{ Exception -> 0x001f }\n r1 = r0.compileStatement(r1);\t Catch:{ Exception -> 0x001f }\n r2 = 1;\t Catch:{ Exception -> 0x001f }\n r1.bindLong(r2, r3);\t Catch:{ Exception -> 0x001f }\n r3 = 2;\t Catch:{ Exception -> 0x001f }\n r4 = (double) r5;\t Catch:{ Exception -> 0x001f }\n r1.bindDouble(r3, r4);\t Catch:{ Exception -> 0x001f }\n r1.execute();\t Catch:{ Exception -> 0x001f }\n r0.setTransactionSuccessful();\t Catch:{ Exception -> 0x001f }\n goto L_0x0026;\n L_0x001d:\n r3 = move-exception;\n goto L_0x002a;\n L_0x001f:\n r3 = f10646a;\t Catch:{ all -> 0x001d }\n r4 = \"Issue adding location to battery history\";\t Catch:{ all -> 0x001d }\n com.foursquare.internal.util.FsLog.m6807d(r3, r4);\t Catch:{ all -> 0x001d }\n L_0x0026:\n r0.endTransaction();\n return;\n L_0x002a:\n r0.endTransaction();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.a(long, float):void\");\n }", "static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }", "private static class_1205 method_6442(String param0, int param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2112(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "void m5769c() throws C0841b;", "void m5771e() throws C0841b;", "@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }", "public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }", "public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }", "@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }", "public boolean method_2243() {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "public void method_2116(class_689 param1, boolean param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "private static int m69982c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"android.os.Build$VERSION\";\t Catch:{ Exception -> 0x0018 }\n r0 = java.lang.Class.forName(r0);\t Catch:{ Exception -> 0x0018 }\n r1 = \"SDK_INT\";\t Catch:{ Exception -> 0x0018 }\n r0 = r0.getField(r1);\t Catch:{ Exception -> 0x0018 }\n r1 = 0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.get(r1);\t Catch:{ Exception -> 0x0018 }\n r0 = (java.lang.Integer) r0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.intValue();\t Catch:{ Exception -> 0x0018 }\n return r0;\n L_0x0018:\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.util.f.c():int\");\n }", "static void m7753b() {\n f8029a = false;\n }", "public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }", "public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }", "public void method_7080(String param1, class_1293 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void m9741j() throws cf {\r\n }", "private static void check(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.check(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.check(java.lang.String):void\");\n }", "public boolean method_2153(boolean param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void method_2259(String param1, double param2, double param4, double param6, int param8, double param9, double param11, double param13, double param15) {\r\n // $FF: Couldn't be decompiled\r\n }", "private void m50367F() {\n }", "public void mo21779D() {\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "public void method_2249(boolean param1, class_81 param2) {\r\n // $FF: Couldn't be decompiled\r\n }", "public void mo115190b() {\n }", "public final void mo1285b() {\n }", "public void mo23813b() {\n }", "public boolean method_208() {\r\n return false;\r\n }", "public final void mo11687c() {\n }", "public static com.facebook.ads.internal.p081a.C1714d m6464a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r1);\n if (r0 == 0) goto L_0x0009;\n L_0x0006:\n r1 = NONE;\n return r1;\n L_0x0009:\n r0 = java.util.Locale.US;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = r1.toUpperCase(r0);\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = com.facebook.ads.internal.p081a.C1714d.valueOf(r1);\t Catch:{ IllegalArgumentException -> 0x0014 }\n return r1;\n L_0x0014:\n r1 = NONE;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.a.d.a(java.lang.String):com.facebook.ads.internal.a.d\");\n }", "public final void mo51373a() {\n }", "void mo72113b();", "public boolean method_2434() {\r\n return false;\r\n }", "public void mo21787L() {\n }", "boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }", "private void kk12() {\n\n\t}", "void mo80457c();", "@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }", "public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }", "private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }", "public void m23075a() {\n }", "void mo80452a();", "public final int mo11683a(com.google.android.gms.internal.ads.bci r11, com.google.android.gms.internal.ads.bcn r12) {\n /*\n r10 = this;\n L_0x0000:\n int r12 = r10.f3925e\n r0 = -1\n r1 = 1\n r2 = 0\n switch(r12) {\n case 0: goto L_0x00b2;\n case 1: goto L_0x0044;\n case 2: goto L_0x000e;\n default: goto L_0x0008;\n }\n L_0x0008:\n java.lang.IllegalStateException r11 = new java.lang.IllegalStateException\n r11.<init>()\n throw r11\n L_0x000e:\n int r12 = r10.f3928h\n if (r12 <= 0) goto L_0x0031\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r0 = 3\n r11.mo11675b(r12, r2, r0)\n com.google.android.gms.internal.ads.bcq r12 = r10.f3924d\n com.google.android.gms.internal.ads.bkh r3 = r10.f3923c\n r12.mo11681a(r3, r0)\n int r12 = r10.f3929i\n int r12 = r12 + r0\n r10.f3929i = r12\n int r12 = r10.f3928h\n int r12 = r12 - r1\n r10.f3928h = r12\n goto L_0x000e\n L_0x0031:\n int r11 = r10.f3929i\n if (r11 <= 0) goto L_0x0041\n com.google.android.gms.internal.ads.bcq r3 = r10.f3924d\n long r4 = r10.f3927g\n r6 = 1\n int r7 = r10.f3929i\n r8 = 0\n r9 = 0\n r3.mo11680a(r4, r6, r7, r8, r9)\n L_0x0041:\n r10.f3925e = r1\n return r2\n L_0x0044:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n int r12 = r10.f3926f\n if (r12 != 0) goto L_0x006a\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 5\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x005a\n L_0x0058:\n r1 = 0\n goto L_0x008d\n L_0x005a:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12063j()\n r5 = 1000(0x3e8, double:4.94E-321)\n long r3 = r3 * r5\n r5 = 45\n long r3 = r3 / r5\n r10.f3927g = r3\n goto L_0x0083\n L_0x006a:\n int r12 = r10.f3926f\n if (r12 != r1) goto L_0x0097\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 9\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x007b\n goto L_0x0058\n L_0x007b:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12066m()\n r10.f3927g = r3\n L_0x0083:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3928h = r12\n r10.f3929i = r2\n L_0x008d:\n if (r1 == 0) goto L_0x0094\n r12 = 2\n r10.f3925e = r12\n goto L_0x0000\n L_0x0094:\n r10.f3925e = r2\n return r0\n L_0x0097:\n com.google.android.gms.internal.ads.bad r11 = new com.google.android.gms.internal.ads.bad\n int r12 = r10.f3926f\n r0 = 39\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>(r0)\n java.lang.String r0 = \"Unsupported version number: \"\n r1.append(r0)\n r1.append(r12)\n java.lang.String r12 = r1.toString()\n r11.<init>((java.lang.String) r12)\n throw r11\n L_0x00b2:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 8\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 == 0) goto L_0x00df\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12065l()\n int r2 = f3921a\n if (r12 != r2) goto L_0x00d7\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3926f = r12\n r2 = 1\n goto L_0x00df\n L_0x00d7:\n java.io.IOException r11 = new java.io.IOException\n java.lang.String r12 = \"Input not RawCC\"\n r11.<init>(r12)\n throw r11\n L_0x00df:\n if (r2 == 0) goto L_0x00e5\n r10.f3925e = r1\n goto L_0x0000\n L_0x00e5:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.bef.mo11683a(com.google.android.gms.internal.ads.bci, com.google.android.gms.internal.ads.bcn):int\");\n }", "public void mo12628c() {\n }", "public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }", "void mo41086b();", "private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "public void mo21785J() {\n }", "public final com.google.android.gms.internal.ads.zzafx mo4170d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19705f;\n monitor-enter(r0);\n r1 = r2.f19706g;\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n r1 = r1.m26175a();\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x000b:\n r1 = move-exception;\t Catch:{ all -> 0x000b }\n goto L_0x0010;\t Catch:{ all -> 0x000b }\n L_0x000d:\n r1 = 0;\t Catch:{ all -> 0x000b }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x0010:\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzafn.d():com.google.android.gms.internal.ads.zzafx\");\n }", "protected boolean func_70041_e_() { return false; }", "static /* synthetic */ void m204-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }", "public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }" ]
[ "0.7616782", "0.75728166", "0.7525724", "0.74507046", "0.74505866", "0.74373597", "0.7381616", "0.7381616", "0.7366568", "0.735341", "0.73420185", "0.73150736", "0.7308675", "0.73055106", "0.7274724", "0.72523946", "0.72216254", "0.71979403", "0.7177258", "0.7136552", "0.7106082", "0.70418596", "0.7024962", "0.70197546", "0.69911283", "0.69613564", "0.69409144", "0.6908151", "0.6890134", "0.68525946", "0.68281573", "0.67949134", "0.6784313", "0.6777685", "0.67725635", "0.677158", "0.6769469", "0.6767704", "0.67430586", "0.67081237", "0.6701509", "0.66999537", "0.6698843", "0.6698377", "0.6670063", "0.6668109", "0.66555125", "0.6613381", "0.661335", "0.6609933", "0.6594555", "0.65691173", "0.65659195", "0.6539569", "0.6514096", "0.65095544", "0.65094143", "0.6490445", "0.64368844", "0.6432842", "0.6430799", "0.6404235", "0.6401294", "0.6372685", "0.6369568", "0.6368447", "0.63579416", "0.6329343", "0.6326999", "0.63252985", "0.6317552", "0.6305244", "0.630364", "0.62988764", "0.6281612", "0.6281284", "0.6241846", "0.6228182", "0.622796", "0.62267816", "0.62259656", "0.62186515", "0.62184393", "0.6204782", "0.6197622", "0.61945254", "0.6180569", "0.61717045", "0.61680174", "0.6164003", "0.61634594", "0.6161363", "0.615725", "0.61552316", "0.61522835", "0.61414874", "0.61262673", "0.6115875", "0.6111993", "0.6102305", "0.6096556" ]
0.0
-1
Returns OgnlRuntime.NotFound if the property does not exist.
public Object getPossibleProperty( Map<String, Object> context, Object target, String name ) throws OgnlException { Object result; OgnlContext ognlContext = (OgnlContext) context; try { result = OgnlRuntime.getMethodValue( ognlContext, target, name, true ); if ( result == OgnlRuntime.NotFound ) { result = OgnlRuntime.getFieldValue( ognlContext, target, name, true ); } } catch ( OgnlException ex ) { throw ex; } catch ( Exception ex ) { throw new OgnlException( name, ex ); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getPropertyexists();", "String getPropertyExists();", "@Override\r\n\tpublic boolean propertyExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "@Override\n public Property getProperty() throws ItemNotFoundException,\n ValueFormatException, RepositoryException {\n return null;\n }", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }", "public boolean existsProperty(String name)\r\n\t{\r\n\t\treturn obtainOntProperty(name) != null;\r\n\t}", "public boolean isPropertyMissing() {\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\t}", "Property findProperty(String propertyName);", "@Override\r\n\tpublic Property getProperty(String absPath) throws PathNotFoundException,\r\n\t\t\tRepositoryException {\n\t\treturn null;\r\n\t}", "boolean hasGetProperty();", "public LpException missingConfigurationProperty(String propertyIri);", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "public boolean hasProperty( String key );", "public abstract boolean getProperty(String propertyName);", "public static <T> PropertyParseResult<T> failPropertyNotFound(String name) {\n return new PropertyParseResult<T>(null, name, null, Reason.PROPERTY_NOT_FOUND,\n Localization.PROPERTY_NOTFOUND.get(name));\n }", "boolean hasProperty(String propertyName);", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "boolean hasProperty(String key);", "boolean propertyExists(Object name) throws JMSException;", "Property getProperty();", "Property getProperty();", "@Override\n public String getProperty(String s) {\n return null;\n }", "String getProperty(String property);", "public static boolean hasProperty(String propID)\n throws DBException\n {\n SystemProps.Key propKey = new SystemProps.Key(propID);\n return propKey.exists();\n }", "public void testPropFindForNonExistingWorkspace() throws Exception\n {\n String file = TestUtils.getFileName();\n\n ContainerResponse response =\n service(WebDAVMethods.PROPFIND, getPathWS() + \"_\" + file, \"\", null, null);\n assertEquals(HTTPStatus.CONFLICT, response.getStatus());\n }", "public AlertApi.AlertObject getProperty(String prop) \n throws AlertException {\n AlertApi.AlertObject obj = null;\n AlertTreeNodeLeaf leaf = null;\n synchronized(AlertCorrelationEngine.class) {\n leaf = (AlertTreeNodeLeaf) propertiesMap.get(prop);\n }\n if (leaf != null) {\n String [] pathElements = leaf.parsePath();\n try {\n int nodeid = Integer.parseInt(pathElements[0]);\n int index = getIndexFromNodeId(nodeid);\n AlertNode curNode = getNodeFromIndex(index);\n if (curNode != null && curNode.isValid()) {\n obj = leaf.getAlertObject();\n return obj;\n }\n } catch (NumberFormatException nb) {\n logger.severe(\"invalid leaf, nodeid = \" + pathElements[0]);\n }\n }\n if (obj == null) {\n throw (new AlertException(\"property \" + prop + \" does not exist\"));\n }\n // To please compiler.\n return null;\n }", "String getProperty();", "String getProperty();", "String getProperty();", "Object getProperty(Long id, String name) throws RemoteException;", "boolean containsProperty(String name);", "public String propertyMissing(String name) {\n\t\treturn bnd.propertyMissing(name);\n\t}", "java.lang.String getProperty();", "Object getProperty(String name);", "boolean hasPropertyLike(String name);", "boolean hasProperty0();", "public boolean exists(String property) { // e.g. th:unless=\"${errors.exists('seaName')}\"\n return messages.hasMessageOf(property);\n }", "public boolean resourceNotFound() {\n return statusCode == 404;\n }", "public String getProperty(String propertyName) throws CoreException;", "public static Prop lookup(String propName) {\n Prop prop = BY_NAME.get(propName);\n if (prop == null) {\n throw new RuntimeException(\"property \" + propName + \" not found\");\n }\n return prop;\n }", "public Optional<Path> getOptionalPathProperty(String propertyName) {\n if(propertiesMap.containsKey(propertyName)) {\n Path path = Paths.get(propertiesMap.get(propertyName));\n if(Files.isReadable(path)) {\n return Optional.of(path);\n }\n }\n System.out.println(\"Property name \" + propertyName + \" is invalid\");\n return Optional.empty();\n }", "String getProperty(String name);", "Object getProperty(String key);", "String getProperty(String name, String defaultValue);", "public String runtimeProperty(String name) {\n if (_properties == null) {\n return null;\n }\n return _properties.get(name);\n }", "boolean hasProperty1();", "public String getProperty();", "public boolean hasProperty(String name) {\n return properties.has(name);\n }", "public boolean hasProperty( final String name )\n {\n return getPropertyClass( name ) != null;\n }", "boolean hasProperty2();", "public boolean propertyExists(String name)\n {\n return _propertyEntries.containsKey(name);\n }", "public static boolean propertyExists(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n boolean exists = props.containsKey(aKey);\n return exists;\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public boolean hasProperty( Property propertyId ) {\n return nodeProperties != null && nodeProperties.containsKey(propertyId);\n }", "public String getProperty(Object obj, String key, String defaultValue);", "Object getProperty(String requestedProperty) {\n return properties.getProperty(requestedProperty);\n }", "private JSType getPropertyType(JSType objType, String propName, Node n, FlowScope scope) {\nJSType unknownType = getNativeType(UNKNOWN_TYPE);\n JSType propertyType = null;\n boolean isLocallyInferred = false;\n // Scopes sometimes contain inferred type info about qualified names.\nString qualifiedName = n.getQualifiedName();\n StaticSlot<JSType> var = scope.getSlot(qualifiedName);\n if (var != null) {\n JSType varType = var.getType();\n if (varType != null) {\n boolean isDeclared = !var.isTypeInferred();\n isLocallyInferred = (var != syntacticScope.getSlot(qualifiedName));\n if (isDeclared || isLocallyInferred) {\n propertyType = varType;\n }\n }\n }\n if (propertyType == null && objType != null) {\n JSType foundType = objType.findPropertyType(propName);\n if (foundType != null) {\n propertyType = foundType;\n }\n }\n if ((propertyType == null || propertyType.isUnknownType()) && qualifiedName != null) {\n // If we find this node in the registry, then we can infer its type.\nObjectType regType = ObjectType.cast(registry.getType(qualifiedName));\n if (regType != null) {\n propertyType = regType.getConstructor();\n }\n }\n if (propertyType == null) {\n return getNativeType(UNKNOWN_TYPE);\n } else if (propertyType.equals(unknownType) && isLocallyInferred) {\n return getNativeType(CHECKED_UNKNOWN_TYPE);\n } else {\n return propertyType;\n }\n }", "public void _getPropertyByName() {\n requiredMethod(\"getProperties()\");\n boolean result;\n try {\n Property prop = oObj.getPropertyByName(IsThere.Name);\n result = (prop != null);\n } catch (com.sun.star.beans.UnknownPropertyException e) {\n log.println(\"Exception occurred while testing\" +\n \" getPropertyByName with existing property\");\n e.printStackTrace(log);\n result = false;\n }\n\n try {\n oObj.getPropertyByName(\"Jupp\");\n log.println(\"No Exception thrown while testing\"+\n \" getPropertyByName with non existing property\");\n result = false;\n }\n catch (UnknownPropertyException e) {\n result = true;\n }\n tRes.tested(\"getPropertyByName()\", result);\n return;\n }", "public Object getProperty(String arg0) {\n return null;\n }", "@Test\n public void getSlidesDocumentPropertyInvalidPropertyNameTest() throws ApiException {\n Boolean needAssertResponse = false;\n try {\n GetSlidesDocumentPropertyRequest request = createGetSlidesDocumentPropertyRequest();\n request.setPropertyName((String)invalidizeTestValue(request.getPropertyName(), \"propertyName\", \"String\"));\n initialize(\"getSlidesDocumentProperty\", \"propertyName\", request.getPropertyName());\n DocumentPropertyResponse response = api.getSlidesDocumentProperty(request);\n needAssertResponse = true;\n } catch (ApiException ex) {\n assertException(ex, \"propertyName\", \"getSlidesDocumentProperty\");\n }\n if (needAssertResponse) {\n assertResponse(\"propertyName\", \"getSlidesDocumentProperty\");\n }\n }", "@Override\n\t\tpublic Object getProperty(String key) {\n\t\t\treturn null;\n\t\t}", "public boolean isProperty();", "public static int verifyAndFetchOptionalProperty(String key,\r\n\t\t\tint defaultValue, Properties prop) {\r\n\t\tString property;\r\n\t\tproperty = fetchProperty(key, prop);\r\n\r\n\t\t// Property should not be blank.\r\n\t\tif (property == null || (property != null && property.trim().isEmpty())) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn Integer.parseInt(property);\r\n\t\t} catch (NumberFormatException numEx) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic CommPortIdentifier getPort() throws PropertyDoesNotExistException {\r\n\t\tif (this.settings.containsKey(\"port\")) {\r\n\t\t\tEnumeration<CommPortIdentifier> portList = CommPortIdentifier.getPortIdentifiers();\r\n\t\t\twhile (portList.hasMoreElements()) {\r\n\t\t\t\tCommPortIdentifier portId = portList.nextElement();\r\n\t\t\t\tif(portId.getName().equals(this.settings.get(\"port\"))) {\r\n\t\t\t\t\treturn portId;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tthrow new PropertyDoesNotExistException(\"Can't find property 'port'\");\r\n\t}", "protected static String lookup(ComponentContext context, String property) {\n if (context.getBundleContext().getProperty(property) != null) {\n return context.getBundleContext().getProperty(property);\n }\n\n if (context.getProperties().get(property) != null) {\n return context.getProperties().get(property).toString();\n }\n return null;\n }", "public abstract Object get(String oid) throws OIDDoesNotExistException;", "@Override\n public Object getProperty(String property) {\n for (Map.Entry<String, RequiredFunctionalExtension> requiredBehaviorEntry : myRequiredBehaviorById.entrySet()) {\n Object prop = requiredBehaviorEntry.getValue().getProperty(property);\n if (prop != null) {\n return prop;\n }\n }\n return null;\n }", "public Optional<Path> getOptionalResourcePath(@Nonnull String propertyName) {\n if(propertiesMap.containsKey(propertyName)) {\n try {\n URL resource = com.datagraphice.fcriscuo.alsdb.graphdb.poc.ReadResourceFileTest.class.getResource(propertiesMap.get(propertyName));\n return Optional.of( Paths.get(resource.toURI()));\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"Property name \" + propertyName + \" is invalid\");\n return Optional.empty();\n }", "@Test\n public void getSlidesDocumentPropertyTest() throws ApiException, Exception {\n initialize(\"getSlidesDocumentProperty\", null, null);\n Boolean needAssertResponse = false;\n DocumentPropertyResponse response = null;;\n try {\n GetSlidesDocumentPropertyRequest request = createGetSlidesDocumentPropertyRequest();\n response = api.getSlidesDocumentProperty(request);\n needAssertResponse = true;\n } catch (Exception ex) {\n assertSuccessfulException(ex, \"getSlidesDocumentProperty\");\n }\n if (needAssertResponse) {\n assertThat(response.getCode(), anyOf(equalTo(HttpStatusCode.OK), equalTo(HttpStatusCode.Created)));\n }\n }", "public static boolean checkPropertyExists(String propertyName) {\n\t\treturn CatPawConfig.getConfig().containsKey(propertyName);\n\n\t}", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "public boolean isProperty(Integer id, boolean searchPrototype) throws ExpException {\n return false;\n }", "public String getProperty(Object obj, String key);", "public Integer getProperty() {\n\t\t\treturn null;\n\t\t}", "public static SystemProps getProperty(String propKey)\n throws DBException\n {\n try {\n return SystemProps.getProperty(propKey, false); // do not create\n } catch (DBNotFoundException dbnfe) {\n return null; // not found\n }\n }", "public String getProperty(String name);", "public boolean hasProperty() {\n return !properties.isEmpty();\n }", "int getProperty0();", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "String get(String kind, String name, String property);", "public static boolean checkPropertyExists(String propertyName) {\n checkArgument(propertyName != null, \"Property name cannot be null\");\n return getConfig().containsKey(propertyName);\n }", "public Optional<Object> getProperty(String name) {\n return Optional.ofNullable(properties.get(name));\n }", "private <X extends JsonValue> Optional<X> findByKey(String property, Class<X> expected) {\n checkNotNull(property, \"property must not be null\");\n if (asJsonObject().containsKey(property)) {\n JsonValue jsonValue = asJsonObject().get(property);\n if (!expected.isAssignableFrom(jsonValue.getClass())) {\n final ValueType valueType = JsonUtils.jsonTypeForClass(expected);\n throw new UnexpectedValueException(location.child(property), jsonValue, valueType);\n }\n return Optional.of(expected.cast(jsonValue));\n }\n return Optional.empty();\n }", "abstract boolean hasXMLProperty(XMLName name);", "@Override\n\tpublic boolean isLabelProperty(Object obj, String s) {\n\t\treturn false;\n\t}", "private String getProperty(String property) {\n String ret = sdkProperties.getProperty(property);\n if (null == ret) {\n logger.warn(String.format(\"No configuration value found for '%s'\", property));\n }\n return ret;\n }", "public final void entryRuleFindProperty() throws RecognitionException {\n try {\n // InternalBrowser.g:754:1: ( ruleFindProperty EOF )\n // InternalBrowser.g:755:1: ruleFindProperty EOF\n {\n before(grammarAccess.getFindPropertyRule()); \n pushFollow(FOLLOW_1);\n ruleFindProperty();\n\n state._fsp--;\n\n after(grammarAccess.getFindPropertyRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public boolean _non_existent() {\n return false;\n }", "public void testGetObjectSpecificationWithNotFoundIdentifier() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n try {\r\n specificationFactory.getObjectSpecification(\"key\", \"identifier2\");\r\n fail(\"UnknownReferenceException is expected.\");\r\n } catch (UnknownReferenceException e) {\r\n // ok\r\n }\r\n }", "public boolean hasProperty(Pp property) {\n return properties.contains(property);\n }", "public Object getPropertyValue(Object propertyId) {\n\t\tif (properties.containsKey(propertyId)) {\n\t\t\treturn properties.get(propertyId);\n\t\t}\n\t\tthrow new PropertyNotAvailableException();\n\t}", "public Variable getProperty(String propertyName)\r\n\t{\r\n\t\t// search own properties:\r\n\t\tfor (int i=0; i<properties.size(); i++)\r\n\t\t{\r\n\t\t\tif (properties.get(i).name.equals(propertyName))\r\n\t\t\t\treturn properties.get(i);\r\n\t\t}\r\n\t\t// if we have a base class, let it search for properties, or return null\r\n\t\tif (baseClass != null)\r\n\t\t\treturn baseClass.getProperty(propertyName);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public static String getProperty(String propertyName){\r\n String val = userProps.getProperty(propertyName);\r\n\r\n if (val == null)\r\n return jinProps.getProperty(propertyName);\r\n else\r\n return val;\r\n }" ]
[ "0.6582434", "0.6407995", "0.6195812", "0.6037434", "0.6026258", "0.5992563", "0.5878664", "0.58420646", "0.5813849", "0.58131534", "0.57817465", "0.57695705", "0.57695705", "0.57695705", "0.5746356", "0.56998545", "0.568238", "0.56489253", "0.56294394", "0.55943847", "0.5593494", "0.5539985", "0.5539985", "0.5473125", "0.5438423", "0.5427423", "0.54226005", "0.5393312", "0.5380236", "0.5380236", "0.5380236", "0.53775334", "0.5371407", "0.5361596", "0.53526527", "0.5343909", "0.534176", "0.53342867", "0.5332407", "0.5287673", "0.5284411", "0.5273014", "0.5235174", "0.52177066", "0.52027434", "0.5199031", "0.519503", "0.5172715", "0.5159414", "0.5152508", "0.51479775", "0.51447165", "0.51385015", "0.51226175", "0.51020336", "0.51020336", "0.51020336", "0.50989836", "0.50874174", "0.5085347", "0.50815785", "0.5077955", "0.5068955", "0.5062897", "0.50447696", "0.5026503", "0.50259495", "0.5024834", "0.49939573", "0.4991892", "0.49884522", "0.49870965", "0.4983819", "0.49729553", "0.49710888", "0.49710888", "0.4967215", "0.4964527", "0.49640355", "0.49310234", "0.49045008", "0.490329", "0.48996586", "0.4898356", "0.4898356", "0.4895813", "0.4895813", "0.48921388", "0.4883676", "0.48836705", "0.48836556", "0.48790225", "0.48766303", "0.48764282", "0.48761666", "0.4868631", "0.4866051", "0.48653352", "0.48644522", "0.4861818", "0.48587906" ]
0.0
-1
Returns OgnlRuntime.NotFound if the property does not exist.
public Object setPossibleProperty( Map<String, Object> context, Object target, String name, Object value ) throws OgnlException { Object result = null; OgnlContext ognlContext = (OgnlContext) context; try { if ( !OgnlRuntime.setMethodValue( ognlContext, target, name, value, true ) ) { result = OgnlRuntime.setFieldValue( ognlContext, target, name, value ) ? null : OgnlRuntime.NotFound; } if ( result == OgnlRuntime.NotFound ) { Method m = OgnlRuntime.getWriteMethod( target.getClass(), name ); if ( m != null ) { result = m.invoke( target, value ); } } } catch ( OgnlException ex ) { throw ex; } catch ( Exception ex ) { throw new OgnlException( name, ex ); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getPropertyexists();", "String getPropertyExists();", "@Override\r\n\tpublic boolean propertyExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "@Override\n public Property getProperty() throws ItemNotFoundException,\n ValueFormatException, RepositoryException {\n return null;\n }", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }", "public boolean existsProperty(String name)\r\n\t{\r\n\t\treturn obtainOntProperty(name) != null;\r\n\t}", "public boolean isPropertyMissing() {\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\t}", "Property findProperty(String propertyName);", "@Override\r\n\tpublic Property getProperty(String absPath) throws PathNotFoundException,\r\n\t\t\tRepositoryException {\n\t\treturn null;\r\n\t}", "boolean hasGetProperty();", "public LpException missingConfigurationProperty(String propertyIri);", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "public boolean hasProperty( String key );", "public abstract boolean getProperty(String propertyName);", "public static <T> PropertyParseResult<T> failPropertyNotFound(String name) {\n return new PropertyParseResult<T>(null, name, null, Reason.PROPERTY_NOT_FOUND,\n Localization.PROPERTY_NOTFOUND.get(name));\n }", "boolean hasProperty(String propertyName);", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "boolean propertyExists(Object name) throws JMSException;", "boolean hasProperty(String key);", "Property getProperty();", "Property getProperty();", "@Override\n public String getProperty(String s) {\n return null;\n }", "String getProperty(String property);", "public static boolean hasProperty(String propID)\n throws DBException\n {\n SystemProps.Key propKey = new SystemProps.Key(propID);\n return propKey.exists();\n }", "public void testPropFindForNonExistingWorkspace() throws Exception\n {\n String file = TestUtils.getFileName();\n\n ContainerResponse response =\n service(WebDAVMethods.PROPFIND, getPathWS() + \"_\" + file, \"\", null, null);\n assertEquals(HTTPStatus.CONFLICT, response.getStatus());\n }", "public AlertApi.AlertObject getProperty(String prop) \n throws AlertException {\n AlertApi.AlertObject obj = null;\n AlertTreeNodeLeaf leaf = null;\n synchronized(AlertCorrelationEngine.class) {\n leaf = (AlertTreeNodeLeaf) propertiesMap.get(prop);\n }\n if (leaf != null) {\n String [] pathElements = leaf.parsePath();\n try {\n int nodeid = Integer.parseInt(pathElements[0]);\n int index = getIndexFromNodeId(nodeid);\n AlertNode curNode = getNodeFromIndex(index);\n if (curNode != null && curNode.isValid()) {\n obj = leaf.getAlertObject();\n return obj;\n }\n } catch (NumberFormatException nb) {\n logger.severe(\"invalid leaf, nodeid = \" + pathElements[0]);\n }\n }\n if (obj == null) {\n throw (new AlertException(\"property \" + prop + \" does not exist\"));\n }\n // To please compiler.\n return null;\n }", "String getProperty();", "String getProperty();", "String getProperty();", "Object getProperty(Long id, String name) throws RemoteException;", "boolean containsProperty(String name);", "public String propertyMissing(String name) {\n\t\treturn bnd.propertyMissing(name);\n\t}", "java.lang.String getProperty();", "Object getProperty(String name);", "boolean hasPropertyLike(String name);", "boolean hasProperty0();", "public boolean exists(String property) { // e.g. th:unless=\"${errors.exists('seaName')}\"\n return messages.hasMessageOf(property);\n }", "public boolean resourceNotFound() {\n return statusCode == 404;\n }", "public String getProperty(String propertyName) throws CoreException;", "public static Prop lookup(String propName) {\n Prop prop = BY_NAME.get(propName);\n if (prop == null) {\n throw new RuntimeException(\"property \" + propName + \" not found\");\n }\n return prop;\n }", "public Optional<Path> getOptionalPathProperty(String propertyName) {\n if(propertiesMap.containsKey(propertyName)) {\n Path path = Paths.get(propertiesMap.get(propertyName));\n if(Files.isReadable(path)) {\n return Optional.of(path);\n }\n }\n System.out.println(\"Property name \" + propertyName + \" is invalid\");\n return Optional.empty();\n }", "String getProperty(String name);", "Object getProperty(String key);", "String getProperty(String name, String defaultValue);", "public String runtimeProperty(String name) {\n if (_properties == null) {\n return null;\n }\n return _properties.get(name);\n }", "boolean hasProperty1();", "public String getProperty();", "public boolean hasProperty(String name) {\n return properties.has(name);\n }", "public boolean hasProperty( final String name )\n {\n return getPropertyClass( name ) != null;\n }", "boolean hasProperty2();", "public boolean propertyExists(String name)\n {\n return _propertyEntries.containsKey(name);\n }", "public static boolean propertyExists(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n boolean exists = props.containsKey(aKey);\n return exists;\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "public boolean hasProperty( Property propertyId ) {\n return nodeProperties != null && nodeProperties.containsKey(propertyId);\n }", "public String getProperty(Object obj, String key, String defaultValue);", "Object getProperty(String requestedProperty) {\n return properties.getProperty(requestedProperty);\n }", "private JSType getPropertyType(JSType objType, String propName, Node n, FlowScope scope) {\nJSType unknownType = getNativeType(UNKNOWN_TYPE);\n JSType propertyType = null;\n boolean isLocallyInferred = false;\n // Scopes sometimes contain inferred type info about qualified names.\nString qualifiedName = n.getQualifiedName();\n StaticSlot<JSType> var = scope.getSlot(qualifiedName);\n if (var != null) {\n JSType varType = var.getType();\n if (varType != null) {\n boolean isDeclared = !var.isTypeInferred();\n isLocallyInferred = (var != syntacticScope.getSlot(qualifiedName));\n if (isDeclared || isLocallyInferred) {\n propertyType = varType;\n }\n }\n }\n if (propertyType == null && objType != null) {\n JSType foundType = objType.findPropertyType(propName);\n if (foundType != null) {\n propertyType = foundType;\n }\n }\n if ((propertyType == null || propertyType.isUnknownType()) && qualifiedName != null) {\n // If we find this node in the registry, then we can infer its type.\nObjectType regType = ObjectType.cast(registry.getType(qualifiedName));\n if (regType != null) {\n propertyType = regType.getConstructor();\n }\n }\n if (propertyType == null) {\n return getNativeType(UNKNOWN_TYPE);\n } else if (propertyType.equals(unknownType) && isLocallyInferred) {\n return getNativeType(CHECKED_UNKNOWN_TYPE);\n } else {\n return propertyType;\n }\n }", "public void _getPropertyByName() {\n requiredMethod(\"getProperties()\");\n boolean result;\n try {\n Property prop = oObj.getPropertyByName(IsThere.Name);\n result = (prop != null);\n } catch (com.sun.star.beans.UnknownPropertyException e) {\n log.println(\"Exception occurred while testing\" +\n \" getPropertyByName with existing property\");\n e.printStackTrace(log);\n result = false;\n }\n\n try {\n oObj.getPropertyByName(\"Jupp\");\n log.println(\"No Exception thrown while testing\"+\n \" getPropertyByName with non existing property\");\n result = false;\n }\n catch (UnknownPropertyException e) {\n result = true;\n }\n tRes.tested(\"getPropertyByName()\", result);\n return;\n }", "public Object getProperty(String arg0) {\n return null;\n }", "@Test\n public void getSlidesDocumentPropertyInvalidPropertyNameTest() throws ApiException {\n Boolean needAssertResponse = false;\n try {\n GetSlidesDocumentPropertyRequest request = createGetSlidesDocumentPropertyRequest();\n request.setPropertyName((String)invalidizeTestValue(request.getPropertyName(), \"propertyName\", \"String\"));\n initialize(\"getSlidesDocumentProperty\", \"propertyName\", request.getPropertyName());\n DocumentPropertyResponse response = api.getSlidesDocumentProperty(request);\n needAssertResponse = true;\n } catch (ApiException ex) {\n assertException(ex, \"propertyName\", \"getSlidesDocumentProperty\");\n }\n if (needAssertResponse) {\n assertResponse(\"propertyName\", \"getSlidesDocumentProperty\");\n }\n }", "@Override\n\t\tpublic Object getProperty(String key) {\n\t\t\treturn null;\n\t\t}", "public boolean isProperty();", "public static int verifyAndFetchOptionalProperty(String key,\r\n\t\t\tint defaultValue, Properties prop) {\r\n\t\tString property;\r\n\t\tproperty = fetchProperty(key, prop);\r\n\r\n\t\t// Property should not be blank.\r\n\t\tif (property == null || (property != null && property.trim().isEmpty())) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn Integer.parseInt(property);\r\n\t\t} catch (NumberFormatException numEx) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic CommPortIdentifier getPort() throws PropertyDoesNotExistException {\r\n\t\tif (this.settings.containsKey(\"port\")) {\r\n\t\t\tEnumeration<CommPortIdentifier> portList = CommPortIdentifier.getPortIdentifiers();\r\n\t\t\twhile (portList.hasMoreElements()) {\r\n\t\t\t\tCommPortIdentifier portId = portList.nextElement();\r\n\t\t\t\tif(portId.getName().equals(this.settings.get(\"port\"))) {\r\n\t\t\t\t\treturn portId;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tthrow new PropertyDoesNotExistException(\"Can't find property 'port'\");\r\n\t}", "public abstract Object get(String oid) throws OIDDoesNotExistException;", "protected static String lookup(ComponentContext context, String property) {\n if (context.getBundleContext().getProperty(property) != null) {\n return context.getBundleContext().getProperty(property);\n }\n\n if (context.getProperties().get(property) != null) {\n return context.getProperties().get(property).toString();\n }\n return null;\n }", "@Override\n public Object getProperty(String property) {\n for (Map.Entry<String, RequiredFunctionalExtension> requiredBehaviorEntry : myRequiredBehaviorById.entrySet()) {\n Object prop = requiredBehaviorEntry.getValue().getProperty(property);\n if (prop != null) {\n return prop;\n }\n }\n return null;\n }", "public Optional<Path> getOptionalResourcePath(@Nonnull String propertyName) {\n if(propertiesMap.containsKey(propertyName)) {\n try {\n URL resource = com.datagraphice.fcriscuo.alsdb.graphdb.poc.ReadResourceFileTest.class.getResource(propertiesMap.get(propertyName));\n return Optional.of( Paths.get(resource.toURI()));\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"Property name \" + propertyName + \" is invalid\");\n return Optional.empty();\n }", "@Test\n public void getSlidesDocumentPropertyTest() throws ApiException, Exception {\n initialize(\"getSlidesDocumentProperty\", null, null);\n Boolean needAssertResponse = false;\n DocumentPropertyResponse response = null;;\n try {\n GetSlidesDocumentPropertyRequest request = createGetSlidesDocumentPropertyRequest();\n response = api.getSlidesDocumentProperty(request);\n needAssertResponse = true;\n } catch (Exception ex) {\n assertSuccessfulException(ex, \"getSlidesDocumentProperty\");\n }\n if (needAssertResponse) {\n assertThat(response.getCode(), anyOf(equalTo(HttpStatusCode.OK), equalTo(HttpStatusCode.Created)));\n }\n }", "public static boolean checkPropertyExists(String propertyName) {\n\t\treturn CatPawConfig.getConfig().containsKey(propertyName);\n\n\t}", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "public boolean isProperty(Integer id, boolean searchPrototype) throws ExpException {\n return false;\n }", "public Integer getProperty() {\n\t\t\treturn null;\n\t\t}", "public String getProperty(Object obj, String key);", "public static SystemProps getProperty(String propKey)\n throws DBException\n {\n try {\n return SystemProps.getProperty(propKey, false); // do not create\n } catch (DBNotFoundException dbnfe) {\n return null; // not found\n }\n }", "public String getProperty(String name);", "public boolean hasProperty() {\n return !properties.isEmpty();\n }", "int getProperty0();", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "@Override\n public boolean getIfNotExist() {\n return ifNotExist_;\n }", "String get(String kind, String name, String property);", "public Optional<Object> getProperty(String name) {\n return Optional.ofNullable(properties.get(name));\n }", "public static boolean checkPropertyExists(String propertyName) {\n checkArgument(propertyName != null, \"Property name cannot be null\");\n return getConfig().containsKey(propertyName);\n }", "private <X extends JsonValue> Optional<X> findByKey(String property, Class<X> expected) {\n checkNotNull(property, \"property must not be null\");\n if (asJsonObject().containsKey(property)) {\n JsonValue jsonValue = asJsonObject().get(property);\n if (!expected.isAssignableFrom(jsonValue.getClass())) {\n final ValueType valueType = JsonUtils.jsonTypeForClass(expected);\n throw new UnexpectedValueException(location.child(property), jsonValue, valueType);\n }\n return Optional.of(expected.cast(jsonValue));\n }\n return Optional.empty();\n }", "abstract boolean hasXMLProperty(XMLName name);", "@Override\n\tpublic boolean isLabelProperty(Object obj, String s) {\n\t\treturn false;\n\t}", "private String getProperty(String property) {\n String ret = sdkProperties.getProperty(property);\n if (null == ret) {\n logger.warn(String.format(\"No configuration value found for '%s'\", property));\n }\n return ret;\n }", "public final void entryRuleFindProperty() throws RecognitionException {\n try {\n // InternalBrowser.g:754:1: ( ruleFindProperty EOF )\n // InternalBrowser.g:755:1: ruleFindProperty EOF\n {\n before(grammarAccess.getFindPropertyRule()); \n pushFollow(FOLLOW_1);\n ruleFindProperty();\n\n state._fsp--;\n\n after(grammarAccess.getFindPropertyRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public boolean _non_existent() {\n return false;\n }", "public void testGetObjectSpecificationWithNotFoundIdentifier() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n try {\r\n specificationFactory.getObjectSpecification(\"key\", \"identifier2\");\r\n fail(\"UnknownReferenceException is expected.\");\r\n } catch (UnknownReferenceException e) {\r\n // ok\r\n }\r\n }", "public Object getPropertyValue(Object propertyId) {\n\t\tif (properties.containsKey(propertyId)) {\n\t\t\treturn properties.get(propertyId);\n\t\t}\n\t\tthrow new PropertyNotAvailableException();\n\t}", "public boolean hasProperty(Pp property) {\n return properties.contains(property);\n }", "public Variable getProperty(String propertyName)\r\n\t{\r\n\t\t// search own properties:\r\n\t\tfor (int i=0; i<properties.size(); i++)\r\n\t\t{\r\n\t\t\tif (properties.get(i).name.equals(propertyName))\r\n\t\t\t\treturn properties.get(i);\r\n\t\t}\r\n\t\t// if we have a base class, let it search for properties, or return null\r\n\t\tif (baseClass != null)\r\n\t\t\treturn baseClass.getProperty(propertyName);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public static String getProperty(String propertyName){\r\n String val = userProps.getProperty(propertyName);\r\n\r\n if (val == null)\r\n return jinProps.getProperty(propertyName);\r\n else\r\n return val;\r\n }" ]
[ "0.6583494", "0.6408143", "0.619607", "0.60380775", "0.60269666", "0.5993176", "0.58804715", "0.5840982", "0.5814273", "0.5813652", "0.5782142", "0.5769723", "0.5769723", "0.5769723", "0.57455343", "0.5699913", "0.5682212", "0.5648482", "0.5629051", "0.5594145", "0.55932873", "0.5539328", "0.5539328", "0.5473317", "0.5437131", "0.5426768", "0.5422878", "0.5392016", "0.5379747", "0.5379747", "0.5379747", "0.5377779", "0.53701764", "0.53632855", "0.5352065", "0.53443897", "0.53417015", "0.5334331", "0.53308636", "0.5288534", "0.52841026", "0.527224", "0.5235365", "0.5217535", "0.5202497", "0.5199528", "0.51956934", "0.51725125", "0.5159046", "0.5152172", "0.5148112", "0.51447076", "0.513871", "0.51218295", "0.5101136", "0.5101136", "0.5101136", "0.5097745", "0.5088073", "0.5084999", "0.50822425", "0.50783837", "0.50704247", "0.506262", "0.5045328", "0.5027007", "0.5026236", "0.5025277", "0.49928573", "0.4992702", "0.49880305", "0.49861518", "0.49837354", "0.49729884", "0.49722418", "0.49722418", "0.49673048", "0.4964932", "0.49642098", "0.49303788", "0.4904539", "0.49035072", "0.49001858", "0.49000132", "0.49000132", "0.4897509", "0.4897509", "0.48906243", "0.4884444", "0.48836815", "0.48829487", "0.48796484", "0.4876034", "0.48749322", "0.48743558", "0.48706245", "0.48667628", "0.48643544", "0.4863668", "0.48615506", "0.4858316" ]
0.0
-1
Creates new form BridgingUI
public BridgingUI() { initComponents(); initUserActions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "public FormInserir() {\n initComponents();\n }", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "@Override\n\tpublic void onFormCreate(AbstractForm arg0, DataMsgBus arg1) {\n\t}", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModelObject().setDbContentCreateEdit(dbContentCreateEdit);\r\n dbContentCreateEdit.setParent(form.getModelObject());\r\n ruServiceHelper.updateDbEntity(form.getModelObject()); \r\n }", "public Project_Create() {\n initComponents();\n }", "public InvoiceCreate() {\n initComponents();\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}", "public CreateAccount_GUI() {\n initComponents();\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public abstract void addEditorForm();", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "public ProductCreate() {\n initComponents();\n }", "public form_for_bd() {\n initComponents();\n }", "private void initFormCreateMode() {\n initSpinnerSelectionChamps();\n //TODO\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}", "public CreateAccountGUI() throws Exception{\n\r\n\t\tsuper();\r\n\r\n\t\tsetTitle(\"Create an account\");\r\n\t\tsetSize(600, 400);\r\n\t\tsetBackground(Color.CYAN);\r\n\t\tsetResizable(false);\r\n\t\tsetDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\r\n\t\tsetLocationRelativeTo(null);\r\n\r\n\t\tString[] labels = {\"Username: \", \"First Name: \", \"Surname: \",\r\n \"Mobile Number: \", \"Date Of Birth: \", \"City: \",\n \"Profile Pic (e.g. pic.png): \"};\n\t\tint input = labels.length;\n\n ArrayList<JTextField> fields = new ArrayList<JTextField>();\n\n\t\tJPanel create = new JPanel(new SpringLayout());\r\n\t\tfor (int i = 0; i < input; i++) {\r\n\t\t\tJLabel para = new JLabel(labels[i], JLabel.TRAILING);\r\n\t\t\tcreate.add(para);\r\n\t\t\tJTextField form = new JTextField(10);\n fields.add(form);\n\t\t\tpara.setLabelFor(form);\r\n\t\t\tcreate.add(form);\r\n\t\t\tsuper.add(create);\r\n\t\t}\r\n\t\tJButton fin = new JButton(\"Create\");\r\n\t\tfin.addActionListener(new ActionListener(){\r\n\t\t\tpublic void actionPerformed(ActionEvent sendMessage){\n try\n {\n String username = fields.get(0).getText();\n String firstname = fields.get(1).getText();\n String surname = fields.get(2).getText();\n String mobnum = fields.get(3).getText();\n String dob = fields.get(4).getText();\n String city = fields.get(5).getText();\n String imgpath = fields.get(6).getText();\n Account acc = new Account(username, firstname, surname,\n mobnum, dob, city, 0, null, imgpath);\n ReadWriteAccount rwa = new ReadWriteAccount(\"data.db\");\n rwa.write(acc);\n get_main().set_home(acc);\n dispose();\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n\t\t\t}\r\n\t\t});\r\n\t\tsuper.add(fin, BorderLayout.SOUTH);\r\n\t\tCreateAccountGUI.makeForm(create,\r\n\t\t\t\tinput, 2,\r\n\t\t\t\t6, 6,\r\n\t\t\t\t20, 20);\n\n setVisible(true);\n\r\n\t}", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "public NewUser() {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "private HStack createEditForm() {\r\n\t\teditFormHStack = new HStack();\r\n\t\t\r\n\t\tVStack editFormVStack = new VStack();\r\n\t\teditFormVStack.addMember(addStarRatings());\r\n\t\t\r\n\t\tboundSwagForm = new DynamicForm();\r\n\t\tboundSwagForm.setNumCols(2);\r\n//\t\tboundSwagForm.setLongTextEditorThreshold(40);\r\n\t\tboundSwagForm.setDataSource(SmartGWTRPCDataSource.getInstance());\r\n\t\tboundSwagForm.setAutoFocus(true);\r\n\r\n\t\tHiddenItem keyItem = new HiddenItem(\"key\");\r\n\t\tTextItem nameItem = new TextItem(\"name\");\r\n\t\tnameItem.setLength(50);\r\n\t\tnameItem.setSelectOnFocus(true);\r\n\t\tTextItem companyItem = new TextItem(\"company\");\r\n\t\tcompanyItem.setLength(20);\r\n\t\tTextItem descriptionItem = new TextItem(\"description\");\r\n\t\tdescriptionItem.setLength(100);\r\n\t\tTextItem tag1Item = new TextItem(\"tag1\");\r\n\t\ttag1Item.setLength(15);\r\n\t\tTextItem tag2Item = new TextItem(\"tag2\");\r\n\t\ttag2Item.setLength(15);\r\n\t\tTextItem tag3Item = new TextItem(\"tag3\");\r\n\t\ttag3Item.setLength(15);\r\n\t\tTextItem tag4Item = new TextItem(\"tag4\");\r\n\t\ttag4Item.setLength(15);\r\n\t\t\r\n\t\tStaticTextItem isFetchOnlyItem = new StaticTextItem(\"isFetchOnly\");\r\n\t\tisFetchOnlyItem.setVisible(false);\r\n\t\tStaticTextItem imageKeyItem = new StaticTextItem(\"imageKey\");\r\n\t\timageKeyItem.setVisible(false);\r\n\t\t\r\n\t\tTextItem newImageURLItem = new TextItem(\"newImageURL\");\r\n\r\n\t\tboundSwagForm.setFields(keyItem, nameItem, companyItem, descriptionItem, tag1Item,\r\n\t\t\t\ttag2Item, tag3Item, tag4Item, isFetchOnlyItem, imageKeyItem, newImageURLItem);\r\n\t\teditFormVStack.addMember(boundSwagForm);\r\n\t\t\r\n\t\tcurrentSwagImage = new Img(\"/images/no_photo.jpg\"); \r\n\t\tcurrentSwagImage.setImageType(ImageStyle.NORMAL); \r\n\t\teditFormVStack.addMember(currentSwagImage);\r\n\t\teditFormVStack.addMember(createImFeelingLuckyImageSearch());\r\n\t\t\r\n\t\tIButton saveButton = new IButton(\"Save\");\r\n\t\tsaveButton.setAutoFit(true);\r\n\t\tsaveButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\t//TODO\r\n\t\t\t\t//uploadForm.submitForm();\r\n\t\t\t\t//Turn off fetch only (could have been on from them rating the item\r\n\t\t\t\tboundSwagForm.getField(\"isFetchOnly\").setValue(false);\r\n\t\t\t\tboundSwagForm.saveData();\r\n\t\t\t\thandleSubmitComment(); //in case they commented while editing\r\n\t\t\t\t//re-sort\r\n\t\t\t\tdoSort();\r\n\t\t\t\tif (boundSwagForm.hasErrors()) {\r\n\t\t\t\t\tWindow.alert(\"\" + boundSwagForm.getErrors());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\t\t\r\n\t\t\t\t\teditFormHStack.hide();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tIButton cancelButton = new IButton(\"Cancel\");\r\n\t\tcancelButton.setAutoFit(true);\r\n\t\tcancelButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tboundSwagForm.clearValues();\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tIButton deleteButton = new IButton(\"Delete\");\r\n\t\tdeleteButton.setAutoFit(true);\r\n\t\tdeleteButton.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tshowConfirmRemovePopup(itemsTileGrid.getSelectedRecord());\r\n\t\t\t\teditFormHStack.hide();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\teditButtonsLayout = new HLayout();\r\n\t\teditButtonsLayout.setHeight(20);\r\n\t\teditButtonsLayout.addMember(saveButton);\r\n\t\teditButtonsLayout.addMember(cancelButton);\r\n\t\teditButtonsLayout.addMember(deleteButton);\r\n\t\t\r\n\t\teditFormVStack.addMember(editButtonsLayout);\r\n\t\t\r\n\t\ttabSet = new TabSet();\r\n\t\ttabSet.setDestroyPanes(false);\r\n tabSet.setTabBarPosition(Side.TOP);\r\n tabSet.setTabBarAlign(Side.LEFT);\r\n tabSet.setWidth(570);\r\n tabSet.setHeight(570);\r\n \r\n\r\n Tab viewEditTab = new Tab();\r\n viewEditTab.setPane(editFormVStack);\r\n\r\n commentsTab = new Tab(\"Comments\");\r\n commentsTab.setPane(createComments());\r\n \r\n tabSet.addTab(viewEditTab);\r\n tabSet.addTab(commentsTab);\r\n //put focus in commentsEditor when they click the Comments tab\r\n tabSet.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tTab selectedTab = tabSet.getSelectedTab();\r\n\t\t\t\tif (commentsTab==selectedTab) {\r\n\t\t\t\t\trichTextCommentsEditor.focus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n \r\n VStack tabsVStack = new VStack();\r\n itemEditTitleLabel = new Label(); \r\n itemEditTitleLabel.setHeight(30); \r\n itemEditTitleLabel.setAlign(Alignment.LEFT); \r\n itemEditTitleLabel.setValign(VerticalAlignment.TOP); \r\n itemEditTitleLabel.setWrap(false); \r\n tabsVStack.addMember(itemEditTitleLabel);\r\n //make sure this is drawn since we set the tab names early\r\n tabSet.draw();\r\n tabsVStack.addMember(tabSet);\r\n\t\teditFormHStack.addMember(tabsVStack);\r\n\t\teditFormHStack.hide();\r\n\t\treturn editFormHStack;\r\n\t}", "public void createButtonClicked() {\n clearInputFieldStyle();\n setAllFieldsAndSliderDisabled(false);\n setButtonsDisabled(false, true, true);\n setDefaultValues();\n Storage.setSelectedRaceCar(null);\n }", "public TrainModelGUI CreateNewGUI() {\n //Create a GUI object\n \ttrainModelGUI = new TrainModelGUI(this);\n \tsetValuesForDisplay();\n \treturn trainModelGUI;\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "public CreateProfile() {\n initComponents();\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public FundsVolunteerCreate(AppState appState) {\n initComponents();\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n btCancelar.setVisible(false);\n btSave.setVisible(false);\n btnRemove.setVisible(false);\n btnSaveEdit.setVisible(false);\n enableFields(false);\n this.appState = appState;\n }", "public Frame_Ajouter_Administrateur() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public void btn_newEntry() throws IOException, SQLException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewEntry.fxml\"));\n Parent parent = fxmlLoader.load();\n NewEntryController newEntryController = fxmlLoader.<NewEntryController>getController();\n newEntryController.setPresenter(presenter);\n newEntryController.fillComboBox();\n this.stageNewEntry = new Stage();\n stageNewEntry.setTitle(bundle.getString(\"entryNew.title\"));\n stageNewEntry.setScene(new Scene(parent, 400, 400));\n stageNewEntry.setAlwaysOnTop(true);\n stageNewEntry.setResizable(false);\n stageNewEntry.initModality(Modality.APPLICATION_MODAL);\n stageNewEntry.getIcons().add(new Image(String.valueOf(this.getClass().getResource(\"images/logo.png\"))));\n stageNewEntry.show();\n }", "public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }", "public abstract void addSelectorForm();", "@Override\n public void Create() {\n\n initView();\n }", "public MechanicForm() {\n initComponents();\n }", "@Override\n\tpublic void createForm(ERForm form) {\n\t\t\tString sql = \"insert into project1.reimbursementInfo (userName, fullName, thedate, eventstartdate, thelocation, description, thecost, gradingformat, passingpercentage, eventtype, filename,status,reason) values (?,?,?,?,?,?,?,?,?,?,?,?,?);\";\n\t\t\ttry {PreparedStatement stmt = conn.prepareCall(sql);\n\t\t\t//RID should auto increment, so this isnt necessary\n\t\t\t\n\t\t\tstmt.setString(1, form.getUserName());\n\t\t\tstmt.setString(2, form.getFullName());\n\t\t\tstmt.setDate(3, Date.valueOf(form.getTheDate()));\n\t\t\tstmt.setDate(4, Date.valueOf(form.getEventStartDate()));\n\t\t\tstmt.setString(5, form.getTheLocation());\n\t\t\tstmt.setString(6, form.getDescription());\n\t\t\tstmt.setDouble(7, form.getTheCost());\n\t\t\tstmt.setString(8, form.getGradingFormat());\n\t\t\tstmt.setString(9, form.getPassingPercentage());\n\t\t\tstmt.setString(10, form.getEventType());\n\t\t\tstmt.setString(11, form.getFileName());\n\t\t\tstmt.setString(12, \"pending\");\n\t\t\tstmt.setString(13, \"\");\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public form() {\n initComponents();\n }", "private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public frm_tutor_subida_prueba() {\n }", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "public CrearPedidos() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Title = new javax.swing.JLabel();\n NAME = new javax.swing.JLabel();\n txt_name = new javax.swing.JTextField();\n PROVIDER = new javax.swing.JLabel();\n ComboBox_provider = new javax.swing.JComboBox<>();\n CATEGORY = new javax.swing.JLabel();\n ComboBox_category = new javax.swing.JComboBox<>();\n Trademark = new javax.swing.JLabel();\n ComboBox_trademark = new javax.swing.JComboBox<>();\n COLOR = new javax.swing.JLabel();\n ComboBox_color = new javax.swing.JComboBox<>();\n SIZE = new javax.swing.JLabel();\n ComboBox_size = new javax.swing.JComboBox<>();\n MATERIAL = new javax.swing.JLabel();\n ComboBox_material = new javax.swing.JComboBox<>();\n PRICE = new javax.swing.JLabel();\n txt_price = new javax.swing.JTextField();\n SAVE = new javax.swing.JButton();\n CANCEL = new javax.swing.JButton();\n Background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Title.setFont(new java.awt.Font(\"Dialog\", 1, 24)); // NOI18N\n Title.setForeground(new java.awt.Color(255, 255, 255));\n Title.setText(\"NEW PRODUCT\");\n getContentPane().add(Title, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 33, -1, -1));\n\n NAME.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n NAME.setForeground(new java.awt.Color(255, 255, 255));\n NAME.setText(\"Name\");\n getContentPane().add(NAME, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 150, 70, 30));\n\n txt_name.setBackground(new java.awt.Color(51, 51, 51));\n txt_name.setForeground(new java.awt.Color(255, 255, 255));\n getContentPane().add(txt_name, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 150, 100, 30));\n\n PROVIDER.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PROVIDER.setForeground(new java.awt.Color(255, 255, 255));\n PROVIDER.setText(\"Provider\");\n getContentPane().add(PROVIDER, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 200, 70, 30));\n\n ComboBox_provider.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_provider.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_provider.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_provider, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 200, 100, 30));\n\n CATEGORY.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n CATEGORY.setForeground(new java.awt.Color(255, 255, 255));\n CATEGORY.setText(\"Category\");\n getContentPane().add(CATEGORY, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 250, 70, 30));\n\n ComboBox_category.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_category.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_category.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_category, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 250, 100, 30));\n\n Trademark.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n Trademark.setForeground(new java.awt.Color(255, 255, 255));\n Trademark.setText(\"Trademark\");\n getContentPane().add(Trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 300, 70, 30));\n\n ComboBox_trademark.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_trademark.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_trademark.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n ComboBox_trademark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ComboBox_trademarkActionPerformed(evt);\n }\n });\n getContentPane().add(ComboBox_trademark, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 300, 100, 30));\n\n COLOR.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n COLOR.setForeground(new java.awt.Color(255, 255, 255));\n COLOR.setText(\"Color\");\n getContentPane().add(COLOR, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 150, 70, 30));\n\n ComboBox_color.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_color.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_color.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_color, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 150, 100, 30));\n\n SIZE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n SIZE.setForeground(new java.awt.Color(255, 255, 255));\n SIZE.setText(\"Size\");\n getContentPane().add(SIZE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 200, 70, 30));\n\n ComboBox_size.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_size.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_size.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_size, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 200, 100, 30));\n\n MATERIAL.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n MATERIAL.setForeground(new java.awt.Color(255, 255, 255));\n MATERIAL.setText(\"Material\");\n getContentPane().add(MATERIAL, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 250, 70, 30));\n\n ComboBox_material.setBackground(new java.awt.Color(51, 51, 51));\n ComboBox_material.setForeground(new java.awt.Color(255, 255, 255));\n ComboBox_material.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n getContentPane().add(ComboBox_material, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 250, 100, 30));\n\n PRICE.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n PRICE.setForeground(new java.awt.Color(255, 255, 255));\n PRICE.setText(\"Price\");\n getContentPane().add(PRICE, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 300, 70, 30));\n\n txt_price.setBackground(new java.awt.Color(51, 51, 51));\n txt_price.setForeground(new java.awt.Color(255, 255, 255));\n txt_price.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txt_priceActionPerformed(evt);\n }\n });\n getContentPane().add(txt_price, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 300, 100, 30));\n\n SAVE.setBackground(new java.awt.Color(25, 25, 25));\n SAVE.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-A.png\"))); // NOI18N\n SAVE.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n SAVE.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar-B.png\"))); // NOI18N\n SAVE.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_guardar.png\"))); // NOI18N\n SAVE.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SAVEActionPerformed(evt);\n }\n });\n getContentPane().add(SAVE, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 480, 50, 50));\n\n CANCEL.setBackground(new java.awt.Color(25, 25, 25));\n CANCEL.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-A.png\"))); // NOI18N\n CANCEL.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n CANCEL.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no-B.png\"))); // NOI18N\n CANCEL.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/icono_no.png\"))); // NOI18N\n CANCEL.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CANCELActionPerformed(evt);\n }\n });\n getContentPane().add(CANCEL, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 480, 50, 50));\n\n Background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/fondo_windows2.jpg\"))); // NOI18N\n getContentPane().add(Background, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n }", "public JPanelCreateClient() {\r\n\t\tsuper(new BorderLayout());\r\n\t\tthis.title = new CustomLabel(ConstantView.TITLE_CREATE_CLIENT, null, Color.decode(\"#2E5569\"));\r\n\t\tthis.okButton = new JButton(\"REGISTRAR CLIENTE\");\r\n\t\tthis.returnButton = new JButton(ConstantView.BUTTON_RETURN_SIGNIN);\r\n\t\tthis.jPanelFormClient = new JPanelFormClient();\r\n\t\tControlClient.getInstance().setjPanelCreateClient(this);\r\n\t\tthis.init();\r\n\t}", "public CadastroProdutoNew() {\n initComponents();\n }", "public Project_Create_Process() {\n initComponents();\n }", "private void createContents() throws SQLException {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM);\n\t\tshell.setImage(user.getIcondata().BaoduongIcon);\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tsetText(\"Tạo Công việc (Đợt Bảo dưỡng)\");\n\t\tshell.setSize(777, 480);\n\t\tnew FormTemplate().setCenterScreen(shell);\n\n\t\tFill_ItemData fi = new Fill_ItemData();\n\n\t\tSashForm sashForm = new SashForm(shell, SWT.NONE);\n\t\tsashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));\n\n\t\tSashForm sashForm_3 = new SashForm(sashForm, SWT.VERTICAL);\n\n\t\tSashForm sashForm_2 = new SashForm(sashForm_3, SWT.NONE);\n\t\tComposite composite = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setText(\"Tên đợt Bảo dưỡng*:\");\n\n\t\ttext_Tendot_Baoduong = new Text(composite, SWT.BORDER);\n\t\ttext_Tendot_Baoduong.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\n\t\tLabel label_3 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_3 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_3.verticalIndent = 3;\n\t\tlabel_3.setLayoutData(gd_label_3);\n\t\tlabel_3.setText(\"Loại phương tiện:\");\n\n\t\tcombo_Loaiphuongtien = new Combo(composite, SWT.READ_ONLY);\n\t\tcombo_Loaiphuongtien.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\tFill_ItemData f = new Fill_ItemData();\n\t\t\t\t\tif ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Xemay()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Xemay());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t} else if ((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText()) == f.getInt_Oto()) {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setLOAI_PHUONG_TIEN(f.getInt_Oto());\n\t\t\t\t\t\ttree_PTTS.removeAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcombo_Loaiphuongtien.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1));\n\t\tfi.setComboBox_LOAIPHUONGTIEN_Phuongtien_Giaothong(combo_Loaiphuongtien, 0);\n\n\t\tLabel label_4 = new Label(composite, SWT.NONE);\n\t\tGridData gd_label_4 = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_label_4.verticalIndent = 3;\n\t\tlabel_4.setLayoutData(gd_label_4);\n\t\tlabel_4.setText(\"Mô tả:\");\n\n\t\ttext_Mota = new Text(composite, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI);\n\t\ttext_Mota.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tbtnNgunSaCha = new Button(composite, SWT.NONE);\n\t\tGridData gd_btnNgunSaCha = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNgunSaCha.widthHint = 85;\n\t\tbtnNgunSaCha.setLayoutData(gd_btnNgunSaCha);\n\t\tbtnNgunSaCha.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tChonNguonSuachua_Baoduong cnsb = new ChonNguonSuachua_Baoduong(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\tcnsb.open();\n\t\t\t\t\tnsb = cnsb.getResult();\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null) {\n\t\t\t\t\t\tfillNguonSuachuaBaoduong(nsb);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (nsb == null) {\n\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CLOSE);\n\t\t\t\t\t\tm.setText(\"Xóa dữ liệu cũ?\");\n\t\t\t\t\t\tm.setMessage(\"Bạn muốn xóa dữ liệu cũ?\");\n\t\t\t\t\t\tint rc = m.open();\n\t\t\t\t\t\tswitch (rc) {\n\t\t\t\t\t\tcase SWT.CANCEL:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.YES:\n\t\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(-1);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase SWT.NO:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tViewAndEdit_MODE_dsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t}\n\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG(ViewAndEdit_MODE_dsb);\n\t\t\t\t\tfillNguonSuachuaBaoduong(ViewAndEdit_MODE_dsb);\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnNgunSaCha.setText(\"Liên hệ\");\n\t\tbtnNgunSaCha.setImage(user.getIcondata().PhoneIcon);\n\n\t\tComposite composite_1 = new Composite(sashForm_2, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblSXut = new Label(composite_1, SWT.NONE);\n\t\tlblSXut.setText(\"Số đề xuất: \");\n\n\t\ttext_Sodexuat = new Text(composite_1, SWT.NONE);\n\t\ttext_Sodexuat.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Sodexuat.setEditable(false);\n\t\ttext_Sodexuat.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyThng = new Label(composite_1, SWT.NONE);\n\t\tlblNgyThng.setText(\"Ngày tháng: \");\n\n\t\ttext_NgaythangVanban = new Text(composite_1, SWT.NONE);\n\t\ttext_NgaythangVanban.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_NgaythangVanban.setEditable(false);\n\t\ttext_NgaythangVanban.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblnV = new Label(composite_1, SWT.NONE);\n\t\tlblnV.setText(\"Đơn vị: \");\n\n\t\ttext_Donvi = new Text(composite_1, SWT.NONE);\n\t\ttext_Donvi.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Donvi.setEditable(false);\n\t\ttext_Donvi.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyXL = new Label(composite_1, SWT.NONE);\n\t\tlblNgyXL.setText(\"Ngày xử lý:\");\n\n\t\ttext_Ngaytiepnhan = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaytiepnhan.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaytiepnhan.setEditable(false);\n\t\ttext_Ngaytiepnhan.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblNgyGiao = new Label(composite_1, SWT.NONE);\n\t\tlblNgyGiao.setText(\"Ngày giao:\");\n\n\t\ttext_Ngaygiao = new Text(composite_1, SWT.NONE);\n\t\ttext_Ngaygiao.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Ngaygiao.setEditable(false);\n\t\ttext_Ngaygiao.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblTrchYu = new Label(composite_1, SWT.NONE);\n\t\tGridData gd_lblTrchYu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblTrchYu.verticalIndent = 3;\n\t\tlblTrchYu.setLayoutData(gd_lblTrchYu);\n\t\tlblTrchYu.setText(\"Ghi chú: \");\n\n\t\ttext_Trichyeu = new Text(composite_1, SWT.NONE);\n\t\ttext_Trichyeu.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\ttext_Trichyeu.setEditable(false);\n\t\tGridData gd_text_Trichyeu = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n\t\tgd_text_Trichyeu.heightHint = 27;\n\t\ttext_Trichyeu.setLayoutData(gd_text_Trichyeu);\n\t\tnew Label(composite_1, SWT.NONE);\n\n\t\tbtnThemDexuat = new Button(composite_1, SWT.NONE);\n\t\tbtnThemDexuat.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tInsert_dx = null;\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null\n\t\t\t\t\t\t\t&& ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() > 0) {\n\t\t\t\t\t\tInsert_dx = controler.getControl_DEXUAT().get_DEXUAT(ViewAndEdit_MODE_dsb);\n\t\t\t\t\t}\n\t\t\t\t\tif (Insert_dx != null) {\n\t\t\t\t\t\tTAPHOSO ths = controler.getControl_TAPHOSO().get_TAP_HO_SO(Insert_dx.getMA_TAPHOSO());\n\t\t\t\t\t\tTaphoso_View thsv = new Taphoso_View(shell, SWT.DIALOG_TRIM, user, ths, false);\n\t\t\t\t\t\tthsv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tNhapDeXuat ndx = new NhapDeXuat(shell, SWT.DIALOG_TRIM, user);\n\t\t\t\t\t\tndx.open();\n\t\t\t\t\t\tInsert_dx = ndx.result;\n\t\t\t\t\t\tif (Insert_dx == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb == null)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tif (ViewAndEdit_MODE_dsb.getMA_DOT_THUCHIEN_SUACHUA_BAODUONG() <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien <= 0)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tboolean ict = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(\n\t\t\t\t\t\t\t\t\t\tViewAndEdit_MODE_dsb, Ma_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tif (ict) {\n\t\t\t\t\t\t\tMessageBox m = new MessageBox(shell, SWT.ICON_WORKING);\n\t\t\t\t\t\t\tm.setText(\"Hoàn tất\");\n\t\t\t\t\t\t\tm.setMessage(\"Thêm Đề xuất Hoàn tất\");\n\t\t\t\t\t\t\tm.open();\n\t\t\t\t\t\t\tfillDexuat(Insert_dx);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (NullPointerException | SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnThemDexuat.setImage(user.getIcondata().DexuatIcon);\n\t\tbtnThemDexuat.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, false, 1, 1));\n\t\tbtnThemDexuat.setText(\"Thêm Hồ sơ\");\n\t\tsashForm_2.setWeights(new int[] { 1000, 618 });\n\n\t\tSashForm sashForm_1 = new SashForm(sashForm_3, SWT.NONE);\n\t\ttree_PTTS = new Tree(sashForm_1, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);\n\t\ttree_PTTS.setLinesVisible(true);\n\t\ttree_PTTS.setHeaderVisible(true);\n\t\ttree_PTTS.addListener(SWT.Selection, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void handleEvent(Event arg0) {\n\t\t\t\tTreeItem[] til = tree_PTTS.getSelection();\n\t\t\t\tif (til.length > 0) {\n\t\t\t\t\tRow_PTTSthamgia_Baoduong pttg = (Row_PTTSthamgia_Baoduong) til[0].getData();\n\t\t\t\t\tsetHinhthuc_Baoduong(pttg.getHtbd());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttree_PTTS.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tif (tree_PTTS.getItems().length > 0) {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\tcombo_Loaiphuongtien.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tTreeColumn trclmnStt = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnStt.setWidth(50);\n\t\ttrclmnStt.setText(\"Stt\");\n\n\t\tTreeColumn trclmnTnMT = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnTnMT.setWidth(100);\n\t\ttrclmnTnMT.setText(\"Tên, mô tả\");\n\n\t\tTreeColumn trclmnHngSnXut = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnHngSnXut.setWidth(100);\n\t\ttrclmnHngSnXut.setText(\"Hãng sản xuất\");\n\n\t\tTreeColumn trclmnDngXe = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnDngXe.setWidth(100);\n\t\ttrclmnDngXe.setText(\"Dòng xe\");\n\n\t\tTreeColumn trclmnBinS = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBinS.setWidth(100);\n\t\ttrclmnBinS.setText(\"Biển số\");\n\n\t\tTreeColumn trclmnNgySDng = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnNgySDng.setWidth(100);\n\t\ttrclmnNgySDng.setText(\"Ngày sử dụng\");\n\n\t\tTreeColumn trclmnMPhngTin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnMPhngTin.setWidth(90);\n\t\ttrclmnMPhngTin.setText(\"Mã PTTS\");\n\n\t\tMenu menu = new Menu(tree_PTTS);\n\t\ttree_PTTS.setMenu(menu);\n\n\t\tMenuItem mntmThmPhngTin = new MenuItem(menu, SWT.NONE);\n\t\tmntmThmPhngTin.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tThem_PTGT();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmntmThmPhngTin.setText(\"Thêm phương tiện tài sản\");\n\n\t\tMenuItem mntmXoa = new MenuItem(menu, SWT.NONE);\n\t\tmntmXoa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tdelete();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tmntmXoa.setText(\"Xóa\");\n\n\t\tTreeColumn trclmnThayNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayNht.setWidth(70);\n\t\ttrclmnThayNht.setText(\"Thay nhớt\");\n\n\t\tTreeColumn trclmnThayLcNht = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNht.setWidth(100);\n\t\ttrclmnThayLcNht.setText(\"Thay lọc nhớt\");\n\n\t\tTreeColumn trclmnThayLcGi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcGi.setWidth(100);\n\t\ttrclmnThayLcGi.setText(\"Thay lọc gió\");\n\n\t\tTreeColumn trclmnThayLcNhin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayLcNhin.setWidth(100);\n\t\ttrclmnThayLcNhin.setText(\"Thay lọc nhiên liệu\");\n\n\t\tTreeColumn trclmnThayDuPhanh = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuPhanh.setWidth(100);\n\t\ttrclmnThayDuPhanh.setText(\"Thay Dầu phanh - ly hợp\");\n\n\t\tTreeColumn trclmnThayDuHp = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuHp.setWidth(100);\n\t\ttrclmnThayDuHp.setText(\"Thay Dầu hộp số\");\n\n\t\tTreeColumn trclmnThayDuVi = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuVi.setWidth(100);\n\t\ttrclmnThayDuVi.setText(\"Thay Dầu vi sai\");\n\n\t\tTreeColumn trclmnLcGiGin = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnLcGiGin.setWidth(100);\n\t\ttrclmnLcGiGin.setText(\"Lọc gió giàn lạnh\");\n\n\t\tTreeColumn trclmnThayDuTr = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnThayDuTr.setWidth(100);\n\t\ttrclmnThayDuTr.setText(\"Thay dầu trợ lực lái\");\n\n\t\tTreeColumn trclmnBoDngKhcs = new TreeColumn(tree_PTTS, SWT.NONE);\n\t\ttrclmnBoDngKhcs.setWidth(100);\n\t\ttrclmnBoDngKhcs.setText(\"Bảo dưỡng khác\");\n\n\t\tExpandBar expandBar = new ExpandBar(sashForm_1, SWT.V_SCROLL);\n\t\texpandBar.setForeground(SWTResourceManager.getColor(SWT.COLOR_LIST_FOREGROUND));\n\n\t\tExpandItem xpndtmLoiHnhBo = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setText(\"Loại hình bảo dưỡng\");\n\n\t\tComposite grpHnhThcBo = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLoiHnhBo.setControl(grpHnhThcBo);\n\t\tgrpHnhThcBo.setLayout(new GridLayout(1, false));\n\n\t\tbtnDaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDaudongco.setText(\"Dầu động cơ\");\n\n\t\tbtnLocdaudongco = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocdaudongco.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocdaudongco.setText(\"Lọc dầu động cơ\");\n\n\t\tbtnLocgio = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgio.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgio.setText(\"Lọc gió\");\n\n\t\tbtnLocnhienlieu = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocnhienlieu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocnhienlieu.setText(\"Lọc nhiên liệu\");\n\n\t\tbtnDauphanh_lyhop = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauphanh_lyhop.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauphanh_lyhop.setText(\"Dầu phanh và dầu ly hợp\");\n\n\t\tbtnDauhopso = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauhopso.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauhopso.setText(\"Dầu hộp số\");\n\n\t\tbtnDauvisai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDauvisai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDauvisai.setText(\"Dầu vi sai\");\n\n\t\tbtnLocgiogianlanh = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnLocgiogianlanh.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLocgiogianlanh.setText(\"Lọc gió giàn lạnh\");\n\n\t\tbtnDautroluclai = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnDautroluclai.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDautroluclai.setText(\"Dầu trợ lực lái\");\n\n\t\tbtnBaoduongkhac = new Button(grpHnhThcBo, SWT.CHECK);\n\t\tbtnBaoduongkhac.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tupdateSelectedList();\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnBaoduongkhac.setText(\"Bảo dưỡng khác\");\n\t\txpndtmLoiHnhBo.setHeight(xpndtmLoiHnhBo.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);\n\n\t\tExpandItem xpndtmLinH = new ExpandItem(expandBar, SWT.NONE);\n\t\txpndtmLinH.setText(\"Liên hệ\");\n\n\t\tComposite composite_2 = new Composite(expandBar, SWT.NONE);\n\t\txpndtmLinH.setControl(composite_2);\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\n\n\t\tLabel lblTnLinH = new Label(composite_2, SWT.NONE);\n\t\tlblTnLinH.setText(\"Tên liên hệ: \");\n\n\t\ttext_Tenlienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Tenlienhe.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\n\t\tLabel lblGiiThiu = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblGiiThiu = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblGiiThiu.verticalIndent = 3;\n\t\tlblGiiThiu.setLayoutData(gd_lblGiiThiu);\n\t\tlblGiiThiu.setText(\"Giới thiệu: \");\n\n\t\ttext_Gioithieu = new Text(composite_2, SWT.BORDER);\n\t\ttext_Gioithieu.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\n\t\tLabel lblLinH = new Label(composite_2, SWT.NONE);\n\t\tGridData gd_lblLinH = new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1);\n\t\tgd_lblLinH.verticalIndent = 3;\n\t\tlblLinH.setLayoutData(gd_lblLinH);\n\t\tlblLinH.setText(\"Liên hệ: \");\n\n\t\ttext_Lienhe = new Text(composite_2, SWT.BORDER);\n\t\ttext_Lienhe.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\txpndtmLinH.setHeight(120);\n\t\tsashForm_1.setWeights(new int[] { 543, 205 });\n\t\tsashForm_3.setWeights(new int[] { 170, 228 });\n\t\tsashForm.setWeights(new int[] { 1000 });\n\n\t\tbtnLuu = new Button(shell, SWT.NONE);\n\t\tbtnLuu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (dataCreate != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tTaoMoi_DotSuachua_Baoduong();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate void TaoMoi_DotSuachua_Baoduong() throws SQLException {\n\t\t\t\tif (checkTextNotNULL()) {\n\t\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = getDOT_SUACHUA_BAODUONG();\n\t\t\t\t\tint key = controler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t.InsertDOT_THUCHIEN_SUACHUA_BAODUONG(dsb, null, null);\n\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\tif (key >= 0) {\n\t\t\t\t\t\tif (nsb != null)\n\t\t\t\t\t\t\tdsb.setMA_NGUONSUACHUA_BAODUONG(nsb.getMA_NGUONSUACHUA_BAODUONG());\n\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG().update_DOT_THUCHIEN_SUACHUA_BAODUONG(dsb);\n\t\t\t\t\t\tint Ma_Quatrinh_Dexuat_thuchien = getMaQuantrinhDexuatThuchien(Insert_dx);\n\t\t\t\t\t\tif (Ma_Quatrinh_Dexuat_thuchien > 0)\n\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG()\n\t\t\t\t\t\t\t\t\t.update_DOT_THUCHIEN_SUACHUA_BAODUONG_Update_QUATRINH_DEXUAT_THUCHIEN(dsb,\n\t\t\t\t\t\t\t\t\t\t\tMa_Quatrinh_Dexuat_thuchien);\n\t\t\t\t\t\tTreeItem[] til = tree_PTTS.getItems();\n\t\t\t\t\t\tif (til.length > 0) {\n\t\t\t\t\t\t\tfor (TreeItem ti : til) {\n\t\t\t\t\t\t\t\tdsb.setMA_DOT_THUCHIEN_SUACHUA_BAODUONG(key);\n\t\t\t\t\t\t\t\tRow_PTTSthamgia_Baoduong rp = (Row_PTTSthamgia_Baoduong) ti.getData();\n\t\t\t\t\t\t\t\tcontroler.getControl_DOT_THUCHIEN_SUACHUA_BAODUONG_TAISAN()\n\t\t\t\t\t\t\t\t\t\t.set_DOT_THUCHIEN_SUACHUA_TAISAN(dsb, rp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tshowMessage_Succes();\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tGiaoViec gv = new GiaoViec(user);\n\t\t\t\t\t\tgv.open();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowMessage_Fail();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tshowMessage_FillText();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprivate DOT_THUCHIEN_SUACHUA_BAODUONG getDOT_SUACHUA_BAODUONG() {\n\t\t\t\tDOT_THUCHIEN_SUACHUA_BAODUONG dsb = new DOT_THUCHIEN_SUACHUA_BAODUONG();\n\t\t\t\tdsb.setTEN_DOT_THUCHIEN_SUACHUA_BAODUONG(text_Tendot_Baoduong.getText());\n\t\t\t\tdsb.setLOAI_PHUONG_TIEN(\n\t\t\t\t\t\tInteger.valueOf((int) combo_Loaiphuongtien.getData(combo_Loaiphuongtien.getText())));\n\t\t\t\tdsb.setSUACHUA_BAODUONG(fi.getInt_Baoduong());\n\t\t\t\tdsb.setMO_TA(text_Mota.getText());\n\t\t\t\treturn dsb;\n\t\t\t}\n\n\t\t});\n\t\tGridData gd_btnLu = new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1);\n\t\tgd_btnLu.widthHint = 75;\n\t\tbtnLuu.setLayoutData(gd_btnLu);\n\t\tbtnLuu.setText(\"Xong\");\n\n\t\tbtnDong = new Button(shell, SWT.NONE);\n\t\tbtnDong.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tif (ViewAndEdit_MODE_dsb != null) {\n\t\t\t\t\t\tupdateField();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if (Insert_dx != null)\n\t\t\t\t\t\t// controler.getControl_DEXUAT().delete_DEXUAT(Insert_dx);\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\tlog.error(e1.getMessage());\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tGridData gd_btnDong = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnDong.widthHint = 75;\n\t\tbtnDong.setLayoutData(gd_btnDong);\n\t\tbtnDong.setText(\"Đóng\");\n\t\tinit_loadMODE();\n\t\tinit_CreateMode();\n\t}", "void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.setTitle(gebruikersBeheerModel.getTitle());\n }", "private static ISInspectorGui createNewInstance(ISInspectorController controller) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(ISInspectorGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n Holder<ISInspectorGui> result = new Holder();\n try {\n /* Create and display the form */\n java.awt.EventQueue.invokeAndWait(new Runnable() {\n @Override\n public void run() {\n result.setValue(new ISInspectorGui(controller));\n result.getValue().setVisible(true);\n }\n });\n } catch (InterruptedException | InvocationTargetException ex) {\n Logger.getLogger(ISInspectorGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n return result.getValue();\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "private void buildView() {\n this.setHeaderInfo(model.getHeaderInfo());\n\n CWButtonPanel buttonPanel = this.getButtonPanel();\n \n buttonPanel.add(saveButton);\n buttonPanel.add(saveAndCloseButton);\n buttonPanel.add(cancelButton);\n \n FormLayout layout = new FormLayout(\"pref, 4dlu, 200dlu, 4dlu, min\",\n \"pref, 2dlu, pref, 2dlu, pref, 2dlu, pref\"); // rows\n\n layout.setRowGroups(new int[][]{{1, 3, 5}});\n \n CellConstraints cc = new CellConstraints();\n this.getContentPanel().setLayout(layout);\n \n this.getContentPanel().add(nameLabel, cc.xy (1, 1));\n this.getContentPanel().add(nameTextField, cc.xy(3, 1));\n this.getContentPanel().add(descLabel, cc.xy(1, 3));\n this.getContentPanel().add(descTextField, cc.xy(3, 3));\n this.getContentPanel().add(amountLabel, cc.xy(1, 5));\n this.getContentPanel().add(amountTextField, cc.xy(3, 5));\n }", "public UserForm(){ }", "public FormCompra() {\n initComponents();\n }", "protected void createContents() {\n\t\tregister Register = new register();\n\t\tRegisterDAOImpl RDI = new RegisterDAOImpl();\t\n\t\t\n\t\tload = new Shell();\n\t\tload.setSize(519, 370);\n\t\tload.setText(\"XX\\u533B\\u9662\\u6302\\u53F7\\u7CFB\\u7EDF\");\n\t\tload.setLayout(new FormLayout());\n\t\t\n\t\tLabel name = new Label(load, SWT.NONE);\n\t\tFormData fd_name = new FormData();\n\t\tfd_name.top = new FormAttachment(20);\n\t\tfd_name.left = new FormAttachment(45, -10);\n\t\tname.setLayoutData(fd_name);\n\t\tname.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tname.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel subjet = new Label(load, SWT.NONE);\n\t\tFormData fd_subjet = new FormData();\n\t\tfd_subjet.left = new FormAttachment(44);\n\t\tfd_subjet.top = new FormAttachment(50);\n\t\tsubjet.setLayoutData(fd_subjet);\n\t\tsubjet.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tsubjet.setText(\"\\u79D1\\u5BA4\");\n\t\t\n\t\tLabel doctor = new Label(load, SWT.NONE);\n\t\tFormData fd_doctor = new FormData();\n\t\tfd_doctor.top = new FormAttachment(60);\n\t\tfd_doctor.left = new FormAttachment(45, -10);\n\t\tdoctor.setLayoutData(fd_doctor);\n\t\tdoctor.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tdoctor.setText(\"\\u533B\\u751F\");\n\t\t\n\t\tnametext = new Text(load, SWT.BORDER);\n\t\tnametext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tnametext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_nametext = new FormData();\n\t\tfd_nametext.right = new FormAttachment(50, 94);\n\t\tfd_nametext.top = new FormAttachment(20);\n\t\tfd_nametext.left = new FormAttachment(50);\n\t\tnametext.setLayoutData(fd_nametext);\n\t\t\n\t\tLabel titlelabel = new Label(load, SWT.NONE);\n\t\tFormData fd_titlelabel = new FormData();\n\t\tfd_titlelabel.right = new FormAttachment(43, 176);\n\t\tfd_titlelabel.top = new FormAttachment(10);\n\t\tfd_titlelabel.left = new FormAttachment(43);\n\t\ttitlelabel.setLayoutData(fd_titlelabel);\n\t\ttitlelabel.setFont(SWTResourceManager.getFont(\"楷体\", 18, SWT.BOLD));\n\t\ttitlelabel.setText(\"XX\\u533B\\u9662\\u95E8\\u8BCA\\u6302\\u53F7\");\n\t\t\n\t\tLabel label = new Label(load, SWT.NONE);\n\t\tFormData fd_label = new FormData();\n\t\tfd_label.top = new FormAttachment(40);\n\t\tfd_label.left = new FormAttachment(44, -10);\n\t\tlabel.setLayoutData(fd_label);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tlabel.setText(\"\\u6302\\u53F7\\u8D39\");\n\t\t\n\t\tcosttext = new Text(load, SWT.BORDER);\n\t\tcosttext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tcosttext.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_costtext = new FormData();\n\t\tfd_costtext.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_costtext.top = new FormAttachment(40);\n\t\tfd_costtext.left = new FormAttachment(50);\n\t\tcosttext.setLayoutData(fd_costtext);\n\t\t\n\t\tLabel type = new Label(load, SWT.NONE);\n\t\tFormData fd_type = new FormData();\n\t\tfd_type.top = new FormAttachment(30);\n\t\tfd_type.left = new FormAttachment(45, -10);\n\t\ttype.setLayoutData(fd_type);\n\t\ttype.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\ttype.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tCombo typecombo = new Combo(load, SWT.NONE);\n\t\ttypecombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\ttypecombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_typecombo = new FormData();\n\t\tfd_typecombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_typecombo.top = new FormAttachment(30);\n\t\tfd_typecombo.left = new FormAttachment(50);\n\t\ttypecombo.setLayoutData(fd_typecombo);\n\t\ttypecombo.setText(\"\\u95E8\\u8BCA\\u7C7B\\u578B\");\n\t\ttypecombo.add(\"普通门诊\",0);\n\t\ttypecombo.add(\"专家门诊\",1);\n\t\tMySelectionListener3 ms3 = new MySelectionListener3(typecombo,costtext);\n\t\ttypecombo.addSelectionListener(ms3);\n\t\t\n\t\tCombo doctorcombo = new Combo(load, SWT.NONE);\n\t\tdoctorcombo.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tdoctorcombo.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tFormData fd_doctorcombo = new FormData();\n\t\tfd_doctorcombo.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_doctorcombo.top = new FormAttachment(60);\n\t\tfd_doctorcombo.left = new FormAttachment(50);\n\t\tdoctorcombo.setLayoutData(fd_doctorcombo);\n\t\tdoctorcombo.setText(\"\\u9009\\u62E9\\u533B\\u751F\");\n\t\t\n\t\tCombo subject = new Combo(load, SWT.NONE);\n\t\tsubject.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\n\t\tsubject.setFont(SWTResourceManager.getFont(\"微软雅黑\", 12, SWT.NORMAL));\n\t\tfd_subjet.right = new FormAttachment(subject, -6);\n\t\tfd_subjet.top = new FormAttachment(subject, -1, SWT.TOP);\n\t\tFormData fd_subject = new FormData();\n\t\tfd_subject.right = new FormAttachment(nametext, 0, SWT.RIGHT);\n\t\tfd_subject.top = new FormAttachment(50);\n\t\tfd_subject.left = new FormAttachment(50);\n\t\tsubject.setLayoutData(fd_subject);\n\t\tsubject.setText(\"\\u79D1\\u5BA4\\uFF1F\");\n\t\tsubject.add(\"神经内科\", 0);\n\t\tsubject.add(\"呼吸科\", 1);\n\t\tsubject.add(\"泌尿科\", 2);\n\t\tsubject.add(\"放射科\", 3);\n\t\tsubject.add(\"五官\", 4);\n\t\tMySelectionListener myselection = new MySelectionListener(i,subject,doctorcombo,pdtabledaoimpl);\n\t\tsubject.addSelectionListener(myselection);\n\t\t\n\t\tMySelectionListener2 ms2 = new MySelectionListener2(subject,doctorcombo,Register,nametext,RDI);\n\t\tdoctorcombo.addSelectionListener(ms2);\n\t\t\n\t\tButton surebutton = new Button(load, SWT.NONE);\n\t\tFormData fd_surebutton = new FormData();\n\t\tfd_surebutton.top = new FormAttachment(70);\n\t\tfd_surebutton.left = new FormAttachment(44);\n\t\tsurebutton.setLayoutData(fd_surebutton);\n\t\tsurebutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tsurebutton.setText(\"\\u786E\\u5B9A\");\n\t\tsurebutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n \t Register register = new Register();\n\t\t\t\tPatientDAOImpl patientdaoimpl = new PatientDAOImpl();\n\n/*\t\t\t\tregisterdaoimpl.Save(Register);*/\n\t\t\t\tPatientInfo patientinfo = null;\n\t\t\t\tpatientinfo = patientdaoimpl.findByname(nametext.getText());\n\t\t\t\tif(patientinfo.getId() > 0 ){\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"挂号成功!\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tMessageBox messagebox = new MessageBox(load);\n\t\t\t\t\tmessagebox.setMessage(\"此用户不存在,请先注册\");\n\t\t\t\t\tmessagebox.open();\n\t\t\t\t\tload.dispose();\n\t\t\t\t\tregister.open();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton registerbutton = new Button(load, SWT.NONE);\n\t\tFormData fd_registerbutton = new FormData();\n\t\tfd_registerbutton.top = new FormAttachment(70);\n\t\tfd_registerbutton.left = new FormAttachment(53);\n\t\tregisterbutton.setLayoutData(fd_registerbutton);\n\t\tregisterbutton.setFont(SWTResourceManager.getFont(\"楷体\", 12, SWT.BOLD));\n\t\tregisterbutton.setText(\"\\u6CE8\\u518C\");\n\t\tregisterbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\n\t\t\t\tRegister register = new Register();\n\t\t\t\tload.close();\n\t\t\t\tregister.open();\n\t\t\t}\n\t\t});\n\t}", "public TorneoForm() {\n initComponents();\n }", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(340, 217);\n\t\tshell.setText(\"Benvenuto\");\n\t\tshell.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tFormData fd_composite = new FormData();\n\t\tfd_composite.bottom = new FormAttachment(100, -10);\n\t\tfd_composite.top = new FormAttachment(0, 10);\n\t\tfd_composite.right = new FormAttachment(100, -10);\n\t\tfd_composite.left = new FormAttachment(0, 10);\n\t\tcomposite.setLayoutData(fd_composite);\n\t\tcomposite.setLayout(new GridLayout(2, false));\n\t\t\n\t\tLabel lblUsername = new Label(composite, SWT.NONE);\n\t\tlblUsername.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblUsername.setText(\"Username\");\n\t\t\n\t\ttxtUsername = new Text(composite, SWT.BORDER);\n\t\ttxtUsername.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tfinal String username = txtUsername.getText();\n\t\tSystem.out.println(username);\n\t\t\n\t\tLabel lblPeriodo = new Label(composite, SWT.NONE);\n\t\tlblPeriodo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblPeriodo.setText(\"Periodo\");\n\t\t\n\t\tfinal CCombo combo_1 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_1.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_1.setVisibleItemCount(6);\n\t\tcombo_1.setItems(new String[] {\"1 settimana\", \"1 mese\", \"3 mesi\", \"6 mesi\", \"1 anno\", \"Overall\"});\n\t\t\n\t\tLabel lblNumeroCanzoni = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoni.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n\t\tlblNumeroCanzoni.setText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tfinal CCombo combo = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo.setItems(new String[] {\"25\", \"50\"});\n\t\tcombo.setVisibleItemCount(2);\n\t\tcombo.setToolTipText(\"Numero canzoni da analizzare\");\n\t\t\n\t\tLabel lblNumeroCanzoniDa = new Label(composite, SWT.NONE);\n\t\tlblNumeroCanzoniDa.setText(\"Numero canzoni da consigliare\");\n\t\t\n\t\tfinal CCombo combo_2 = new CCombo(composite, SWT.BORDER | SWT.READ_ONLY);\n\t\tcombo_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n\t\tcombo_2.setVisibleItemCount(3);\n\t\tcombo_2.setToolTipText(\"Numero canzoni da consigliare\");\n\t\tcombo_2.setItems(new String[] {\"5\", \"10\", \"20\"});\n\t\t\n\t\tButton btnAvviaRicerca = new Button(composite, SWT.NONE);\n\t\tbtnAvviaRicerca.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfinal String username = txtUsername.getText();\n\t\t\t\tfinal String numSong = combo.getText();\n\t\t\t\tfinal String period = combo_1.getText();\n\t\t\t\tfinal String numConsigli = combo_2.getText();\n\t\t\t\tif(username.isEmpty() || numSong.isEmpty() || period.isEmpty() || numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"si prega di compilare tutti i campi\");\n\t\t\t\t}\n\t\t\t\tif(!username.isEmpty() && !numSong.isEmpty() && !period.isEmpty() && !numConsigli.isEmpty()){\n\t\t\t\t\tSystem.out.println(\"tutto ok\");\n\t\t\t\t\t\n\t\t\t\t\tFileOutputStream out;\n\t\t\t\t\tPrintStream ps;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tout = new FileOutputStream(\"datiutente.txt\");\n\t\t\t\t\t\tps = new PrintStream(out);\n\t\t\t\t\t\tps.println(username);\n\t\t\t\t\t\tps.println(numSong);\n\t\t\t\t\t\tps.println(period);\n\t\t\t\t\t\tps.println(numConsigli);\n\t\t\t\t\t\tps.close();\n\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\tSystem.err.println(\"Errore nella scrittura del file\");\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tPrincipaleParteA.main();\n\t\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t\t\n\t\t});\n\t\tGridData gd_btnAvviaRicerca = new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1);\n\t\tgd_btnAvviaRicerca.heightHint = 31;\n\t\tbtnAvviaRicerca.setLayoutData(gd_btnAvviaRicerca);\n\t\tbtnAvviaRicerca.setText(\"Avvia Ricerca\");\n\t}", "public NewItemDlg(Bundle args) {\n this.setArguments(args);}", "public ADD() {\n initComponents();\n }", "public Create_Course() {\n initComponents();\n comboBoxLec();\n comboBoxDep();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public UserDialog(JFrame parent){\n\t\t\tsuper(parent, \"New user\");\n\t\t\tadd(new JPanel(), BorderLayout.NORTH);\n\t\t\tadd(new UserDatapanel(),BorderLayout.CENTER);\n\t\t\tadd(getButtonPanel(),BorderLayout.SOUTH);\n\t\t\tsetSize(500,300);\n\t\t}", "public New_appointment() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public Form() {\n initComponents();\n }", "public newRelationship() {\n initComponents();\n }", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\tuf = new UserForm(AktuellerAnwender.getAnwender());\r\n\t\t\tRootPanel.get(\"details\").add(uf);\r\n\t\t}", "public Add() {\n initComponents();\n }", "protected static void create(String[] userDataInput, String billboardID, String currentName) {\n JFrame frame = new RenameBillboard(\"Billboard Client\", userDataInput, billboardID, currentName);\n frame.setVisible(true);\n }", "private void createFrame(){\n JPanel jPanelID = new JPanel();\n jPanelID.setLayout(new GridBagLayout());\n JLabel labelText = new JLabel(this.dialogName);\n labelText.setHorizontalAlignment(JLabel.CENTER);\n AddComponent.add(jPanelID,labelText, 0, 0, 2, 1);\n for (int field = 0; field < labelString.length; field++) {\n labelText = new JLabel(labelString[field]);\n AddComponent.add(jPanelID, labelText, 0, field + 1, 1, 1);\n AddComponent.add(jPanelID, fieldID.get(labelString[field]), 1, field + 1, 1, 1);\n }\n int offset = labelString.length + 1;\n labelText = new JLabel(DATE_OF_BIRTH);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, jDateChooser, 1, offset, 1, 1);\n offset++;\n labelText = new JLabel(GROUP);\n AddComponent.add(jPanelID, labelText, 0, offset, 1, 1);\n AddComponent.add(jPanelID, group, 1, offset, 1, 1);\n dialog.add(jPanelID, BorderLayout.NORTH);\n JButton okButton = new JButton(dialogName);\n okButton.addActionListener(actionEvent -> checkAndSave());\n dialog.add(okButton, BorderLayout.SOUTH);\n }", "private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {\n\n initPanel();\n }", "public NewJFrame() {\n initComponents();\n \n \n //combo box\n comboCompet.addItem(\"Séléction officielle\");\n comboCompet.addItem(\"Un certain regard\");\n comboCompet.addItem(\"Cannes Courts métrages\");\n comboCompet.addItem(\"Hors compétitions\");\n comboCompet.addItem(\"Cannes Classics\");\n \n \n //redimension\n this.setResizable(false);\n \n planning = new Planning();\n \n \n }", "private void createUIComponents() {\n editor = createEditor(project, document);\n splitter = new JBSplitter(0.4f);\n ((JBSplitter) splitter).setFirstComponent(editor.getComponent());\n// ((JBSplitter) splitter).setSecondComponent();\n }", "@Override\r\n\tpublic void createPartControl(final Composite parent) {\r\n\t\t// Create the parent component\r\n\t\ttoolkit = new FormToolkit(Display.getDefault());\r\n\t\tform = toolkit.createForm(parent);\r\n\t\tform.setText(\"Vormerkungen\");\r\n\t\ttoolkit.decorateFormHeading(form);\r\n\r\n\t\tfinal Composite composite = form.getBody();\r\n\t\tcomposite.setLayout(new FillLayout());\r\n\r\n\t\tSashForm sash_prebooking = new SashForm(composite, SWT.HORIZONTAL);\r\n\r\n\t\t// groups-----------------------------------\r\n\t\tfinal SashForm sashForm_8 = new SashForm(sash_prebooking, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungBruckGroup = new Group(sashForm_8, SWT.NONE);\r\n\t\trichtungBruckGroup.setLayout(new FillLayout());\r\n\t\trichtungBruckGroup.setForeground(CustomColors.COLOR_RED);\r\n\t\trichtungBruckGroup.setText(\"Richtung Bruck\");\r\n\r\n\t\tfinal SashForm sashForm_7 = new SashForm(sashForm_8, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungKapfenbergGroup = new Group(sashForm_7, SWT.NONE);\r\n\t\trichtungKapfenbergGroup.setLayout(new FillLayout());\r\n\t\trichtungKapfenbergGroup.setText(\"Richtung Kapfenberg\");\r\n\r\n\t\tfinal Group richtungMariazellGroup = new Group(sashForm_7, SWT.NONE);\r\n\t\trichtungMariazellGroup.setLayout(new FillLayout());\r\n\t\trichtungMariazellGroup.setText(\"Richtung Mariazell\");\r\n\r\n\t\t// ----------------------------------------------\r\n\t\tfinal SashForm sashForm_9 = new SashForm(sash_prebooking, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungGrazGroup = new Group(sashForm_9, SWT.NONE);\r\n\t\trichtungGrazGroup.setLayout(new FillLayout());\r\n\t\trichtungGrazGroup.setText(\"Richtung Graz\");\r\n\r\n\t\tfinal SashForm sashForm_1 = new SashForm(sashForm_9, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungLeobenGroup = new Group(sashForm_1, SWT.NONE);\r\n\t\trichtungLeobenGroup.setLayout(new FillLayout());\r\n\t\trichtungLeobenGroup.setText(\"Richtung Leoben\");\r\n\r\n\t\tfinal Group richtungWienGroup = new Group(sashForm_1, SWT.NONE);\r\n\t\trichtungWienGroup.setLayout(new FillLayout());\r\n\t\trichtungWienGroup.setText(\"Richtung Wien\");\r\n\r\n\t\t// viewers\r\n\t\tviewerLeoben = createTableViewer(richtungLeobenGroup);\r\n\t\tviewerGraz = createTableViewer(richtungGrazGroup);\r\n\t\tviewerKapfenberg = createTableViewer(richtungKapfenbergGroup);\r\n\t\tviewerBruck = createTableViewer(richtungBruckGroup);\r\n\t\tviewerWien = createTableViewer(richtungWienGroup);\r\n\t\tviewerMariazell = createTableViewer(richtungMariazellGroup);\r\n\r\n\t\t// create the tooltip\r\n\t\ttooltipLeoben = new JournalViewTooltip(viewerLeoben.getControl());\r\n\t\ttooltipGraz = new JournalViewTooltip(viewerGraz.getControl());\r\n\t\ttooltipKapfenberg = new JournalViewTooltip(viewerKapfenberg.getControl());\r\n\t\ttooltipBruck = new JournalViewTooltip(viewerBruck.getControl());\r\n\t\ttooltipWien = new JournalViewTooltip(viewerWien.getControl());\r\n\t\ttooltipMariazell = new JournalViewTooltip(viewerMariazell.getControl());\r\n\r\n\t\t// show the tool tip when the selection has changed\r\n\t\tviewerLeoben.addSelectionChangedListener(createTooltipListener(viewerLeoben, tooltipLeoben));\r\n\t\tviewerGraz.addSelectionChangedListener(createTooltipListener(viewerGraz, tooltipGraz));\r\n\t\tviewerKapfenberg.addSelectionChangedListener(createTooltipListener(viewerKapfenberg, tooltipKapfenberg));\r\n\t\tviewerBruck.addSelectionChangedListener(createTooltipListener(viewerBruck, tooltipBruck));\r\n\t\tviewerWien.addSelectionChangedListener(createTooltipListener(viewerWien, tooltipWien));\r\n\t\tviewerMariazell.addSelectionChangedListener(createTooltipListener(viewerMariazell, tooltipMariazell));\r\n\r\n\t\t// sort the table by default\r\n\t\tviewerLeoben.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerGraz.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerKapfenberg.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerBruck.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerWien.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerMariazell.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\r\n\t\tmakeActionsBruck(viewerBruck);\r\n\t\tmakeActionsKapfenberg(viewerKapfenberg);\r\n\t\tmakeActionsLeoben(viewerLeoben);\r\n\t\tmakeActionsMariazell(viewerMariazell);\r\n\t\tmakeActionsGraz(viewerGraz);\r\n\t\tmakeActionsWien(viewerWien);\r\n\r\n\t\thookContextMenuLeoben(viewerLeoben);\r\n\t\thookContextMenuGraz(viewerGraz);\r\n\t\thookContextMenuWien(viewerWien);\r\n\t\thookContextMenuMariazell(viewerMariazell);\r\n\t\thookContextMenuBruck(viewerBruck);\r\n\t\thookContextMenuKapfenberg(viewerKapfenberg);\r\n\r\n\t\t// add the form actions\r\n\t\tcreateToolBarActions();\r\n\r\n\t\t// apply the filters\r\n\t\tapplyFilters();\r\n\r\n\t\t// register listeners to keep in track\r\n\t\tNetWrapper.registerListener(this, Transport.class);\r\n\t\tUiWrapper.getDefault().registerListener(this);\r\n\r\n\t\t// initialize the view with current data\r\n\t\tinitView();\r\n\t}", "private void btnCreateHeroActionPerformed() {// GEN-FIRST:event_btnCreateHeroActionPerformed\r\n\t\tdispose();\r\n\t\tHero h = new Hero(txtCreateName.getText());\r\n\t\tnew MainForm().setVisible(true);\r\n\t\tMainForm.setHero(h);\r\n\t\tMainForm.makeOpponents();\r\n\t\th = null;\r\n\t}", "private void criaInterface() {\n\t\tColor azul = new Color(212, 212, 240);\n\n\t\tpainelMetadado.setLayout(null);\n\t\tpainelMetadado.setBackground(azul);\n\n\t\tmetadadoLabel = FactoryInterface.createJLabel(10, 3, 157, 30);\n\t\tpainelMetadado.add(metadadoLabel);\n\n\t\tbotaoAdicionar = FactoryInterface.createJButton(520, 3, 30, 30);\n\t\tbotaoAdicionar.setIcon(FactoryInterface.criarImageIcon(Imagem.ADICIONAR));\n\t\tbotaoAdicionar.setToolTipText(Sap.ADICIONAR.get(Sap.TERMO.get()));\n\t\tpainelMetadado.add(botaoAdicionar);\n\n\t\tbotaoEscolha = FactoryInterface.createJButton(560, 3, 30, 30);\n\t\tbotaoEscolha.setIcon(FactoryInterface.criarImageIcon(Imagem.VOLTAR_PRETO));\n\t\tbotaoEscolha.setToolTipText(Sap.ESCOLHER.get(Sap.TERMO.get()));\n\t\tbotaoEscolha.setEnabled(false);\n\t\tpainelMetadado.add(botaoEscolha);\n\n\t\talterarModo(false);\n\t\tatribuirAcoes();\n\t}", "public CreateAccountPanel() {\n initComponents();\n initializeDateChooser();\n }", "private void newNetworkDialogCreateButton(){\n //Create new networkData object here based on the field info\n LabData.NetworkData newNetworkData = new LabData.NetworkData(\n NetworkAddDialogNameTextfield.getText().toUpperCase(),\n NetworkAddDialogMaskTextfield.getText(),\n NetworkAddDialogGatewayTextfield.getText(),\n (int)NetworkAddDialogMacVLanExtSpinner.getValue(),\n (int)NetworkAddDialogMacVLanSpinner.getValue(),\n NetworkAddDialogIPRangeTextfield.getText(),\n NetworkAddDialogTapRadioButton.isSelected()\n );\n \n // Update the list of labs in the current UI data object\n labDataCurrent.getNetworks().add(newNetworkData);\n \n // Add the network into the UI \n addNetworkPanel(newNetworkData);\n \n // Update the Container Config dialogs to include the new network\n updateNetworkReferenceInContainerConfigDialogs(\"Add\", NetworkAddDialogNameTextfield.getText().toUpperCase(), null);\n }", "public Form(){ \n\t\tsuper(tag(Form.class)); \n\t}", "public frmAfiliado() {\n initComponents();\n \n }", "private void createUserInterface()\r\n {\r\n // get content pane for attaching GUI components\r\n Container contentPane = getContentPane();\r\n\r\n // enable explicit positioning of GUI components\r\n contentPane.setLayout( null );\r\n \r\n // set up side1JLabel\r\n side1JLabel = new JLabel();\r\n side1JLabel.setBounds( 16, 16, 40, 24 );\r\n side1JLabel.setText( \"Side1:\" );\r\n contentPane.add( side1JLabel );\r\n \r\n // set up side1JTextField\r\n side1JTextField = new JTextField();\r\n side1JTextField.setBounds( 72, 16, 90, 24 );\r\n side1JTextField.setHorizontalAlignment( JTextField.RIGHT ); \r\n contentPane.add( side1JTextField );\r\n \r\n // set up side2JLabel\r\n side2JLabel = new JLabel();\r\n side2JLabel.setBounds( 16, 56, 40, 24 );\r\n side2JLabel.setText( \"Side2:\" );\r\n contentPane.add( side2JLabel );\r\n \r\n // set up side2JTextField\r\n side2JTextField = new JTextField();\r\n side2JTextField.setBounds( 72, 56, 90, 24 );\r\n side2JTextField.setHorizontalAlignment( JTextField.RIGHT );\r\n contentPane.add( side2JTextField );\r\n \r\n // set up side3JLabel\r\n side3JLabel = new JLabel();\r\n side3JLabel.setBounds( 16, 96, 40, 24 );\r\n side3JLabel.setText( \"Side3:\" );\r\n contentPane.add( side3JLabel );\r\n \r\n // set up side3JTextField\r\n side3JTextField = new JTextField();\r\n side3JTextField.setBounds( 72, 96, 90, 24 );\r\n side3JTextField.setHorizontalAlignment( JTextField.RIGHT );\r\n contentPane.add( side3JTextField );\r\n \r\n // set up messageJTextField\r\n messageJTextField = new JTextField();\r\n messageJTextField.setBounds( 16, 140, 252, 24 );\r\n messageJTextField.setEditable( false );\r\n contentPane.add( messageJTextField );\r\n \r\n // set up createJButton\r\n createJButton = new JButton();\r\n createJButton.setBounds( 178, 16, 90, 24 );\r\n createJButton.setText( \"Create\" );\r\n contentPane.add( createJButton );\r\n createJButton.addActionListener( \r\n \r\n new ActionListener() // anonymous inner class\r\n {\r\n // event handler called when createJButton is pressed\r\n public void actionPerformed( ActionEvent event )\r\n {\r\n createJButtonActionPerformed( event );\r\n }\r\n \r\n } // end anonymous inner class\r\n \r\n ); // end call to addActionListener\r\n \r\n // set properties of application's window\r\n setTitle( \"Triangle Creator\" ); // set title bar string\r\n setSize( 290, 208 ); // set window size\r\n setVisible( true ); // display window\r\n \r\n }", "public FrmInsertar() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public Form(){\n\t\ttypeOfLicenseApp = new TypeOfLicencsApplication();\n\t\toccupationalTrainingList = new ArrayList<OccupationalTraining>();\n\t\taffiadavit = new Affidavit();\n\t\tapplicationForReciprocity = new ApplicationForReciprocity();\n\t\teducationBackground = new EducationBackground();\n\t\toccupationalLicenses = new OccupationalLicenses();\n\t\tofficeUseOnlyInfo = new OfficeUseOnlyInfo();\n\t}", "private HorizontalPanel createContent() {\n\t\tfinal HorizontalPanel panel = new HorizontalPanel();\n\t\tfinal VerticalPanel form = new VerticalPanel();\n\t\tpanel.add(form);\n\t\t\n\t\tfinal Label titleLabel = new Label(CONSTANTS.actorLabel());\n\t\ttitleLabel.addStyleName(AbstractField.CSS.cbtAbstractPopupLabel());\n\t\tform.add(titleLabel);\n\t\t\n\t\tfinal Label closeButton = new Label();\n\t\tcloseButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tActorPopup.this.hide();\n\t\t\t}\n\t\t});\n\t\tcloseButton.addStyleName(AbstractField.CSS.cbtAbstractPopupClose());\n\t\tform.add(closeButton);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Party field\n\t\t//-----------------------------------------------\n\t\tpartyField = new SuggestField(this, null,\n\t\t\t\tnew NameIdAction(Service.PARTY),\n\t\t\t\tCONSTANTS.partynameLabel(),\n\t\t\t\t20,\n\t\t\t\ttab++);\n\t\tpartyField.setReadOption(Party.CREATED, true);\n\t\tpartyField.setDoubleclickable(true);\n\t\tpartyField.setHelpText(CONSTANTS.partynameHelp());\n\t\tform.add(partyField);\n\n\t\t//-----------------------------------------------\n\t\t// Email Address field\n\t\t//-----------------------------------------------\n\t\temailaddressField = new TextField(this, null,\n\t\t\t\tCONSTANTS.emailaddressLabel(),\n\t\t\t\ttab++);\n\t\temailaddressField.setMaxLength(100);\n\t\temailaddressField.setHelpText(CONSTANTS.emailaddressHelp());\n\t\tform.add(emailaddressField);\n\n\t\t//-----------------------------------------------\n\t\t// Password field\n\t\t//-----------------------------------------------\n\t\tpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.passwordLabel(),\n\t\t\t\ttab++);\n\t\tpasswordField.setSecure(true);\n\t\tpasswordField.setHelpText(CONSTANTS.passwordHelp());\n\t\tform.add(passwordField);\n\n\t\t//-----------------------------------------------\n\t\t// Check Password field\n\t\t//-----------------------------------------------\n\t\tcheckpasswordField = new PasswordField(this, null,\n\t\t\t\tCONSTANTS.checkpasswordLabel(),\n\t\t\t\ttab++);\n\t\tcheckpasswordField.setSecure(true);\n\t\tcheckpasswordField.setHelpText(CONSTANTS.checkpasswordHelp());\n\t\tform.add(checkpasswordField);\n\n\t\t//-----------------------------------------------\n\t\t// Date Format field\n\t\t//-----------------------------------------------\n\t\tformatdateField = new ListField(this, null,\n\t\t\t\tNameId.getList(Party.DATE_FORMATS, Party.DATE_FORMATS),\n\t\t\t\tCONSTANTS.formatdateLabel(),\n\t\t\t\tfalse,\n\t\t\t\ttab++);\n\t\tformatdateField.setDefaultValue(Party.MM_DD_YYYY);\n\t\tformatdateField.setFieldHalf();\n\t\tformatdateField.setHelpText(CONSTANTS.formatdateHelp());\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Phone Format field\n\t\t//-----------------------------------------------\n\t\tformatphoneField = new TextField(this, null,\n\t\t\t\tCONSTANTS.formatphoneLabel(),\n\t\t\t\ttab++);\n\t\tformatphoneField.setMaxLength(25);\n\t\tformatphoneField.setFieldHalf();\n\t\tformatphoneField.setHelpText(CONSTANTS.formatphoneHelp());\n\n\t\tHorizontalPanel ff = new HorizontalPanel();\n\t\tff.add(formatdateField);\n\t\tff.add(formatphoneField);\n\t\tform.add(ff);\n\t\t\n\t\t//-----------------------------------------------\n\t\t// Roles option selector\n\t\t//-----------------------------------------------\n\t\trolesField = new OptionField(this, null,\n\t\t\t\tAbstractRoot.hasPermission(AccessControl.AGENCY) ? getAgentroles() : getOrganizationroles(),\n\t\t\t\tCONSTANTS.roleLabel(),\n\t\t\t\ttab++);\n\t\trolesField.setHelpText(CONSTANTS.roleHelp());\n\t\tform.add(rolesField);\n\n\t\tform.add(createCommands());\n\t\t\n\t\tonRefresh();\n\t\tonReset(Party.CREATED);\n\t\treturn panel;\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Exit = new javax.swing.JLabel();\n createSubIdTxt = new javax.swing.JTextField();\n createSubId = new javax.swing.JLabel();\n createSubNameTxt = new javax.swing.JTextField();\n createSubName = new javax.swing.JLabel();\n createDepIdTxt = new javax.swing.JComboBox<>();\n createLecId = new javax.swing.JLabel();\n createDepId = new javax.swing.JLabel();\n createLecIdTxt = new javax.swing.JComboBox<>();\n sumbit = new javax.swing.JButton();\n noticeBack = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Create Course\");\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n Exit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/exit.png\"))); // NOI18N\n Exit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n Exit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n ExitMouseClicked(evt);\n }\n });\n getContentPane().add(Exit, new org.netbeans.lib.awtextra.AbsoluteConstraints(530, 20, -1, -1));\n\n createSubIdTxt.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n getContentPane().add(createSubIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 160, 150, 25));\n\n createSubId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createSubId.setForeground(new java.awt.Color(255, 255, 255));\n createSubId.setText(\"Subject ID\");\n getContentPane().add(createSubId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 160, -1, -1));\n\n createSubNameTxt.setFont(new java.awt.Font(\"Calibri\", 0, 18)); // NOI18N\n getContentPane().add(createSubNameTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 240, 300, 30));\n\n createSubName.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createSubName.setForeground(new java.awt.Color(255, 255, 255));\n createSubName.setText(\"Subject Name\");\n getContentPane().add(createSubName, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 240, -1, -1));\n\n getContentPane().add(createDepIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 60, -1, -1));\n\n createLecId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createLecId.setForeground(new java.awt.Color(255, 255, 255));\n createLecId.setText(\"Lecturer ID\");\n getContentPane().add(createLecId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 320, -1, -1));\n\n createDepId.setFont(new java.awt.Font(\"Calibri\", 1, 14)); // NOI18N\n createDepId.setForeground(new java.awt.Color(255, 255, 255));\n createDepId.setText(\"Department ID\");\n getContentPane().add(createDepId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 60, -1, -1));\n\n getContentPane().add(createLecIdTxt, new org.netbeans.lib.awtextra.AbsoluteConstraints(220, 320, -1, -1));\n\n sumbit.setText(\"Submit\");\n sumbit.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));\n sumbit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sumbitActionPerformed(evt);\n }\n });\n getContentPane().add(sumbit, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 410, -1, -1));\n\n noticeBack.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/image/interface1.jpg\"))); // NOI18N\n noticeBack.setPreferredSize(new java.awt.Dimension(600, 500));\n getContentPane().add(noticeBack, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1));\n\n pack();\n setLocationRelativeTo(null);\n }", "@Override\n\tpublic void create(CreateCoinForm form) throws Exception {\n\t}", "public ViewPrescriptionForm() {\n initComponents();\n }", "HasClickHandlers getCreateNewButton();", "public CreateTremaDbDialogForm(AnActionEvent event) {\n this.event = event;\n this.windowTitle = \"New Trema XML database file\";\n init();\n }", "private void setupUI() \n\t{\n\t\t\n\t\tthis.setLayout( new FormLayout() );\n\t\tmyInterfaceContainer = new Composite( this, SWT.NONE );\n\t\tmyInterfaceContainer.setLayoutData( FormDataMaker.makeFullFormData());\n\t\t\n\t\tsetupInterfaceContainer();\n\t}", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "public quanlixe_form() {\n initComponents();\n }", "public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}" ]
[ "0.72930676", "0.7008077", "0.6832072", "0.6806455", "0.6687844", "0.6493878", "0.6457791", "0.6452955", "0.6433271", "0.6400143", "0.6379246", "0.6361432", "0.635838", "0.6317216", "0.62879527", "0.62728316", "0.6253294", "0.6239388", "0.6224106", "0.6221384", "0.619511", "0.6186403", "0.6181225", "0.6167776", "0.61656696", "0.6144911", "0.6127083", "0.61233765", "0.61228776", "0.6113894", "0.60905683", "0.6083241", "0.60733616", "0.6073092", "0.60691875", "0.60599613", "0.6058116", "0.6050391", "0.60495234", "0.60434914", "0.6043323", "0.60378915", "0.60321915", "0.60275304", "0.6019224", "0.6012807", "0.60087097", "0.6004326", "0.5992803", "0.5989187", "0.59717864", "0.5969872", "0.59524107", "0.5948775", "0.59463614", "0.5940805", "0.59407216", "0.59387845", "0.5933538", "0.59327346", "0.5928632", "0.59269553", "0.5920498", "0.59194654", "0.5916527", "0.5914972", "0.59060025", "0.5904937", "0.59004027", "0.5897541", "0.58900654", "0.5889398", "0.58888227", "0.58858144", "0.5885141", "0.58819646", "0.587885", "0.5875657", "0.5872937", "0.58700556", "0.58667004", "0.58639616", "0.58575207", "0.5857115", "0.585324", "0.5849819", "0.58450246", "0.5844934", "0.5839303", "0.58357245", "0.5830784", "0.5821247", "0.58201236", "0.5819342", "0.58170927", "0.5813733", "0.5813069", "0.58077896", "0.5798185", "0.57976973" ]
0.60759103
32
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLayeredPane1 = new javax.swing.JLayeredPane(); labelProcess1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jTabbedPane2 = new javax.swing.JTabbedPane(); jPanel8 = new javax.swing.JPanel(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel2 = new javax.swing.JPanel(); jPanel23 = new javax.swing.JPanel(); btnInputMasterReload = new javax.swing.JButton(); jLabelInputScyllaMasterProduk = new javax.swing.JLabel(); jPanel24 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tableInputMaster = new javax.swing.JTable(); jPanel3 = new javax.swing.JPanel(); jPanel25 = new javax.swing.JPanel(); btnInputStockReload = new javax.swing.JButton(); jLabelInputScyllaStock = new javax.swing.JLabel(); jPanel26 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); tableInputStock = new javax.swing.JTable(); jPanel4 = new javax.swing.JPanel(); jPanel27 = new javax.swing.JPanel(); btnInputOutletReload = new javax.swing.JButton(); jLabelInputScyllaOutlet = new javax.swing.JLabel(); jPanel28 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); tableInputOutlet = new javax.swing.JTable(); jPanel5 = new javax.swing.JPanel(); jPanel29 = new javax.swing.JPanel(); btnInputCvOutletReload = new javax.swing.JButton(); jLabelInputScyllaCvOutlet = new javax.swing.JLabel(); jPanel30 = new javax.swing.JPanel(); jScrollPane4 = new javax.swing.JScrollPane(); tableInputCvOutlet = new javax.swing.JTable(); jPanel6 = new javax.swing.JPanel(); jPanel31 = new javax.swing.JPanel(); btnInputSalesmanReload = new javax.swing.JButton(); jLabelInputScyllaSalesman = new javax.swing.JLabel(); jPanel32 = new javax.swing.JPanel(); jScrollPane5 = new javax.swing.JScrollPane(); tableInputSalesman = new javax.swing.JTable(); jPanel7 = new javax.swing.JPanel(); jPanel33 = new javax.swing.JPanel(); btnInputJheaderReload = new javax.swing.JButton(); jLabelInputScyllaJHeader = new javax.swing.JLabel(); jPanel34 = new javax.swing.JPanel(); jScrollPane6 = new javax.swing.JScrollPane(); tableInputJheader = new javax.swing.JTable(); jPanel14 = new javax.swing.JPanel(); jPanel35 = new javax.swing.JPanel(); btnInputJpcodeReload = new javax.swing.JButton(); jLabelInputScyllaJPCode = new javax.swing.JLabel(); jPanel36 = new javax.swing.JPanel(); jScrollPane7 = new javax.swing.JScrollPane(); tableInputJpcode = new javax.swing.JTable(); jPanel15 = new javax.swing.JPanel(); jPanel37 = new javax.swing.JPanel(); btnInputJtprbReload = new javax.swing.JButton(); jLabelInputScyllaJTprb = new javax.swing.JLabel(); jPanel38 = new javax.swing.JPanel(); jScrollPane8 = new javax.swing.JScrollPane(); tableInputJtprb = new javax.swing.JTable(); jPanel16 = new javax.swing.JPanel(); jPanel39 = new javax.swing.JPanel(); btnInputJtpruReload = new javax.swing.JButton(); jLabelInputScyllaJTpru = new javax.swing.JLabel(); jPanel40 = new javax.swing.JPanel(); jScrollPane9 = new javax.swing.JScrollPane(); tableInputJtpru = new javax.swing.JTable(); jPanel17 = new javax.swing.JPanel(); jTabbedPane4 = new javax.swing.JTabbedPane(); jPanel21 = new javax.swing.JPanel(); textDistributorCode = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jPanel52 = new javax.swing.JPanel(); textRecordTypeSales = new javax.swing.JTextField(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); textRecordTypeStock = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); textRecordTypeClient = new javax.swing.JTextField(); jLabel15 = new javax.swing.JLabel(); textRecordTypeSo = new javax.swing.JTextField(); jPanel53 = new javax.swing.JPanel(); jLabel16 = new javax.swing.JLabel(); textWarehouseWarehouseCode = new javax.swing.JTextField(); jLabel17 = new javax.swing.JLabel(); textWarehouseWarehouseDescription = new javax.swing.JTextField(); btnGeneralSettingSimpan = new javax.swing.JButton(); btnGeneralSettingReload = new javax.swing.JButton(); jPanel54 = new javax.swing.JPanel(); jLabel18 = new javax.swing.JLabel(); textEmailFrom = new javax.swing.JTextField(); jLabel19 = new javax.swing.JLabel(); textEmailTo = new javax.swing.JTextField(); jLabel20 = new javax.swing.JLabel(); jLabel21 = new javax.swing.JLabel(); textEmailSubject = new javax.swing.JTextField(); jLabel22 = new javax.swing.JLabel(); jLabel28 = new javax.swing.JLabel(); textEmailPassword = new javax.swing.JPasswordField(); jPanel56 = new javax.swing.JPanel(); checkTprbDiluarBarang = new javax.swing.JCheckBox(); jPanel22 = new javax.swing.JPanel(); jPanel41 = new javax.swing.JPanel(); jScrollPane10 = new javax.swing.JScrollPane(); tableMappingTipeOutlet = new javax.swing.JTable(); jPanel42 = new javax.swing.JPanel(); btnMapTipeOutletSimpan = new javax.swing.JButton(); btnMapTipeOutletHapus = new javax.swing.JButton(); btnMapTipeOutletReload = new javax.swing.JButton(); jPanel43 = new javax.swing.JPanel(); textMapTipeOutletIdTypeOutletScy = new javax.swing.JTextField(); textMapTipeOutletIdTipeOutlet = new javax.swing.JTextField(); textMapTipeOutletDeskripsi = new javax.swing.JTextField(); jPanel57 = new javax.swing.JPanel(); jLabel23 = new javax.swing.JLabel(); jLabel24 = new javax.swing.JLabel(); jLabel25 = new javax.swing.JLabel(); jLabel26 = new javax.swing.JLabel(); jPanel18 = new javax.swing.JPanel(); jPanel19 = new javax.swing.JPanel(); textPathInputMaster = new javax.swing.JTextField(); textPathInputStock = new javax.swing.JTextField(); textPathInputOutlet = new javax.swing.JTextField(); textPathInputCvOutlet = new javax.swing.JTextField(); textPathInputSalesman = new javax.swing.JTextField(); textPathInputJHeader = new javax.swing.JTextField(); textPathInputJPcode = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); textPathInputJTprb = new javax.swing.JTextField(); textPathInputJTpru = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); btnPathInputMaster = new javax.swing.JButton(); btnPathInputStock = new javax.swing.JButton(); btnPathInputOutlet = new javax.swing.JButton(); btnPathInputCvOutlet = new javax.swing.JButton(); btnPathInputSalesman = new javax.swing.JButton(); btnPathInputJHeader = new javax.swing.JButton(); btnPathInputJPcode = new javax.swing.JButton(); btnPathInputJTprb = new javax.swing.JButton(); btnPathInputJTpru = new javax.swing.JButton(); btnRetrieveInputMaster = new javax.swing.JButton(); btnRetrieveInputStock = new javax.swing.JButton(); btnRetrieveInputOutlet = new javax.swing.JButton(); btnRetrieveInputSalesman = new javax.swing.JButton(); btnRetrieveInputCvOutlet = new javax.swing.JButton(); btnRetrieveInputJHeader = new javax.swing.JButton(); btnRetrieveInputJPcode = new javax.swing.JButton(); btnRetrieveInputJTprb = new javax.swing.JButton(); btnRetrieveInputJTpru = new javax.swing.JButton(); jDateChooseTanggalStock = new com.toedter.calendar.JDateChooser("dd/MM/yyyy", "##/##/####",'_'); jLabel27 = new javax.swing.JLabel(); jPanel20 = new javax.swing.JPanel(); textPathOutput = new javax.swing.JTextField(); btnPathOutput = new javax.swing.JButton(); btnExtractSales = new javax.swing.JButton(); btnExtractStock = new javax.swing.JButton(); btnExtractClient = new javax.swing.JButton(); btnExtractSo = new javax.swing.JButton(); jLabel10 = new javax.swing.JLabel(); btnExtractAll = new javax.swing.JButton(); jDateChooserExtract1 = new com.toedter.calendar.JDateChooser("dd/MM/yyyy", "##/##/####",'_'); btnKirimByEmail = new javax.swing.JButton(); jDateChooserExtract2 = new com.toedter.calendar.JDateChooser("dd/MM/yyyy", "##/##/####",'_'); jPanel55 = new javax.swing.JPanel(); checkModeDatabase = new javax.swing.JCheckBox(); jPanel58 = new javax.swing.JPanel(); btnPathInputReloadAll = new javax.swing.JButton(); btnPathInputAuto = new javax.swing.JButton(); btnPathInputClearAll = new javax.swing.JButton(); btnRetrieveInputAll = new javax.swing.JButton(); jPanel9 = new javax.swing.JPanel(); jTabbedPane3 = new javax.swing.JTabbedPane(); jPanel10 = new javax.swing.JPanel(); jPanel44 = new javax.swing.JPanel(); btnOutputSalesReload = new javax.swing.JButton(); jLabelOutputSales = new javax.swing.JLabel(); jPanel45 = new javax.swing.JPanel(); jScrollPane11 = new javax.swing.JScrollPane(); tableOutputSales = new javax.swing.JTable(); jPanel11 = new javax.swing.JPanel(); jPanel46 = new javax.swing.JPanel(); btnOutputStockReload = new javax.swing.JButton(); jLabelOutputStock = new javax.swing.JLabel(); jPanel47 = new javax.swing.JPanel(); jScrollPane12 = new javax.swing.JScrollPane(); tableOutputStock = new javax.swing.JTable(); jPanel12 = new javax.swing.JPanel(); jPanel48 = new javax.swing.JPanel(); btnOutputClientReload = new javax.swing.JButton(); jLabelOutputClient = new javax.swing.JLabel(); jPanel49 = new javax.swing.JPanel(); jScrollPane13 = new javax.swing.JScrollPane(); tableOutputClient = new javax.swing.JTable(); jPanel13 = new javax.swing.JPanel(); jPanel50 = new javax.swing.JPanel(); btnOutputSalesOrderReload = new javax.swing.JButton(); jLabelOutputSalesOrder = new javax.swing.JLabel(); jPanel51 = new javax.swing.JPanel(); jScrollPane14 = new javax.swing.JScrollPane(); tableOutputSalesOrder = new javax.swing.JTable(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); labelProcess1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); labelProcess1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/ajax-loader.gif"))); // NOI18N jLayeredPane1.add(labelProcess1); labelProcess1.setBounds(0, 0, 30, 70); jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jTabbedPane2.setTabPlacement(javax.swing.JTabbedPane.RIGHT); jPanel23.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputMasterReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputMasterReload.setText("Reload"); jLabelInputScyllaMasterProduk.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaMasterProduk.setText("jLabelInputScyllaMasterProduk"); javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23); jPanel23.setLayout(jPanel23Layout); jPanel23Layout.setHorizontalGroup( jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel23Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputMasterReload, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabelInputScyllaMasterProduk, javax.swing.GroupLayout.PREFERRED_SIZE, 640, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(21, 21, 21)) ); jPanel23Layout.setVerticalGroup( jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel23Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputMasterReload) .addContainerGap(18, Short.MAX_VALUE)) .addGroup(jPanel23Layout.createSequentialGroup() .addComponent(jLabelInputScyllaMasterProduk, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel24.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputMaster.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); tableInputMaster.setShowVerticalLines(false); jScrollPane1.setViewportView(tableInputMaster); javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24); jPanel24.setLayout(jPanel24Layout); jPanel24Layout.setHorizontalGroup( jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel24Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel24Layout.setVerticalGroup( jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel24Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("Master/Product", jPanel2); jPanel25.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputStockReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputStockReload.setText("Reload"); jLabelInputScyllaStock.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaStock.setText("jLabelInputScyllaStock"); javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25); jPanel25.setLayout(jPanel25Layout); jPanel25Layout.setHorizontalGroup( jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel25Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputStockReload, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabelInputScyllaStock, javax.swing.GroupLayout.PREFERRED_SIZE, 644, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(22, 22, 22)) ); jPanel25Layout.setVerticalGroup( jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel25Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel25Layout.createSequentialGroup() .addComponent(btnInputStockReload) .addGap(0, 6, Short.MAX_VALUE)) .addComponent(jLabelInputScyllaStock, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel26.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputStock.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane2.setViewportView(tableInputStock); javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26); jPanel26.setLayout(jPanel26Layout); jPanel26Layout.setHorizontalGroup( jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel26Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel26Layout.setVerticalGroup( jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel26Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("Stock", jPanel3); jPanel27.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputOutletReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputOutletReload.setText("Reload"); jLabelInputScyllaOutlet.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaOutlet.setText("jLabelInputScyllaOutlet"); javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27); jPanel27.setLayout(jPanel27Layout); jPanel27Layout.setHorizontalGroup( jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel27Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputOutletReload, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32) .addComponent(jLabelInputScyllaOutlet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(25, 25, 25)) ); jPanel27Layout.setVerticalGroup( jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel27Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel27Layout.createSequentialGroup() .addComponent(btnInputOutletReload) .addGap(0, 6, Short.MAX_VALUE)) .addComponent(jLabelInputScyllaOutlet, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel28.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputOutlet.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane3.setViewportView(tableInputOutlet); javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28); jPanel28.setLayout(jPanel28Layout); jPanel28Layout.setHorizontalGroup( jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel28Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel28Layout.setVerticalGroup( jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel28Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel27, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("Outlet", jPanel4); jPanel29.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputCvOutletReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputCvOutletReload.setText("Reload"); jLabelInputScyllaCvOutlet.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaCvOutlet.setText("jLabelInputScyllaCvOutlet"); javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29); jPanel29.setLayout(jPanel29Layout); jPanel29Layout.setHorizontalGroup( jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel29Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputCvOutletReload, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabelInputScyllaCvOutlet, javax.swing.GroupLayout.PREFERRED_SIZE, 631, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28)) ); jPanel29Layout.setVerticalGroup( jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel29Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnInputCvOutletReload) .addComponent(jLabelInputScyllaCvOutlet)) .addContainerGap(18, Short.MAX_VALUE)) ); jPanel30.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputCvOutlet.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane4.setViewportView(tableInputCvOutlet); javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30); jPanel30.setLayout(jPanel30Layout); jPanel30Layout.setHorizontalGroup( jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel30Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel30Layout.setVerticalGroup( jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel30Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("CvOutlet", jPanel5); jPanel31.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputSalesmanReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputSalesmanReload.setText("Reload"); jLabelInputScyllaSalesman.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaSalesman.setText("jLabelInputScyllaSalesman"); jLabelInputScyllaSalesman.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31); jPanel31.setLayout(jPanel31Layout); jPanel31Layout.setHorizontalGroup( jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel31Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputSalesmanReload, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabelInputScyllaSalesman, javax.swing.GroupLayout.PREFERRED_SIZE, 612, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(22, 22, 22)) ); jPanel31Layout.setVerticalGroup( jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel31Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnInputSalesmanReload) .addComponent(jLabelInputScyllaSalesman)) .addContainerGap(18, Short.MAX_VALUE)) ); jPanel32.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputSalesman.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane5.setViewportView(tableInputSalesman); javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32); jPanel32.setLayout(jPanel32Layout); jPanel32Layout.setHorizontalGroup( jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel32Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel32Layout.setVerticalGroup( jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel32Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("Salesman", jPanel6); jPanel33.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputJheaderReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputJheaderReload.setText("Reload"); jLabelInputScyllaJHeader.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaJHeader.setText("jLabelInputScyllaJHeader"); jLabelInputScyllaJHeader.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33); jPanel33.setLayout(jPanel33Layout); jPanel33Layout.setHorizontalGroup( jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel33Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputJheaderReload, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelInputScyllaJHeader, javax.swing.GroupLayout.PREFERRED_SIZE, 700, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel33Layout.setVerticalGroup( jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel33Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelInputScyllaJHeader, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel33Layout.createSequentialGroup() .addComponent(btnInputJheaderReload) .addGap(0, 6, Short.MAX_VALUE))) .addContainerGap()) ); jPanel34.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputJheader.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane6.setViewportView(tableInputJheader); javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34); jPanel34.setLayout(jPanel34Layout); jPanel34Layout.setHorizontalGroup( jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel34Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel34Layout.setVerticalGroup( jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel34Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel34, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel33, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel7Layout.setVerticalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel34, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("JHeader", jPanel7); jPanel35.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputJpcodeReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputJpcodeReload.setText("Reload"); jLabelInputScyllaJPCode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaJPCode.setText("jLabelInputScyllaJPCode"); javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35); jPanel35.setLayout(jPanel35Layout); jPanel35Layout.setHorizontalGroup( jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel35Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputJpcodeReload, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelInputScyllaJPCode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(22, 22, 22)) ); jPanel35Layout.setVerticalGroup( jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel35Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel35Layout.createSequentialGroup() .addComponent(btnInputJpcodeReload) .addGap(0, 6, Short.MAX_VALUE)) .addComponent(jLabelInputScyllaJPCode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel36.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputJpcode.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane7.setViewportView(tableInputJpcode); javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36); jPanel36.setLayout(jPanel36Layout); jPanel36Layout.setHorizontalGroup( jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel36Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel36Layout.setVerticalGroup( jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel36Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14); jPanel14.setLayout(jPanel14Layout); jPanel14Layout.setHorizontalGroup( jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel14Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel36, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel14Layout.setVerticalGroup( jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel36, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("JPcode", jPanel14); jPanel37.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputJtprbReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputJtprbReload.setText("Reload"); jLabelInputScyllaJTprb.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaJTprb.setText("jLabelInputScyllaJTprb"); javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37); jPanel37.setLayout(jPanel37Layout); jPanel37Layout.setHorizontalGroup( jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel37Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputJtprbReload, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelInputScyllaJTprb, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(20, 20, 20)) ); jPanel37Layout.setVerticalGroup( jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel37Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel37Layout.createSequentialGroup() .addComponent(btnInputJtprbReload) .addContainerGap(18, Short.MAX_VALUE)) .addComponent(jLabelInputScyllaJTprb, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) ); jPanel38.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputJtprb.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane8.setViewportView(tableInputJtprb); javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38); jPanel38.setLayout(jPanel38Layout); jPanel38Layout.setHorizontalGroup( jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel38Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel38Layout.setVerticalGroup( jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel38Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15); jPanel15.setLayout(jPanel15Layout); jPanel15Layout.setHorizontalGroup( jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel37, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel15Layout.setVerticalGroup( jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel37, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("JTprb", jPanel15); jPanel39.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnInputJtpruReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnInputJtpruReload.setText("Reload"); jLabelInputScyllaJTpru.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelInputScyllaJTpru.setText("jLabelInputScyllaJTpru"); javax.swing.GroupLayout jPanel39Layout = new javax.swing.GroupLayout(jPanel39); jPanel39.setLayout(jPanel39Layout); jPanel39Layout.setHorizontalGroup( jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel39Layout.createSequentialGroup() .addContainerGap() .addComponent(btnInputJtpruReload, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelInputScyllaJTpru, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(24, 24, 24)) ); jPanel39Layout.setVerticalGroup( jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel39Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel39Layout.createSequentialGroup() .addComponent(btnInputJtpruReload) .addGap(0, 6, Short.MAX_VALUE)) .addComponent(jLabelInputScyllaJTpru, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel40.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableInputJtpru.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane9.setViewportView(tableInputJtpru); javax.swing.GroupLayout jPanel40Layout = new javax.swing.GroupLayout(jPanel40); jPanel40.setLayout(jPanel40Layout); jPanel40Layout.setHorizontalGroup( jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel40Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE) .addContainerGap()) ); jPanel40Layout.setVerticalGroup( jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel40Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16); jPanel16.setLayout(jPanel16Layout); jPanel16Layout.setHorizontalGroup( jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel16Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel40, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel39, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel16Layout.setVerticalGroup( jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel40, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane1.addTab("JTpru", jPanel16); jTabbedPane4.setTabPlacement(javax.swing.JTabbedPane.BOTTOM); jPanel21.setFont(new java.awt.Font("Lucida Grande", 3, 12)); // NOI18N textDistributorCode.setText("jTextField11"); jLabel11.setText("Distributor Code"); jPanel52.setBorder(javax.swing.BorderFactory.createTitledBorder("Record Type")); textRecordTypeSales.setText("jTextField15"); jLabel12.setText("Sales"); jLabel13.setText("Stock"); textRecordTypeStock.setText("jTextField15"); jLabel14.setText("Client"); textRecordTypeClient.setText("jTextField15"); jLabel15.setText("SO"); textRecordTypeSo.setText("jTextField15"); javax.swing.GroupLayout jPanel52Layout = new javax.swing.GroupLayout(jPanel52); jPanel52.setLayout(jPanel52Layout); jPanel52Layout.setHorizontalGroup( jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel52Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel52Layout.createSequentialGroup() .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(textRecordTypeSales, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel52Layout.createSequentialGroup() .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(textRecordTypeStock, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel52Layout.createSequentialGroup() .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(textRecordTypeClient, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel52Layout.createSequentialGroup() .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(textRecordTypeSo, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); jPanel52Layout.setVerticalGroup( jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel52Layout.createSequentialGroup() .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textRecordTypeSales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textRecordTypeStock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textRecordTypeClient, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel14)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textRecordTypeSo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel15)) .addGap(0, 41, Short.MAX_VALUE)) ); jPanel53.setBorder(javax.swing.BorderFactory.createTitledBorder("Warehouse")); jLabel16.setText("Warehouse Code"); textWarehouseWarehouseCode.setText("jTextField15"); jLabel17.setText("Warehouse Description"); textWarehouseWarehouseDescription.setText("jTextField15"); javax.swing.GroupLayout jPanel53Layout = new javax.swing.GroupLayout(jPanel53); jPanel53.setLayout(jPanel53Layout); jPanel53Layout.setHorizontalGroup( jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel53Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel53Layout.createSequentialGroup() .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(textWarehouseWarehouseCode, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel53Layout.createSequentialGroup() .addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(textWarehouseWarehouseDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); jPanel53Layout.setVerticalGroup( jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel53Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textWarehouseWarehouseCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel16)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textWarehouseWarehouseDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel17)) .addContainerGap(23, Short.MAX_VALUE)) ); btnGeneralSettingSimpan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/save_16x16.png"))); // NOI18N btnGeneralSettingSimpan.setText("Simpan"); btnGeneralSettingReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnGeneralSettingReload.setText("Reload"); jPanel54.setBorder(javax.swing.BorderFactory.createTitledBorder("Email untuk Kirim")); jLabel18.setText("From"); textEmailFrom.setText("jTextField1"); jLabel19.setText("To"); textEmailTo.setText("jTextField2"); jLabel20.setForeground(new java.awt.Color(212, 30, 30)); jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel20.setText("EMAIL TO lebih dari 1 addresss gunakan tanda ( ; )"); jLabel21.setForeground(new java.awt.Color(212, 30, 30)); jLabel21.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel21.setText("contoh: [email protected]; [email protected]"); textEmailSubject.setText("jTextField1"); jLabel22.setText("Subject"); jLabel28.setText("Password"); textEmailPassword.setText("jPasswordField1"); javax.swing.GroupLayout jPanel54Layout = new javax.swing.GroupLayout(jPanel54); jPanel54.setLayout(jPanel54Layout); jPanel54Layout.setHorizontalGroup( jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel54Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel54Layout.createSequentialGroup() .addComponent(jLabel22) .addGap(18, 18, 18) .addComponent(textEmailSubject)) .addComponent(jLabel21, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE) .addGroup(jPanel54Layout.createSequentialGroup() .addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(textEmailTo)) .addGroup(jPanel54Layout.createSequentialGroup() .addGroup(jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel28)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(textEmailFrom) .addComponent(textEmailPassword, javax.swing.GroupLayout.DEFAULT_SIZE, 178, Short.MAX_VALUE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel54Layout.setVerticalGroup( jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel54Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel18) .addComponent(textEmailFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel28) .addComponent(textEmailPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE) .addGroup(jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textEmailTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel19)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel20) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel21, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel54Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textEmailSubject, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel22)) .addContainerGap()) ); jPanel56.setBorder(javax.swing.BorderFactory.createEtchedBorder()); checkTprbDiluarBarang.setText("Diskon TPRB diluar barang spread satu nota"); javax.swing.GroupLayout jPanel56Layout = new javax.swing.GroupLayout(jPanel56); jPanel56.setLayout(jPanel56Layout); jPanel56Layout.setHorizontalGroup( jPanel56Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel56Layout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(checkTprbDiluarBarang, javax.swing.GroupLayout.PREFERRED_SIZE, 332, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(21, Short.MAX_VALUE)) ); jPanel56Layout.setVerticalGroup( jPanel56Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel56Layout.createSequentialGroup() .addContainerGap() .addComponent(checkTprbDiluarBarang) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21); jPanel21.setLayout(jPanel21Layout); jPanel21Layout.setHorizontalGroup( jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel21Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel52, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel21Layout.createSequentialGroup() .addComponent(jLabel11) .addGap(29, 29, 29) .addComponent(textDistributorCode, javax.swing.GroupLayout.PREFERRED_SIZE, 273, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel53, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel21Layout.createSequentialGroup() .addComponent(btnGeneralSettingSimpan, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnGeneralSettingReload, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel54, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel56, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(109, Short.MAX_VALUE)) ); jPanel21Layout.setVerticalGroup( jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel21Layout.createSequentialGroup() .addGap(19, 19, 19) .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11) .addComponent(textDistributorCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel21Layout.createSequentialGroup() .addComponent(jPanel52, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel53, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel21Layout.createSequentialGroup() .addComponent(jPanel54, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel56, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnGeneralSettingSimpan, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnGeneralSettingReload, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(43, Short.MAX_VALUE)) ); jTabbedPane4.addTab("General Setting", jPanel21); jPanel41.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableMappingTipeOutlet.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane10.setViewportView(tableMappingTipeOutlet); javax.swing.GroupLayout jPanel41Layout = new javax.swing.GroupLayout(jPanel41); jPanel41.setLayout(jPanel41Layout); jPanel41Layout.setHorizontalGroup( jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel41Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE) .addContainerGap()) ); jPanel41Layout.setVerticalGroup( jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel41Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()) ); jPanel42.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnMapTipeOutletSimpan.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/save_16x16.png"))); // NOI18N btnMapTipeOutletSimpan.setText("Simpan"); btnMapTipeOutletHapus.setText("Hapus"); btnMapTipeOutletReload.setText("Reload"); javax.swing.GroupLayout jPanel42Layout = new javax.swing.GroupLayout(jPanel42); jPanel42.setLayout(jPanel42Layout); jPanel42Layout.setHorizontalGroup( jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel42Layout.createSequentialGroup() .addContainerGap() .addComponent(btnMapTipeOutletSimpan, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(27, 27, 27) .addComponent(btnMapTipeOutletHapus, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnMapTipeOutletReload, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel42Layout.setVerticalGroup( jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel42Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnMapTipeOutletSimpan) .addComponent(btnMapTipeOutletHapus) .addComponent(btnMapTipeOutletReload)) .addContainerGap(13, Short.MAX_VALUE)) ); jPanel43.setBorder(javax.swing.BorderFactory.createEtchedBorder()); textMapTipeOutletIdTypeOutletScy.setText("jTextField12"); textMapTipeOutletIdTipeOutlet.setText("jTextField13"); textMapTipeOutletDeskripsi.setText("jTextField14"); javax.swing.GroupLayout jPanel43Layout = new javax.swing.GroupLayout(jPanel43); jPanel43.setLayout(jPanel43Layout); jPanel43Layout.setHorizontalGroup( jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel43Layout.createSequentialGroup() .addContainerGap() .addComponent(textMapTipeOutletIdTypeOutletScy, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(textMapTipeOutletIdTipeOutlet, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(textMapTipeOutletDeskripsi) .addContainerGap()) ); jPanel43Layout.setVerticalGroup( jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel43Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textMapTipeOutletIdTypeOutletScy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(textMapTipeOutletIdTipeOutlet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(textMapTipeOutletDeskripsi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(14, Short.MAX_VALUE)) ); jPanel57.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jLabel23.setForeground(java.awt.Color.red); jLabel23.setText("Outlet yang TIPE nya tidak terdaftar disini"); jLabel24.setForeground(java.awt.Color.red); jLabel24.setText("TIDAK AKAN DIPROSES"); jLabel25.setForeground(java.awt.Color.red); jLabel25.setText("JADI:"); jLabel26.setForeground(java.awt.Color.red); jLabel26.setText("PASTIKAN SEMUA TIPE SUDAH CATAT DISINI"); javax.swing.GroupLayout jPanel57Layout = new javax.swing.GroupLayout(jPanel57); jPanel57.setLayout(jPanel57Layout); jPanel57Layout.setHorizontalGroup( jPanel57Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel57Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel57Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel23) .addComponent(jLabel24) .addComponent(jLabel25) .addComponent(jLabel26)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel57Layout.setVerticalGroup( jPanel57Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel57Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel23) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel24) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel25) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel26) .addContainerGap(223, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22); jPanel22.setLayout(jPanel22Layout); jPanel22Layout.setHorizontalGroup( jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel22Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel43, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel41, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel42, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel57, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel22Layout.setVerticalGroup( jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel22Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel57, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel41, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(35, 35, 35)) ); jTabbedPane4.addTab("Mapping Tipe Outlet Baygon", jPanel22); javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17); jPanel17.setLayout(jPanel17Layout); jPanel17Layout.setHorizontalGroup( jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel17Layout.createSequentialGroup() .addContainerGap() .addComponent(jTabbedPane4) .addContainerGap()) ); jPanel17Layout.setVerticalGroup( jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel17Layout.createSequentialGroup() .addContainerGap() .addComponent(jTabbedPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 515, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(48, Short.MAX_VALUE)) ); jTabbedPane1.addTab("Konfigurasi Sistem", jPanel17); jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder("Input dari Scylla")); textPathInputMaster.setText("jTextField1"); textPathInputStock.setText("jTextField2"); textPathInputOutlet.setText("jTextField3"); textPathInputCvOutlet.setText("jTextField4"); textPathInputSalesman.setText("Salesman"); textPathInputJHeader.setText("jTextField6"); textPathInputJPcode.setText("jTextField7"); jLabel1.setText("1. Master/Prod"); jLabel2.setText("9. Stock"); jLabel3.setText("2. Salesman"); jLabel4.setText("3. Outlet"); jLabel5.setText("4. CvOutlet"); jLabel6.setText("5. JHeader"); jLabel7.setText("6. JPcode"); textPathInputJTprb.setText("jTextField8"); textPathInputJTpru.setText("jTextField9"); jLabel8.setText("7. JTprb"); jLabel9.setText("8. JTpru"); btnPathInputMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputMaster.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnPathInputMasterActionPerformed(evt); } }); btnPathInputStock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputOutlet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputCvOutlet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputSalesman.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputJHeader.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputJPcode.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputJTprb.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputJTpru.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnRetrieveInputMaster.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputMaster.setText("1. Retrieve"); btnRetrieveInputMaster.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRetrieveInputMasterActionPerformed(evt); } }); btnRetrieveInputStock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputStock.setText("9. Retrieve"); btnRetrieveInputOutlet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputOutlet.setText("3. Retrieve"); btnRetrieveInputSalesman.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputSalesman.setText("2. Retrieve"); btnRetrieveInputCvOutlet.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputCvOutlet.setText("4. Retrieve"); btnRetrieveInputJHeader.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputJHeader.setText("5. Retrieve"); btnRetrieveInputJPcode.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputJPcode.setText("6. Retrieve"); btnRetrieveInputJTprb.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputJTprb.setText("7. Retrieve"); btnRetrieveInputJTpru.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputJTpru.setText("8. Retrieve"); btnRetrieveInputJTpru.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRetrieveInputJTpruActionPerformed(evt); } }); jDateChooseTanggalStock.setDateFormatString("dd/MM/yyyy"); jLabel27.setFont(new java.awt.Font("Tahoma", 2, 11)); // NOI18N jLabel27.setForeground(new java.awt.Color(204, 0, 0)); jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel27.setText("Tanggal Stock adalah stok awal transaksi atau stok akhir tanggal kemarin"); javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19); jPanel19.setLayout(jPanel19Layout); jPanel19Layout.setHorizontalGroup( jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4) .addComponent(jLabel5) .addComponent(jLabel6) .addComponent(jLabel7) .addComponent(jLabel8) .addComponent(jLabel3) .addComponent(jLabel9) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createSequentialGroup() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(textPathInputJTpru, javax.swing.GroupLayout.DEFAULT_SIZE, 502, Short.MAX_VALUE) .addComponent(textPathInputJTprb) .addComponent(textPathInputMaster) .addComponent(textPathInputJHeader) .addComponent(textPathInputJPcode) .addComponent(textPathInputCvOutlet) .addComponent(textPathInputOutlet) .addComponent(textPathInputSalesman)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnPathInputMaster) .addComponent(btnPathInputOutlet) .addComponent(btnPathInputCvOutlet) .addComponent(btnPathInputSalesman) .addComponent(btnPathInputJHeader) .addComponent(btnPathInputJPcode) .addComponent(btnPathInputJTprb) .addComponent(btnPathInputJTpru)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnRetrieveInputMaster, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputJHeader, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputJPcode, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputJTprb, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputJTpru, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputSalesman, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputOutlet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputCvOutlet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(jPanel19Layout.createSequentialGroup() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel19Layout.createSequentialGroup() .addComponent(textPathInputStock, javax.swing.GroupLayout.PREFERRED_SIZE, 362, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jDateChooseTanggalStock, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnPathInputStock) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnRetrieveInputStock))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel19Layout.setVerticalGroup( jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textPathInputMaster, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1) .addComponent(btnPathInputMaster)) .addGroup(jPanel19Layout.createSequentialGroup() .addGap(2, 2, 2) .addComponent(btnRetrieveInputMaster))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(textPathInputSalesman, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnPathInputOutlet) .addComponent(btnRetrieveInputSalesman)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createSequentialGroup() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(btnPathInputCvOutlet) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(textPathInputOutlet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(7, 7, 7) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnRetrieveInputCvOutlet) .addComponent(btnPathInputSalesman) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(textPathInputCvOutlet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(7, 7, 7) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textPathInputJHeader, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnPathInputJHeader)) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnRetrieveInputJHeader)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createSequentialGroup() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textPathInputJPcode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnPathInputJPcode)) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textPathInputJTprb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnPathInputJTprb)) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textPathInputJTpru, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnPathInputJTpru)) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel19Layout.createSequentialGroup() .addComponent(btnRetrieveInputJPcode) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnRetrieveInputJTprb) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnRetrieveInputJTpru))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel19Layout.createSequentialGroup() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(textPathInputStock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel27) .addGap(7, 7, 7)) .addGroup(jPanel19Layout.createSequentialGroup() .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jDateChooseTanggalStock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnPathInputStock) .addComponent(btnRetrieveInputStock)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addGroup(jPanel19Layout.createSequentialGroup() .addComponent(btnRetrieveInputOutlet) .addGap(0, 0, Short.MAX_VALUE)))) ); jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder("Extract Baygon")); textPathOutput.setText("jTextField10"); btnPathOutput.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_download_16x16.png"))); // NOI18N btnExtractSales.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_download2_16x16.png"))); // NOI18N btnExtractSales.setText("Sales"); btnExtractStock.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_download2_16x16.png"))); // NOI18N btnExtractStock.setText("Stock"); btnExtractClient.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_download2_16x16.png"))); // NOI18N btnExtractClient.setText("Client"); btnExtractSo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_download2_16x16.png"))); // NOI18N btnExtractSo.setText("SO"); jLabel10.setText("Path"); btnExtractAll.setText("Extract All"); jDateChooserExtract1.setDateFormatString("dd/MM/yyyy"); btnKirimByEmail.setText("Kirim By Email"); btnKirimByEmail.setEnabled(false); jDateChooserExtract2.setDateFormatString("dd/MM/yyyy"); javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20); jPanel20.setLayout(jPanel20Layout); jPanel20Layout.setHorizontalGroup( jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel20Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel10) .addGap(6, 6, 6) .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel20Layout.createSequentialGroup() .addComponent(jDateChooserExtract1, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jDateChooserExtract2, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(textPathOutput, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnPathOutput) .addGap(49, 49, 49) .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel20Layout.createSequentialGroup() .addComponent(btnExtractSales) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnExtractStock)) .addComponent(btnExtractAll, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel20Layout.createSequentialGroup() .addComponent(btnExtractClient) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnExtractSo, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnKirimByEmail, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel20Layout.setVerticalGroup( jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel20Layout.createSequentialGroup() .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel20Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel20Layout.createSequentialGroup() .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(textPathOutput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnPathOutput)) .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnExtractSales) .addComponent(btnExtractStock) .addComponent(btnExtractClient) .addComponent(btnExtractSo))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jDateChooserExtract1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnExtractAll) .addComponent(btnKirimByEmail)) .addComponent(jDateChooserExtract2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(24, 24, 24)) ); jPanel55.setBorder(javax.swing.BorderFactory.createTitledBorder("Others Setting")); checkModeDatabase.setText("MODE DB"); javax.swing.GroupLayout jPanel55Layout = new javax.swing.GroupLayout(jPanel55); jPanel55.setLayout(jPanel55Layout); jPanel55Layout.setHorizontalGroup( jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(checkModeDatabase) ); jPanel55Layout.setVerticalGroup( jPanel55Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel55Layout.createSequentialGroup() .addContainerGap() .addComponent(checkModeDatabase) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel58.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnPathInputReloadAll.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnPathInputReloadAll.setText("Reload All"); btnPathInputAuto.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/folder_add_16x16.png"))); // NOI18N btnPathInputAuto.setText("Auto Path"); btnPathInputClearAll.setFont(new java.awt.Font("Lucida Grande", 3, 10)); // NOI18N btnPathInputClearAll.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/erase_16x16.png"))); // NOI18N btnPathInputClearAll.setText("Clear All"); btnRetrieveInputAll.setFont(new java.awt.Font("Lucida Grande", 3, 10)); // NOI18N btnRetrieveInputAll.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync2_16x16.png"))); // NOI18N btnRetrieveInputAll.setText("Retrieve All"); btnRetrieveInputAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRetrieveInputAllActionPerformed(evt); } }); javax.swing.GroupLayout jPanel58Layout = new javax.swing.GroupLayout(jPanel58); jPanel58.setLayout(jPanel58Layout); jPanel58Layout.setHorizontalGroup( jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel58Layout.createSequentialGroup() .addGap(25, 25, 25) .addComponent(btnPathInputReloadAll, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnPathInputAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnPathInputClearAll) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRetrieveInputAll, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel58Layout.setVerticalGroup( jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel58Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel58Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnPathInputReloadAll) .addComponent(btnPathInputAuto) .addComponent(btnPathInputClearAll) .addComponent(btnRetrieveInputAll)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18); jPanel18.setLayout(jPanel18Layout); jPanel18Layout.setHorizontalGroup( jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel18Layout.createSequentialGroup() .addGap(23, 23, 23) .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel58, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel55, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel18Layout.setVerticalGroup( jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel18Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel55, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel58, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, 99, Short.MAX_VALUE) .addContainerGap()) ); jTabbedPane1.addTab("Retrieve And Extract BAYGON", jPanel18); jTabbedPane1.setSelectedIndex(10); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup() .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 880, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 17, Short.MAX_VALUE)) ); jPanel8Layout.setVerticalGroup( jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup() .addComponent(jTabbedPane1) .addContainerGap()) ); jTabbedPane2.addTab("Input Scylla", jPanel8); jPanel44.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnOutputSalesReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnOutputSalesReload.setText("Reload"); jLabelOutputSales.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelOutputSales.setText("jLabelOutputSales"); javax.swing.GroupLayout jPanel44Layout = new javax.swing.GroupLayout(jPanel44); jPanel44.setLayout(jPanel44Layout); jPanel44Layout.setHorizontalGroup( jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel44Layout.createSequentialGroup() .addContainerGap() .addComponent(btnOutputSalesReload, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelOutputSales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(26, 26, 26)) ); jPanel44Layout.setVerticalGroup( jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel44Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnOutputSalesReload) .addComponent(jLabelOutputSales)) .addContainerGap(18, Short.MAX_VALUE)) ); jPanel45.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableOutputSales.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane11.setViewportView(tableOutputSales); javax.swing.GroupLayout jPanel45Layout = new javax.swing.GroupLayout(jPanel45); jPanel45.setLayout(jPanel45Layout); jPanel45Layout.setHorizontalGroup( jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel45Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE) .addContainerGap()) ); jPanel45Layout.setVerticalGroup( jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel45Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel45, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel44, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel10Layout.setVerticalGroup( jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel45, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane3.addTab("Sales", jPanel10); jPanel46.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnOutputStockReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnOutputStockReload.setText("Reload"); jLabelOutputStock.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelOutputStock.setText("jLabelOutputStock"); javax.swing.GroupLayout jPanel46Layout = new javax.swing.GroupLayout(jPanel46); jPanel46.setLayout(jPanel46Layout); jPanel46Layout.setHorizontalGroup( jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel46Layout.createSequentialGroup() .addContainerGap() .addComponent(btnOutputStockReload, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelOutputStock, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(23, 23, 23)) ); jPanel46Layout.setVerticalGroup( jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel46Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnOutputStockReload) .addComponent(jLabelOutputStock)) .addContainerGap(18, Short.MAX_VALUE)) ); jPanel47.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableOutputStock.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane12.setViewportView(tableOutputStock); javax.swing.GroupLayout jPanel47Layout = new javax.swing.GroupLayout(jPanel47); jPanel47.setLayout(jPanel47Layout); jPanel47Layout.setHorizontalGroup( jPanel47Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel47Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE) .addContainerGap()) ); jPanel47Layout.setVerticalGroup( jPanel47Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel47Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel47, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel46, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel11Layout.setVerticalGroup( jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel47, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel46, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane3.addTab("Stock", jPanel11); jPanel48.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnOutputClientReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnOutputClientReload.setText("Reload"); jLabelOutputClient.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelOutputClient.setText("jLabelOutputClient"); javax.swing.GroupLayout jPanel48Layout = new javax.swing.GroupLayout(jPanel48); jPanel48.setLayout(jPanel48Layout); jPanel48Layout.setHorizontalGroup( jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel48Layout.createSequentialGroup() .addContainerGap() .addComponent(btnOutputClientReload, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelOutputClient, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(27, 27, 27)) ); jPanel48Layout.setVerticalGroup( jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel48Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelOutputClient) .addComponent(btnOutputClientReload)) .addContainerGap(18, Short.MAX_VALUE)) ); jPanel49.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableOutputClient.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane13.setViewportView(tableOutputClient); javax.swing.GroupLayout jPanel49Layout = new javax.swing.GroupLayout(jPanel49); jPanel49.setLayout(jPanel49Layout); jPanel49Layout.setHorizontalGroup( jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel49Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE) .addContainerGap()) ); jPanel49Layout.setVerticalGroup( jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel49Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane13, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12); jPanel12.setLayout(jPanel12Layout); jPanel12Layout.setHorizontalGroup( jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel12Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel49, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel48, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel12Layout.setVerticalGroup( jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel49, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel48, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane3.addTab("Client", jPanel12); jPanel50.setBorder(javax.swing.BorderFactory.createEtchedBorder()); btnOutputSalesOrderReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/dimas/bridging/images/sync_16x16.png"))); // NOI18N btnOutputSalesOrderReload.setText("Reload"); jLabelOutputSalesOrder.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabelOutputSalesOrder.setText("jLabelOutputSalesOrder"); javax.swing.GroupLayout jPanel50Layout = new javax.swing.GroupLayout(jPanel50); jPanel50.setLayout(jPanel50Layout); jPanel50Layout.setHorizontalGroup( jPanel50Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel50Layout.createSequentialGroup() .addContainerGap() .addComponent(btnOutputSalesOrderReload, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabelOutputSalesOrder, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(23, 23, 23)) ); jPanel50Layout.setVerticalGroup( jPanel50Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel50Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel50Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnOutputSalesOrderReload) .addComponent(jLabelOutputSalesOrder)) .addContainerGap(18, Short.MAX_VALUE)) ); jPanel51.setBorder(javax.swing.BorderFactory.createEtchedBorder()); tableOutputSalesOrder.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane14.setViewportView(tableOutputSalesOrder); javax.swing.GroupLayout jPanel51Layout = new javax.swing.GroupLayout(jPanel51); jPanel51.setLayout(jPanel51Layout); jPanel51Layout.setHorizontalGroup( jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel51Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE) .addContainerGap()) ); jPanel51Layout.setVerticalGroup( jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel51Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE) .addContainerGap()) ); javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13); jPanel13.setLayout(jPanel13Layout); jPanel13Layout.setHorizontalGroup( jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel13Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel51, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel50, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); jPanel13Layout.setVerticalGroup( jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel51, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel50, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jTabbedPane3.addTab("Sales Order", jPanel13); javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup( jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup() .addComponent(jTabbedPane3) .addContainerGap()) ); jPanel9Layout.setVerticalGroup( jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup() .addComponent(jTabbedPane3) .addContainerGap()) ); jTabbedPane2.addTab("Output BAYGON", jPanel9); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 1007, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 9, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTabbedPane2) ); jLayeredPane1.add(jPanel1); jPanel1.setBounds(10, 10, 1020, 620); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1036, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLayeredPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 637, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73208135", "0.7291972", "0.7291972", "0.7291972", "0.7287118", "0.72494483", "0.7214677", "0.72086734", "0.7197058", "0.71912485", "0.7185818", "0.71596724", "0.71489036", "0.7094215", "0.7082007", "0.70579666", "0.6988024", "0.6978225", "0.6955616", "0.6955434", "0.69458616", "0.69446844", "0.6937443", "0.69325924", "0.69280547", "0.69266534", "0.69264925", "0.6912501", "0.6911917", "0.6894212", "0.6893167", "0.68922186", "0.6892184", "0.6890009", "0.688444", "0.6883334", "0.68823224", "0.6879555", "0.68768615", "0.6875667", "0.68722147", "0.6860655", "0.68569547", "0.6856804", "0.6856167", "0.6855431", "0.6854634", "0.68536645", "0.68536645", "0.684493", "0.6837617", "0.68372554", "0.68303156", "0.6828861", "0.6827668", "0.68246883", "0.68245596", "0.6818436", "0.6818284", "0.6812057", "0.681017", "0.68095857", "0.68093693", "0.6809163", "0.68027467", "0.67963576", "0.6794979", "0.6793972", "0.6792247", "0.67903155", "0.67896885", "0.67893314", "0.6783135", "0.6767654", "0.67672074", "0.67655265", "0.6757984", "0.6757062", "0.6754005", "0.67513984", "0.674334", "0.6740801", "0.6737678", "0.6737453", "0.6734575", "0.67281", "0.6727845", "0.67219335", "0.67169774", "0.67163646", "0.6715783", "0.67106164", "0.6708574", "0.6705358", "0.67030907", "0.6701408", "0.6700769", "0.66998196", "0.6695165", "0.66917574", "0.6691252" ]
0.0
-1
Factory method that wraps a ComponentException with optional message.
public static ComponentURLException fromComponentException(String msg, ComponentException e) { if (e instanceof ComponentException.ComponentNotFoundException) { return msg != null ? new ComponentNotFoundURLException(msg, e) : new ComponentNotFoundURLException(e); } else { return msg != null ? new ComponentURLException(msg, e) : new ComponentURLException(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testConstructorWithMessageAndCause()\n {\n final RuntimeException cause = new RuntimeException();\n final LoaderException e = new LoaderException(\"Custom message\", cause);\n assertEquals(\"Custom message\", e.getMessage());\n assertEquals(cause, e.getCause());\n }", "@Test\n public void testConstructorWithMessage()\n {\n final LoaderException e = new LoaderException(\"Custom message\");\n assertEquals(\"Custom message\", e.getMessage());\n }", "public abstract RuntimeException getException(String message);", "Constructor<? extends RefException> getExceptionConstructor(\n String qualifiedExceptionName,\n String qualifiedPackageName\n );", "public JiraServiceException(String message) {\r\n super(message);\r\n }", "public OperationFailedException(String message, Exception causeOfException){\n super(message, causeOfException);\n }", "public MyException(String message)\n { super(message); }", "public CommunicationException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public TechnicalException(String message) {\r\n super(message);\r\n }", "MyException(String str)\n {\n //parametrize constructor\n super(str);\n }", "public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }", "public ClustererFactoryException(String msg, String classname) {\n super(msg, classname);\n }", "public MyCustomException( String message )\n {\n\n\t// Why are we doing this??\n super( message );\n }", "public TechnicalException(final String message) {\n super(message);\n }", "public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }", "public AlfrescoServiceException(final String message) {\n super(message);\n }", "public void testConstructorWithMessage() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", null, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", null, exception.getProblemRejectReason());\r\n }", "public FormatException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public JavaException(@Nullable String message)\r\n\t{\r\n\t\tsuper(message);\r\n\t}", "public JDBFException (String message){\r\n super(Messages.message(message));\r\n }", "public NotValidException(String message) {\r\n super(message);\r\n }", "public SMSLibException(String errorMessage)\n/* 10: */ {\n/* 11:34 */ super(errorMessage);\n\n/* 12: */ }", "public OLMSException(String message) {\r\n super(message);\r\n }", "public TechnicalException() {\r\n }", "public SMSLibException(String errorMessage, Throwable originalE)\n/* 22: */ {\n/* 23:50 */ super(errorMessage);\n/* 24:51 */ this.originalE = originalE;\n/* 25: */ }", "private SmartServiceException createException(Throwable t, String key, Object... args) {\n return new SmartServiceException.Builder(getClass(), t).userMessage(key, args).build();\n }", "public ClientException(String message) {\n this.message = message;\n }", "public SearchServiceException(String message)\n\t{\n\t\tsuper(message);\n\t}", "public CassetteException(String message) {\r\n super(message);\r\n }", "public ClustererFactoryException(String msg) {\n super(msg);\n mClassname = this.DEFAULT_NAME;\n }", "public ConverterException(String message) {\n super(message);\n this.cause = null;\n }", "public CustomException(String message, Throwable cause) {\n super(message, cause);\n }", "public FullCarException(String message) {\r\n super(message);\r\n }", "public BaseException(String message) {\n super(message);\n setErrorCode();\n }", "protected abstract String defaultExceptionMessage(TransactionCommand transactionCommand);", "public SMSLibException() {}", "public CalculadoraException(String msg) {\r\n super(msg);\r\n }", "OOPExpectedException expectMessage(String msg);", "public BusinessObjectException(Exception e) {\r\n super( \"\" + e );\r\n }", "WireframeException(String message){\r\n super(message);\r\n }", "public SysException(String message) {\r\n super(message);\r\n\r\n }", "public NotFoundStrategyException(String message){\r\n\t\tsuper(message);\r\n\t}", "public Exception(String message) {\n\t\t\tsuper(message);\n\t\t}", "protected CustomException getException(int code, String message, Object... objects) {\n return new CustomException(code, String.format(message, objects));\n }", "public void testConstructorWithMessageAndCause() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message, cause);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", cause, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", null, exception.getProblemRejectReason());\r\n }", "public EmailException(String msg)\n {\n super(msg);\n }", "public CommunicationException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}", "public OperationException(String message) {\n super(message);\n }", "public AditoGitException(String pMessage, Exception pE)\n {\n super(pMessage, pE);\n }", "public EmployeeNotFoundException(String message) {\n super(message);\n }", "@SuppressWarnings(\"unused\")\n protected static HttpResponseImpl createError(final String message) {\n return createError(message, null);\n }", "public TechnicalException(String message, Throwable cause) {\r\n super(message, cause);\r\n }", "public IllegalArgumentException buildException() {\n return this.buildException(null);\n }", "public MyCustomException( String message, Throwable cause )\n {\n\n\t// Why are we doing this??\n super( message, cause );\n }", "protected abstract String getMessage();", "public MyException(String message) {\r\n\t\tsuper(message);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "protected abstract String insufficientParameterExceptionMessage(TransactionCommand transactionCommand);", "public SenhaInvalidaException(String message) {\n\t\tsuper(message);\n\t}", "public OperationException(String message, Throwable cause) {\n super(message, cause);\n }", "public TechnicalException(final String message, final Throwable cause) {\n super(message, cause);\n }", "public interface UserExceptionMessage {\n String getMessage();\n}", "public JiraServiceException(String message, Throwable cause) {\r\n super(message, cause);\r\n }", "public InvalidArtifactException(final String msg) {\r\n super(msg);\r\n }", "public WeldExceptionStringMessage(String message) {\n // This will not be further localized\n this.message = message;\n }", "public CIMException() {\n\t\tthis((String) null, (Object[]) null);\n\t}", "public APIException(String message) {\n\t\tsuper(message, null);\n\t}", "public AditoGitException(String pMessage)\n {\n super(pMessage);\n }", "public ServiceException(String message, Throwable cause){\n super(message, cause);\n }", "public OfferingException(String msg) {\n super(msg);\n }", "public JDBFException (String message, Object [] args){\r\n super(Messages.format(message, args));\r\n }", "com.palantir.paxos.persistence.generated.PaxosPersistence.ExceptionProto getException();", "public CompilationException(String message) {\n\t\tsuper(message);\n\t}", "public DslException(String message) {\n\t\tsuper(message);\n\t}", "public DslException(String message, Exception e) {\n\t\tsuper(message, e);\n\t}", "public ActiveXException(String message) {\n super(message);\n }", "public InstrumenterException(String message) {\r\n super(message);\r\n }", "public FullCarException() {\r\n super(\"\");\r\n }", "static GitletException error(String msgFormat, Object... arguments) {\n return new GitletException(String.format(msgFormat, arguments));\n }", "public AlfrescoServiceException(final String message, final Throwable cause) {\n super(message, cause);\n }", "public CRLException(String message) {\n super(message);\n }", "public CompilerMessage(MessageKind messageKind_, Exception exception_) {\r\n this((SourceRange)null, messageKind_, exception_); \r\n }", "public NoTraceOntimizeJEEException() {\r\n this((String) null);\r\n }", "public CommunicationException() {\r\n\t\tsuper();\r\n\t}", "public void testConstructorWithMessageAndCauseAndRejectReason() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message, cause, reason);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", cause, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", reason, exception.getProblemRejectReason());\r\n }", "public BaseHandlerException translateFromServiceException(final Exception serviceException,\n final SsmRequest request,\n final ResourceModel desiredResourceModel) {\n if (serviceException instanceof AlreadyExistsException) {\n\n return new CfnAlreadyExistsException(ResourceModel.TYPE_NAME,\n desiredResourceModel.getWindowTaskId(),\n serviceException);\n } else if (serviceException instanceof ResourceLimitExceededException) {\n\n return new CfnServiceLimitExceededException(ResourceModel.TYPE_NAME,\n serviceException.getMessage(),\n serviceException);\n } else if (serviceException instanceof DoesNotExistException) {\n\n return new CfnNotFoundException(ResourceModel.TYPE_NAME,\n desiredResourceModel.getWindowTaskId(),\n serviceException);\n } else if (serviceException instanceof InternalServerErrorException) {\n\n return new CfnServiceInternalErrorException(\n getClassNameWithoutRequestSuffix(request.getClass().getSimpleName()),\n serviceException);\n } else if (serviceException instanceof FeatureNotAvailableException\n || serviceException instanceof TargetInUseException\n || serviceException instanceof IdempotentParameterMismatchException) {\n\n return new CfnInvalidRequestException(serviceException.getMessage(), serviceException);\n } else {\n // in case of unknown/unexpected service exceptions, use a generic exception with the name of the failed operation\n return new CfnGeneralServiceException(getClassNameWithoutRequestSuffix(request.getClass().getSimpleName()),\n serviceException);\n }\n }", "public ElFicheroNoExisteException(String msg) {\n super(msg);\n }", "public SMSLibException(Throwable originalE)\n/* 17: */ {\n/* 18:45 */ this.originalE = originalE;\n/* 19: */ }", "public DataAccessorServiceException(String msg) {\n super(msg);\n }", "public AssertionFailedException(Exception ex) {\n/* 63 */ super(Messages.getString(\"AssertionFailedException.0\") + ex.toString() + Messages.getString(\"AssertionFailedException.1\"));\n/* */ }", "public ParameterException(String message) {\n\t\tsuper(message);\n\t}", "public WriteException(String message)\n {\n super(message);\n }", "public CustomException(Throwable cause) {\n super(cause == null ? null : cause.toString(), cause);\n }", "public ValidationException(String msg) {\n\t\tsuper(msg);\n\t}", "public DataDiFineTirocinioNonValidaException(String messaggio) {\r\n super(messaggio);\r\n }", "public InvalidCredentialsException(String message, Throwable cause) {\n/* 64 */ super(message, cause);\n/* */ }", "public ItemInvalidoException(String msg) {\r\n super(msg);\r\n }", "@ParametersAreNonnullByDefault\n\tpublic ApplicationException(String message) {\n\t\tsuper(message);\n\t}", "public MessageParseException() {\n }", "public JDBFException (String message, Object type){\r\n super(Messages.format(message, type));\r\n }", "public LoginException(String exceptionMessage) {\n super(exceptionMessage);\n\t}" ]
[ "0.6255529", "0.61999094", "0.61920905", "0.61260444", "0.5873903", "0.5870234", "0.5850322", "0.5841431", "0.5812691", "0.58101094", "0.5802825", "0.5781088", "0.5777612", "0.57632226", "0.57610375", "0.5715854", "0.5702472", "0.56811756", "0.56806", "0.5671522", "0.56601036", "0.562651", "0.5622222", "0.56156564", "0.560124", "0.55940485", "0.55938494", "0.5589827", "0.5578672", "0.5574509", "0.5568298", "0.55668116", "0.55645627", "0.5561719", "0.55604494", "0.55339867", "0.5529702", "0.55246687", "0.55236375", "0.5520314", "0.55113626", "0.5491268", "0.548617", "0.54814965", "0.54546493", "0.54533756", "0.54503596", "0.5428021", "0.54236907", "0.5419612", "0.54120976", "0.5410494", "0.5408407", "0.5407096", "0.54015076", "0.53979075", "0.5396056", "0.53839827", "0.5382362", "0.5379742", "0.5379406", "0.5374313", "0.5364356", "0.5360134", "0.53593796", "0.53571445", "0.53425443", "0.53409016", "0.5327253", "0.5317563", "0.53157", "0.5314019", "0.5308264", "0.5300989", "0.5290498", "0.52887195", "0.5288196", "0.5287405", "0.5282689", "0.52780277", "0.5276903", "0.527277", "0.52678907", "0.52659726", "0.5264351", "0.5254137", "0.52515763", "0.5251105", "0.52462125", "0.5242367", "0.5241276", "0.5240338", "0.5235708", "0.52303845", "0.522629", "0.52252567", "0.5225117", "0.5219439", "0.5217476", "0.5217433" ]
0.57693535
13
Returns a cause of this ComponentURLException DEV NOTE: this returns the local cause member, NOT the Throwable one.
public Throwable getCause() { return cause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Throwable getCause() {\n return cause;\n }", "public final Throwable getCause() {\n return cause;\n }", "public Throwable getCause()\r\n {\r\n return m_cause;\r\n }", "public Throwable getCause() {\n\t\treturn (iCause == this) ? null : iCause;\n\t}", "public Throwable getCause(){\n\t\treturn status.getException();\n\t}", "public Throwable getCause() {\n return getException();\n }", "public String getCause() {\n return cause;\n }", "public Throwable getCause()\n\t{\n\t\treturn m_Cause;\n\t}", "@Override\n public Exception getCause()\n {\n return this.cause;\n }", "public Throwable getCause () {\n\t\treturn ex;\n\t}", "@Override\n\tpublic synchronized Throwable getCause() {\n\t\treturn super.getCause();\n\t}", "@Override\n\t\tpublic Throwable getCause() {\n\t\t\treturn super.getCause();\n\t\t}", "public Throwable getCause() {\n/* 85 */ return this.runtimeException;\n/* */ }", "public Throwable cause()\r\n/* 88: */ {\r\n/* 89:124 */ Object result = this.result;\r\n/* 90:125 */ if ((result instanceof CauseHolder)) {\r\n/* 91:126 */ return ((CauseHolder)result).cause;\r\n/* 92: */ }\r\n/* 93:128 */ return null;\r\n/* 94: */ }", "public Throwable getCause() {\n return nested;\n }", "@Override\n public Throwable getCause() {\n return ex;\n }", "String getCauseException();", "public Event getCause(){\n return cause;\n }", "public Throwable getCause()\r\n/* 17: */ {\r\n/* 18:18 */ return this.a.b();\r\n/* 19: */ }", "Throwable cause();", "public String getCauseName() {\n\t\treturn causeName;\n\t}", "com.google.cloud.networkmanagement.v1.AbortInfo.Cause getCause();", "public Cause getParent() {\n\t\tif (this.equals(this.rcaCase.problem)) {\n\t\t\treturn null;\n\t\t} else if (this.effectRelations.size() > 0) {\n\t\t\treturn ((Relation) this.effectRelations.toArray()[0]).causeTo;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public void setCause(Throwable cause) {\n this.cause = cause;\n }", "public gov.ucore.ucore._2_0.CauseOfRelationshipType getCauseOf()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.CauseOfRelationshipType target = null;\n target = (gov.ucore.ucore._2_0.CauseOfRelationshipType)get_store().find_element_user(CAUSEOF$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public void setCause(String cause) {\r\n\t\tthis.cause = cause;\r\n\t}", "public void setCause(String cause) {\n this.cause = cause;\n }", "public Throwable getRootCause() {\r\n\t\tThrowable e = getCause();\r\n\t\tThrowable eParent;\r\n\t\tfor (eParent = this; e != null && e != eParent; e = e.getCause()) {\r\n\t\t\teParent = e;\r\n\t\t}\r\n\t\treturn eParent;\r\n\t}", "public String toString() {\n return (\"AgentException occurred with cause: \" + cause);\n }", "public static <T> T getCause(Throwable t, Class<T> causeType) {\n T result = null;\n if (t.getClass() == causeType) {\n result = (T) t;\n } else if (t.getCause() != null) {\n result = getCause(t.getCause(), causeType);\n }\n return result;\n }", "public String getMessage() {\n\t\tif (iCause == null) { return super.getMessage(); }\n\t\treturn super.getMessage() + \"; nested exception is: \\n\\t\" + iCause.toString();\n\t}", "@SchemaElement(\n name = \"cause\",\n title = \"Cause\"\n )\n public CharSequence getCause() {\n return cause;\n }", "public AgentException(String cause) {\n this.cause = cause;\n }", "public Throwable getOriginalException()\n/* 28: */ {\n/* 29:56 */ return this.originalE;\n/* 30: */ }", "@Override\n public Throwable getRollbackCause()\n throws Exception {\n if (_runtime == null)\n getTransactionManager();\n\n if (_runtime != null)\n return _runtime.getRollbackCause();\n\n return null;\n }", "public final Cause<?> getParent() {\n return parent;\n }", "public <T extends Throwable> T findCause(Class<T> c) {\n T result = null;\n Throwable cause = this;\n for (; cause != null && cause.getClass() != c; cause = cause.getCause())\n ;\n if (cause != null)\n result = (T) cause;\n return result;\n }", "public ExcelImportException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "public static Throwable getDeepestCause(Throwable e) {\n\t\tThrowable cause = e;\n\t\tThrowable parent = e.getCause();\n\t\twhile (parent!=null && parent!=e) {\n\t\t\tcause = parent;\n\t\t\tparent = cause.getCause();\n\t\t}\n\t\treturn cause;\n\t}", "public IEvent getCauseEvent();", "private CauseHolder(Throwable cause)\r\n/* 730: */ {\r\n/* 731:798 */ this.cause = cause;\r\n/* 732: */ }", "public IOExceptionWithCause(Throwable cause) {\n/* 63 */ super(cause);\n/* */ }", "@Override\n public StackTraceElement[] getStackTrace() {\n return getCause() == null ? super.getStackTrace() : getCause().getStackTrace();\n }", "public Exception(Throwable cause) {\n\t\t\tsuper(cause);\n\t\t}", "@Override\n\t\tpublic Throwable getRootCause(Throwable throwable) {\n\t\t\tAssert.notNull(throwable, \"Throwable must not be null\");\n\t\t\twhile (EXCEPTIONS_TO_UNWRAP.contains(throwable.getClass())) {\n\t\t\t\tthrowable = throwable.getCause();\n\t\t\t}\n\t\t\treturn super.getRootCause(throwable);\n\t\t}", "public NetworkException(final Throwable cause) {\n\t\tsuper(cause);\n\t}", "public boolean hasCause() {\n return cause != null;\n }", "protected String getCause(Exception e) throws RuntimeException {\n\t\tString className = \"\";\n\t\tObject theClass = null;\n\t\tString errorCode;\n\t\tString msg = \"error.general.sistema\";\n\n\t\t// Establecemos la Excepcion que se ha producido\n\t\tif (e.getCause() != null) {\n\t\t\tclassName = e.getCause().getClass().getName();\n\t\t\ttheClass = e.getCause();\n\t\t\tif (className.equals(\"java.rmi.RemoteException\")) {\n\t\t\t\tif (e.getCause().getCause() != null) {\n\t\t\t\t\tclassName = e.getCause().getCause().getClass().getName();\n\t\t\t\t\ttheClass = e.getCause().getCause();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (theClass instanceof JDBCException) {\n\t\t\tif (((org.hibernate.JDBCException) theClass).getSQLException()\n\t\t\t\t\t.getNextException() != null) {\n\t\t\t\terrorCode = ((org.hibernate.JDBCException) theClass)\n\t\t\t\t\t\t.getSQLException().getNextException().getSQLState();\n\t\t\t} else {\n\t\t\t\terrorCode = ((org.hibernate.JDBCException) theClass)\n\t\t\t\t\t\t.getSQLException().getSQLState();\n\t\t\t}\n\t\t} else {\n\t\t\terrorCode = \"\";\n\t\t}\n\n\t\t// Obtenemos el codigo de error\n\n\t\t// Establecemos el mensaje de error en funcion la Excepcion que hemos\n\t\t// propagado\n\t\tif (!className.equals(\"\")) {\n\t\t\tif (className.equals(\"org.hibernate.StaleObjectStateException\")) {\n\t\t\t\tmsg = \"error.message.modify\";\n\t\t\t} else if (className.equals(\"org.hibernate.ObjectDeletedException\")) {\n\t\t\t\tmsg = \"error.message.delete\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.ObjectNotFoundException\")) {\n\t\t\t\tmsg = \"error.message.notFound\";\n\t\t\t} else if (className.equals(\"org.hibernate.QueryException\")) {\n\t\t\t\tmsg = \"error.message.query\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.NonUniqueObjectException\")) {\n\t\t\t\tmsg = \"error.message.nonUniqueObject\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.NonUniqueResultException\")) {\n\t\t\t\tmsg = \"error.message.nonUniqueResult\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.PropertyNotFoundException\")) {\n\t\t\t\tmsg = \"error.message.propertyNotFound\";\n\t\t\t} else if (className.equals(\"org.hibernate.PropertyValueException\")) {\n\t\t\t\tmsg = \"error.message.propertyValue\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.QueryParameterException\")) {\n\t\t\t\tmsg = \"error.message.queryParameter\";\n\t\t\t} else if (className.equals(\"org.hibernate.WrongClassException\")) {\n\t\t\t\tmsg = \"error.message.wrongClass\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.LazyInitializationException\")) {\n\t\t\t\tmsg = \"error.message.lazyInitialization\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.exception.ConstraintViolationException\")) {\n\t\t\t\tif (errorCode.equalsIgnoreCase(UNIQUE_VIOLATION_CODE)) {\n\t\t\t\t\tmsg = \"error.message.constraintViolationUnique\";\n\t\t\t\t} else if (errorCode.equalsIgnoreCase(DELETE_VIOLATION_CODE)) {\n\t\t\t\t\tmsg = \"error.message.constraintViolationDelete\";\n\t\t\t\t}\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.exception.JDBCConnectionException\")) {\n\t\t\t\tmsg = \"error.message.JDBCConection\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.exception.SQLGrammarException\")) {\n\t\t\t\tmsg = \"error.message.SQLGrammar\";\n\t\t\t} else if (className\n\t\t\t\t\t.equals(\"org.hibernate.hql.ast.QuerySyntaxException\")) {\n\t\t\t\tmsg = \"error.message.malformedQuery\";\n\t\t\t} else if (className.equals(\"java.sql.BatchUpdateException\")) {\n\t\t\t\tmsg = \"error.message.metodoTransaccional\";\n\t\t\t} else {\n\t\t\t\tmsg = \"error.general.sistema\";\n\t\t\t}\n\t\t} else {\n\t\t\tmsg = \"error.general.sistema\";\n\t\t}\n\t\treturn msg;\n\t}", "public final Cause<?> getFirstCause() {\n return firstCause;\n }", "public SucheException(Throwable cause) {\n super(cause);\n // TODO Auto-generated constructor stub\n }", "public static Throwable getRootCause(Throwable ex) {\n return ExceptionUtils.getRootCause(ex);\n }", "@Override\n\t\tpublic Throwable getThrowable() {\n\t\t\treturn null;\n\t\t}", "public TrafficspacesAPIException(Throwable cause, String reason) {\n super(reason);\n rootCause = cause;\n }", "public Throwable getReason() { return err; }", "public Throwable getException() {\n\t\treturn adaptee.getException();\n\t}", "public void testGetCause() {\n Throwable th = new Throwable();\n Throwable th1 = new Throwable();\n assertNull(\"cause should be null\", th.getCause());\n th = new Throwable(th1);\n assertSame(\"incorrect cause\", th1, th.getCause());\n }", "public OLMSException(Throwable cause) {\r\n super(cause);\r\n }", "public JiraServiceException(Throwable cause) {\r\n super(cause);\r\n }", "public Throwable getException() {\n return ex;\n }", "public NEOLoggerException(Throwable cause)\n {\n super(cause);\n }", "public CommunicationException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\r\n\t}", "public CsvException(Throwable cause)\r\n {\r\n super(cause);\r\n }", "public Cause[] getParents() {\n\t\tif (this.equals(this.rcaCase.problem)) {\n\t\t\treturn null;\n\t\t} else if (this.effectRelations.size() > 0) {\n\t\t\tCause[] causes = new Cause[this.effectRelations.size()];\n\t\t\tfor (int i = 0; i < this.effectRelations.size(); i++) {\n\t\t\t\tcauses[i] = ((Relation) this.effectRelations.toArray()[i]).causeTo;\n\t\t\t}\n\t\t\t//return ((Relation) this.effectRelations.toArray()[0]).causeTo;\n\t\t\treturn causes;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public ExcelImportException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}", "public AlfrescoServiceException(final Throwable cause) {\n super(cause);\n }", "public UnresolvedAddressException getException()\n\t{\n\t\treturn exception;\n\t}", "public PropertyNotDefinedException(Throwable cause) {\n super(cause);\n }", "public RenderingException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "@Nullable\n\tpublic Throwable getException() {\n\t\treturn exception;\n\t}", "public SucheException(String message, Throwable cause) {\n super(message, cause);\n // TODO Auto-generated constructor stub\n }", "@Override\r\n public ExceptionHandler<Container> getParent() {\n return null;\r\n }", "@Override\n\tpublic synchronized Throwable initCause(Throwable arg0) {\n\t\treturn super.initCause(arg0);\n\t}", "public Optional<Cause> getParent() {\n return this.parent;\n }", "public XMLParseException(Throwable cause) { super(defaultMessage,cause); }", "public CacheException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "public WorkflowException(Exception cause) {\n super(cause);\n }", "public CommentFailedWithoutBindPhone(Throwable cause) {\n super(cause);\n }", "public TechnicalException(Throwable cause) {\r\n super(cause);\r\n }", "public MessageParseException(Throwable cause) {\n initCause(cause);\n }", "int getCauseValue();", "public OperationException(Throwable cause) {\n super(cause);\n }", "public CustomException(Throwable cause) {\n super(cause == null ? null : cause.toString(), cause);\n }", "public String getStackTraceString() {\r\n\t\t// if there's no nested exception, there's no stackTrace\r\n\t\tif (nestedException_ == null)\r\n\t\t\treturn null;\r\n\r\n\t\tStringBuffer traceBuffer = new StringBuffer();\r\n\r\n\t\tif (nestedException_ instanceof WebAppException) {\r\n\r\n\t\t\ttraceBuffer.append(((WebAppException) nestedException_)\r\n\t\t\t\t\t.getStackTraceString());\r\n\t\t\ttraceBuffer.append(\"-------- nested by:\\n\");\r\n\t\t}\r\n\r\n\t\ttraceBuffer.append(stackTraceString_);\r\n\t\treturn traceBuffer.toString();\r\n\t}", "public TDLProException(Throwable cause)\n {\n super(cause);\n }", "public KineticException(Throwable cause) {\n\t\tsuper(cause);\n\t}", "public boolean isCausedByNetworkIssue() {\n return getCause() instanceof java.io.IOException;\n }", "public CanyonException( Throwable t )\r\n {\r\n super( t.getMessage() );\r\n m_cause = t;\r\n }", "public exceptiona(Throwable cause)\n {\n String Message = \" not in number system\";\n }", "public String errorSource() {\n return this.errorSource;\n }", "private static String getCause(int statusCode) {\r\n\t\tString cause = null;\r\n\t\tswitch (statusCode) {\r\n\t\tcase NOT_MODIFIED:\r\n\t\t\tbreak;\r\n\t\tcase BAD_REQUEST:\r\n\t\t\tcause = \"The request was invalid. An accompanying error message will explain why.\";\r\n\t\t\tbreak;\r\n\t\tcase NOT_AUTHORIZED:\r\n\t\t\tcause = \"Authentication incorrect, the session is expired.\";\r\n\t\t\tbreak;\r\n\t\tcase FORBIDDEN:\r\n\t\t\tcause = \"The request is understood, but it has been refused. An accompanying error message will explain why.\";\r\n\t\t\tbreak;\r\n\t\tcase NOT_FOUND:\r\n\t\t\tcause = \"The URI requested is invalid or the resource requested does not exists.\";\r\n\t\t\tbreak;\r\n\t\tcase NOT_ACCEPTABLE:\r\n\t\t\tcause = \"Returned an invalid format is specified in the request.\";\r\n\t\t\tbreak;\r\n\t\tcase INTERNAL_SERVER_ERROR:\r\n\t\t\tcause = \"Something is broken. Please contact the service ISP.\";\r\n\t\t\tbreak;\r\n\t\tcase BAD_GATEWAY:\r\n\t\t\tcause = \"The server is down or being upgraded.\";\r\n\t\t\tbreak;\r\n\t\tcase SERVICE_UNAVAILABLE:\r\n\t\t\tcause = \"Service Unavailable: The servers are up, but overloaded with requests. Try again later.\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tcause = \"\";\r\n\t\t}\r\n\t\treturn statusCode + \":\" + cause;\r\n\t}", "public OCCIClientException( String message, Throwable cause )\r\n {\r\n super( message, cause );\r\n }", "public NoTraceOntimizeJEEException(Throwable cause) {\r\n this(cause.getMessage(), cause, NoTraceOntimizeJEEException.getMessageParams(cause),\r\n NoTraceOntimizeJEEException.getMessageType(cause),\r\n NoTraceOntimizeJEEException.isBlocking(cause), NoTraceOntimizeJEEException.isSilent(cause));\r\n }", "public void setCauseName(String causeName) {\n\t\tthis.causeName = causeName;\n\t}", "Throwable getCloseException();", "public void nullifyCause() {\n this.cause = null;\n }", "public void setCause(String cause) {\n infoElements.put(new Integer(InfoElement.CAUSE), cause.getBytes());\n }", "public JavaException(@Nullable Throwable cause)\r\n\t{\r\n\t\tsuper(cause);\r\n\t}", "public static String getStackTrace() {\n Exception e = new Exception();\n return getStackTrace(e);\n }" ]
[ "0.7821037", "0.78075993", "0.7507776", "0.7476608", "0.7464526", "0.7442188", "0.74218166", "0.74053496", "0.7194763", "0.7128003", "0.709213", "0.69991314", "0.6957364", "0.6923605", "0.6895267", "0.6714624", "0.6606931", "0.65888613", "0.6543635", "0.65305316", "0.6527775", "0.60026014", "0.5950988", "0.58956766", "0.5887187", "0.58246034", "0.5815785", "0.5808614", "0.5776497", "0.5672835", "0.5660249", "0.5605194", "0.5589985", "0.54996645", "0.54863435", "0.54489046", "0.5447026", "0.5411842", "0.53686744", "0.53593105", "0.5357498", "0.53384715", "0.53037536", "0.52920306", "0.52699804", "0.5246331", "0.5182633", "0.5168874", "0.5163857", "0.51544553", "0.51522744", "0.5136415", "0.5127652", "0.51110506", "0.5102846", "0.51022625", "0.5075122", "0.5044774", "0.5037842", "0.5028806", "0.5026427", "0.50022525", "0.49684063", "0.49201384", "0.49050513", "0.4893974", "0.48795617", "0.48783362", "0.4869659", "0.4863198", "0.4862309", "0.48611474", "0.48610276", "0.48578247", "0.4853706", "0.4849081", "0.48444965", "0.484", "0.4834124", "0.48283452", "0.48193598", "0.48148012", "0.48019937", "0.4800002", "0.47942153", "0.47899142", "0.478869", "0.47869113", "0.47844693", "0.47841665", "0.47792378", "0.47651488", "0.47636163", "0.4758441", "0.47568345", "0.47528774", "0.47495532", "0.4746515" ]
0.7853424
2
private EmployeeList employee_List; //adicionar a lista de empregados ou verificar conexao BD private String departments; // sera uma lista de ambientes especificos FUNCTIONS GET AND SET
public Address getAddress() { return address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<EmployeeDetails> getEmployeeDetails();", "public List<Employee> getEmployees();", "public List<Employees>getEMPMenaning() {\n\tString sql = \"SELECT Id_employees, Name_and_surname, Password, Work_role FROM employees \";\n\t\n\tList<Employees>list = new ArrayList<Employees>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\n\t\twhile(resultSet.next()) {\n\t\t\tEmployees getEMPMenaning = new Employees();\n\t\t\tgetEMPMenaning.setIdEmployees(resultSet.getInt(\"Id_employees\"));\n\t\t getEMPMenaning.setNameAndSurname(resultSet.getString(\"Name_and_surname\"));\n\t\t getEMPMenaning.setPassword(resultSet.getString(\"Password\"));\n\t\t getEMPMenaning.setWorkRole(resultSet.getInt(\"Work_role\"));\n\t\t \n\t\t\tlist.add(getEMPMenaning);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\treturn list;\n\n\n\t\n}", "List<Employee> allEmpInfo();", "public String getEmployees(){\n return employees;\n }", "public List<Departmentdetails> getDepartmentDetails();", "public void setEmployees(ArrayList<Employee> employees) { \r\n this.employees = employees;\r\n }", "@WebMethod\n public List<Employee> getEmployeesInSpecificDepartment(@WebParam(name = \"arg0\") int dep_id) {\n Connection conn = null;\n List<Employee> emplyeeList = new ArrayList<Employee>();\n try {\n conn = EmpDBUtil.getConnection();\n PreparedStatement pStmt = conn.prepareStatement(\"select * from EMPLOYEES where DEPARTMENT_ID = ?\");\n pStmt.setInt(1, dep_id);\n ResultSet rSet = pStmt.executeQuery();\n while (rSet.next()) {\n Employee emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n\n emplyeeList.add(emp);\n \n }\n \n System.out.println(\"done\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emplyeeList;\n }", "@Override\n\tpublic ArrayList<Employee> getEmpList() throws HrExceptions {\n\t\tSystem.out.println(\"In getEmpList() of Dao\");\n\t\treturn null;\n\t}", "@Override\n\t/**\n\t * Lista los empleados de un departamento dada su id y lo guardamos en department.\n\t */\n\tpublic List<Employees> listadoPorDepartamento(Object department) {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_EMPLEADOS_X_DEPARTAMENTOS\n\t\t\t\t\t\t+ department)).addEntity(Employees.class).list();\n\n\t\treturn ls;\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "public Employee(){\n this.employeeName = new String();\n this.employeeSalary = null;\n this.employeeProjectList = new ArrayList<String>();\n this.employeeDepartmentLead = new String();\n }", "@Override\n\tpublic List<Empdetails> getemplist() {\n\t\treturn empDAO.getemplist();\n\t}", "@Override\n\tpublic com.ssaga.human.service.List<EmployeeDto> empList() {\n\t\treturn null;\n\t}", "@Override\n @Transactional\n public List<Employee> getlistEmployee() {\n \tList<Employee> employees = entityManager.createQuery(\"SELECT e FROM Employee e\", Employee.class).getResultList();\n \tfor(Employee p : employees)\n \t\tLOGGER.info(\"employee list::\" + p);\n \treturn employees;\n }", "public static Map<Integer,Employee1> getEmployeeList(){\r\n\t return employees;\r\n\t \r\n }", "void assign (int departmentId, AssignEmployeeRequest empList);", "public List<EmployeeDto> retrieveEmployees();", "public interface EmpDao {\n\n /**\n * 列出员工信息及部门信息\n * @return\n */\n List<Emp> listEmpsAndDept();\n\n /**\n * 根据部门名称查询员工信息(存储过程调用)\n * @param paramMap\n */\n void execProListEmpsByDeptName(Map paramMap);\n\n /**\n * 部门删除\n * @param deptNo\n * @return\n */\n int deleteById(int deptNo);\n}", "private void listarDepartamentos() {\r\n\t\tdepartamentos = departamentoEJB.listarDepartamentos();\r\n\t}", "public interface DataBasePresent {\n void setDistrict(List<Name_Id> list);\n\n void setLocalBodyType(List<Name_Id> list);\n\n void setLocalBodyName(List<LocalBody> list);\n\n List<Name_Id> getDistrict();\n\n List<Name_Id> getLocalBodyType();\n\n List<LocalBody> getLocalBodyName(String districId ,String locatType);\n}", "public void setDepartments(ArrayList value);", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "public ArrayList<Empleado> getListaEmpleados(){\n return listaEmpleados;\n }", "public java.util.List<andrewNamespace.xsdconfig.EmployeeDocument.Employee> getEmployeeList()\r\n {\r\n final class EmployeeList extends java.util.AbstractList<andrewNamespace.xsdconfig.EmployeeDocument.Employee>\r\n {\r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee get(int i)\r\n { return ColleaguesImpl.this.getEmployeeArray(i); }\r\n \r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee set(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee o)\r\n {\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee old = ColleaguesImpl.this.getEmployeeArray(i);\r\n ColleaguesImpl.this.setEmployeeArray(i, o);\r\n return old;\r\n }\r\n \r\n @Override\r\n public void add(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee o)\r\n { ColleaguesImpl.this.insertNewEmployee(i).set(o); }\r\n \r\n @Override\r\n public andrewNamespace.xsdconfig.EmployeeDocument.Employee remove(int i)\r\n {\r\n andrewNamespace.xsdconfig.EmployeeDocument.Employee old = ColleaguesImpl.this.getEmployeeArray(i);\r\n ColleaguesImpl.this.removeEmployee(i);\r\n return old;\r\n }\r\n \r\n @Override\r\n public int size()\r\n { return ColleaguesImpl.this.sizeOfEmployeeArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new EmployeeList();\r\n }\r\n }", "public ArrayList<Department> getAllDep(String yuanxi)\r\n/* 16: */ {\r\n/* 17: 17 */ String sql = \"select * from t_department where yuanxi= '\" + yuanxi + \"'\";\r\n/* 18: 18 */ ArrayList<Department> al = new ArrayList();\r\n/* 19: 19 */ Department d = null;\r\n/* 20: */ try\r\n/* 21: */ {\r\n/* 22: 21 */ this.ct = new ConnDb().getConn();\r\n/* 23: 22 */ this.ps = this.ct.prepareStatement(sql);\r\n/* 24: 23 */ this.rs = this.ps.executeQuery();\r\n/* 25: 24 */ while (this.rs.next())\r\n/* 26: */ {\r\n/* 27: 25 */ d = new Department(this.rs.getInt(1), this.rs.getString(2));\r\n/* 28: 26 */ al.add(d);\r\n/* 29: */ }\r\n/* 30: 28 */ return al;\r\n/* 31: */ }\r\n/* 32: */ catch (Exception e)\r\n/* 33: */ {\r\n/* 34: 31 */ e.printStackTrace();\r\n/* 35: 32 */ return null;\r\n/* 36: */ }\r\n/* 37: */ finally\r\n/* 38: */ {\r\n/* 39: 34 */ closeSourse();\r\n/* 40: */ }\r\n/* 41: */ }", "public Department(int departmentID, String departmentName, Manager departmentManager, ArrayList<Employee> listOfEmployees1) {\n this.departmentID = departmentID;\n this.departmentName = departmentName;\n this.departmentManager = departmentManager;\n this.listOfEmployees = listOfEmployees1;\n }", "public EmployeeList() {\r\n initComponents();\r\n\r\n empName = getEmployeeName();\r\n empPosition = getEmployeePosition();\r\n System.out.println(empName + \"----- \" + empPosition);\r\n details = (ArrayList<String>) setEmployeeDetails(empName, empPosition);\r\n initializeComponents(details);\r\n\r\n }", "public EmployeesAdapter(List<Employee> employeeList) {\n this.employeeList = employeeList;\n }", "@Override\npublic List<Department> queryForEmp() {\n\treturn departmentMapper.queryForEmp();\n}", "public ArrayList<Employee> getEmployeeList()\r\n\t{\r\n\t\treturn new ArrayList<Employee>(empList);\r\n\t}", "public interface EmpService {\n Boolean addEmp(EMP emp);\n\n EMP getEmpName(String name);\n\n List<EMP> getEmp(@Param(\"did\") Integer d_id, @Param(\"state\") Integer e_state);\n\n List<EMP> getEmpLimits(Integer d_id, int currentPage, int pages, Integer e_state);\n\n List<EMP> getEmpLimit(Integer d_id, int currentPage, int pages, Integer e_state, Integer position);\n\n EMP empLogin(EMP emp);\n\n List<EMP_TRAIN> getEmpAndTrain(EMP emp);\n\n List<EMP_TRAIN> getEmpAndTrainLimit(EMP emp, int currentPage, int pages);\n}", "public interface EmpDao {\n\n\n /**\n * 根据参数查询列表\n * @param map\n * @return\n */\n\n// select empno,ENAME,job,mgr,hiredate,sal,comm,deptno from emp\n @Select(\"<script>\" +\n \"select a.empno,a.ename,a.job,a.mgr,to_char(a.hiredate,'yyyy-mm-dd') hiredate,a.sal,a.comm,a.deptno,a.mgrname,a.dname,a.rn from \" +\n \"(select b.*,rownum rn from \" +\n \"(select e.*,d.dname from (select e1.*,e2.ename mgrname from emp e1 left join emp e2 on e1.mgr=e2.empno) e left join dept d on e.deptno=d.deptno \" +\n \"<where>\" +\n \"<if test='ename!=null'>and e.ename like '%'||#{ename}||'%' </if>\" +\n \"<if test='job!=null'>and e.job like '%'||#{job}||'%' </if>\" +\n \"</where>\" +\n \"order by empno desc) b where rownum &lt; #{end}) a where a.rn &gt; #{start}\" +\n \"</script>\")\n List<Map> getList(Map map);\n\n\n /**\n * 带条件查询总条数\n * @param map\n * @return\n */\n @Select(\"<script>\"+\n \"select count(*) from emp <where>\" +\n \"<if test='ename != null'> and ename like '%${ename}%'</if>\"+\n \"<if test='job != null'> and job like '%${job}%'</if>\"+\n \"</where></script>\")\n int getPageCount(Map map);\n /**\n * 添加\n * @param map\n * @return\n */\n// seq_emp_id.nextval,ename, job, hiredate, sal, comm,deptno\n @Insert(\"insert into emp values(seq_emp_id.nextval,#{ENAME},#{JOB},#{MGR},to_date(#{HIREDATE},'yyyy-mm-dd'),#{SAL},#{COMM},#{DEPTNO})\")\n int add(Map map);\n\n\n /**\n * 更新\n * @param map\n * @return\n */\n @Update(\"update emp set ename=#{ENAME},job=#{JOB},mgr=#{MGR},hiredate=to_date(#{HIREDATE},'yyyy-mm-dd'),sal=#{SAL},comm=#{COMM},deptno=#{DEPTNO} where empno=#{EMPNO}\")\n int update(Map map);\n\n /**\n * 删除\n * @param deptNo\n * @return\n */\n @Delete(\"delete from emp where empno=#{EMPNO}\")\n int delete(int deptNo);\n\n /**\n * 获取所有部门,用于页面数据绑定\n * @return\n */\n @Select(\"select deptno,dname from dept\")\n List<Map> getDeptType();\n\n /**\n * 获取所有职位,用于页面数据绑定\n * @return\n */\n @Select(\"select distinct(job) from emp\")\n List<Map> getJob();\n\n /**\n * 获取上司,用于页面数据绑定\n * @return\n */\n @Select(\"select empno,ename from emp where job='PRESIDENT' or job='MANAGER' or job='ANALYST'\")\n List<Map> getMgr();\n\n\n}", "public static List getAlumniByDept(String department)\n { \n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"from Alumni_data where department=:department\").setString(\"department\", department).list();\n session.close();\n return li;\n }", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n\n String jpql =\"SELECT d FROM Departamento d \"\n + \"WHERE d.estado = 'a'\";\n\n Query query = em.createQuery(jpql);\n List<Departamento> listDepartamentos = query.getResultList();\n ArrayList<Departamento> arrayListDepartamentos = new ArrayList<>();\n for(Departamento d: listDepartamentos){\n arrayListDepartamentos.add(d);\n }\n this.Listdepartamentos = arrayListDepartamentos;\n em.close();\n emf.close();\n }\n catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n }", "void setList(ArrayList<UserContactInfo> contactDeatailsList);", "@Override\r\n public List<Dept> deptList() {\n return sqlSession.selectList(\"deptDAO.deptList\");\r\n }", "@Override\n\tpublic List<Employee> queryEmp() {\n\t\treturn null;\n\t}", "public static List getDeptList() \n {\n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"select department from Alumni_data group by department\").list();\n session.close();\n return li;\n }", "List<Especialidad> getEspecialidades();", "public String getEmployeeMangerDetails(Employeedetails employeedetails);", "@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}", "public interface EmployeeService {\n /**\n * finds the Employee by id\n *\n * @param id of Employee\n * @return found Employee\n */\n public Employee findEmployee(Long id);\n\n public void addEmployee(Employee employee);\n\n public void editEmployee(Employee employee);\n\n public void deleteEmployee(Long id);\n\n public List<Employee> getListEmployee();\n\n public List<Employee> getListFirstNameStarts(String word);\n\n public List<Employee> getListStarts(String word);\n}", "@Override\n public void mostrarListadoEquipos(List<Equipo> equipos) {\n\n }", "public interface EmployeeDao {\n List<Employee> getAllEmployees() throws ParseException, SQLException;\n\n Employee getEmployeeById(Integer id) throws ParseException, SQLException;\n\n Collection<Employee> getEmployeesByTitle(String title) throws ParseException;\n\n Collection<Employee> getEmployeesWithSalaryHigherTham(Integer salary) throws ParseException;\n\n Collection<Employee> getEmployeesWithNameStartsWith(String firstLetter) throws ParseException;\n\n Collection<Employee> getSubordinatesByManagerId(Integer managerId) throws ParseException;\n\n void saveEmployee(Employee employee) throws SQLException;\n\n void updateEmployee(Employee employee);\n\n void deleteEmployee(Employee employee);\n\n void setManagerForEmployee(Employee employee, Employee manager);\n\n Collection<Employee> getEmployeesByName(String name) throws SQLException;\n}", "@Override\r\n\tpublic List consultaEmpresas() {\n\t\treturn null;\r\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfoOrBuilder getEmployeelistOrBuilder() {\n return getEmployeelist();\n }", "java.util.List<hr.domain.ResumeDBOuterClass.Experience> \n getExperiencesList();", "public ArrayList getDepartments();", "public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }", "public void setDeptTable(Departments value);", "public void listAll(){\n /*\n for(int i=0;i<employeesList.size();i++){\n System.out.println(i);\n Employee employee=(Employee)employeesList.get(i);\n System.out.print(employeesList.get(i));\n */ \n \n \n //for used to traverse employList in order to print all employee's data\n for (int i = 0; i < employeesList.size(); i++) {\n System.out.println(\"Name: \" + employeesList.get(i).getName()); \n System.out.println(\"Salary_complement: \"+employeesList.get(i).getSalary_complement()); \n \n }\n \n \n }", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public List<Department> getAllDepartments();", "@Override\n\tpublic List<EmployeeBean> getEmployeeList() throws Exception {\n\t\treturn employeeDao.getEmployeeList();\n\t}", "public interface EmpService {\n List<Emp> queryEmp();\n}", "public List<Dept> list() {\n try {\n List<Dept> dept = new ArrayList<Dept>();\n PreparedStatement stmt = this.connection\n .prepareStatement(\"select * from dept_sr\"); //here\n\n ResultSet rs = stmt.executeQuery();\n\n while (rs.next()) {\n // adiciona a tarefa na lista\n dept.add(populateDept(rs));\n }\n\n rs.close();\n stmt.close();\n\n return dept;\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}", "@Override\n\tpublic List<Map<String, String>> employeeList() throws Exception {\n\t\treturn null;\n\t}", "public com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist() {\n return employeelist_ == null ? com.example.nettyserver.protobuf.Employee.EmployeeInfo.getDefaultInstance() : employeelist_;\n }", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "public int getEmployeeID() { return employeeID; }", "public String getEmployeeName();", "public List<Empleado> getAll();", "@Override\n\tpublic List<Employee> getEmpList() throws EmpException {\n\t\treturn dao.getEmpList();\n\t}", "@RequestMapping(value = \"/listEmployees\", method = RequestMethod.GET)\r\n\tpublic Employee employees() {\r\n System.out.println(\"---BEGIN\");\r\n List<Employee> allEmployees = employeeData.findAll();\r\n \r\n System.out.println(\"size of emp == \"+allEmployees.size());\r\n System.out.println(\"---END\");\r\n Employee oneEmployee = allEmployees.get(0);\r\n\t\treturn oneEmployee;\r\n }", "@Override\r\n\tpublic List<Employee> getdetails() {\n\t\treturn empdao.findAll();\r\n\t}", "@WebMethod\n public List<Employee> getAllEmployeesByHireDate() {\n Connection conn = null;\n List<Employee> emplyeeList = new ArrayList<Employee>();\n try {\n conn = EmpDBUtil.getConnection();\n Statement stmt = conn.createStatement();\n ResultSet rSet = stmt.executeQuery(\" select * from employees \\n\" + \n \" where months_between(sysdate,HIRE_DATE) > 200 \");\n while (rSet.next()) {\n Employee emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n\n emplyeeList.add(emp);\n }\n \n System.out.println(\"done\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emplyeeList;\n }", "private static List<Department> compute(Collection<Employee> employees) {\n Map<String, Employee> employeeMap = employees.stream().collect(Collectors.toMap(e -> e.getDeptName(), Function.identity(), (old, newOne) -> newOne));\n\n\n// Map<string, dept>\n// getEmp\n// get account\n// check slap\n// construct department\n// put department in List\n\n\nreturn null;\n\n }", "@Override\n\tpublic List<Employee> getEmpInfo() {\n\t\treturn null;\n\t}", "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastoremanager-\" + 370);\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tlog.severe(\"datastoremanager-\" + 373);\n\t\t//List for returning\n\t\tList<Employee> returnedList = new ArrayList<>();\n\t\tlog.severe(\"datastoremanager-\" + 376);\n\t\t//Loops through all results and add them to the returning list \n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.severe(\"datastoremanager-\" + 379);\n\t\t\t//Vars to use\n\t\t\tString actualFirstName = null;\n\t\t\tString actualLastName = null;\n\t\t\tBoolean attendedHrTraining = null;\n\t\t\tDate hireDate = null;\n\t\t\tBlob blob = null;\n\t\t\tbyte[] photo = null;\n\t\t\t\n\t\t\t//Get results via the properties\n\t\t\ttry {\n\t\t\t\tactualFirstName = (String) result.getProperty(\"firstName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tactualLastName = (String) result.getProperty(\"lastName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tattendedHrTraining = (Boolean) result.getProperty(\"attendedHrTraining\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\thireDate = (Date) result.getProperty(\"hireDate\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tblob = (Blob) result.getProperty(\"picture\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tphoto = blob.getBytes();\n\t\t\t} catch (Exception e){}\n\t\t\tlog.severe(\"datastoremanager-\" + 387);\n\t\t\t\n\t\t\t//Build an employee (If conditionals for nulls)\n\t\t\tEmployee emp = new Employee();\n\t\t \temp.setFirstName((actualFirstName != null) ? actualFirstName : null);\n\t\t \temp.setLastName((actualLastName != null) ? actualLastName : null);\n\t\t \temp.setAttendedHrTraining((attendedHrTraining != null) ? attendedHrTraining : null);\n\t\t \temp.setHireDate((hireDate != null) ? hireDate : null);\n\t\t \temp.setPicture((photo != null) ? photo : null);\n\t\t \tlog.severe(\"datastoremanager-\" + 395);\n\t\t \treturnedList.add(emp);\n\t\t}\n\t\tlog.severe(\"datastoremanager-\" + 398);\n\t\treturn returnedList;\n\t}", "public interface EmployeeService {\n\n\t\n\tList<EmployeeEntity> queryObjectByCondition(Map<String,Object> map);\n\tList<EmployeeEntity> queryBack(Map<String,Object> map);\n\t\n\tEmployeeEntity queryByPhone(String phone);\n\t\n\tlong login(String mobile, String password);\n\t\n\tEmployeeEntity queryObject(Long empid);\n\t\n\tList<EmployeeEntity> queryList(Map<String, Object> map);\n\t\n\tint queryTotal(Map<String, Object> map);\n\t\n\tvoid save(EmployeeEntity employee);\n\t\n\tvoid update(EmployeeEntity employee);\n\t\n\tvoid delete(Long empid);\n\t\n\tvoid deleteBatch(Long[] empids);\n}", "public static void main(String[] args) {\nEmployee emp = new Employee(1,\"Pankaj\",\"CEO\");\nEmployee emp1 = new Employee(2,\"AAAA\",\"CTO\");\n\t\tArrayList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\temployees.add(emp1);\n\t\temployees.add(emp);\n\t\temployees.add(new Employee(3,\"sdfd\",\"hr\"));\n\t\t\n\t\tfor(Employee e : employees)\n\t\t{\n\t\t\t//System.out.println(e.id+\" \"+e.name);\n\t\t\tif(e.getId()>2)\n\t\t\t\te.setDept(\"Manager\");\n\t\t\t\n\t\t\tSystem.out.println(e.getDept()+\" \"+e.getId()+\" \"+e.getName());\n\t\t\t\n\t\t}\n\t\t\n\t}", "public interface UsersDAO { //perform in database;\nvoid addUsers(Users user);\nvoid updateUsers(Users user); //pass employee object\nvoid deleteUsers(int id);//pass employee id\nvoid withdraw(Users users, double balance, double amount);\nvoid deposit(Users users, double balance, double amount);\n\n\n//get all employees\nList<Users> getUsers(); //method to return list of employees;\n//Users usersById(int id); // method to return a single employee;\n\n}", "public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "public List<Empleado> getEmpleados(Empleado emp) {\n List<Empleado> empleados = new ArrayList<>();\n \n Connection miConexion = null;\n Statement miStatement = null;\n ResultSet miResultset = null;\n\n String carnet = emp.getCarnetEmpleado();\n\n \n try{\n\n //Establecer la conexion\n miConexion = origenDatos.getConexion();\n \n //Crear sentencia SQL y Statement\n // String miSql = \"select * from departamento d inner join catalagopuesto c on d.codigodepartamento = c.codigodepartamento inner join empleado e on c.codigopuesto = e.codigopuesto where e.carnetempleado = '\"+carnet+\"'\";\n String miSql = \"select * from empleado e WHERE e.carnetempleado = '\"+carnet+\"'\"; \n miStatement = miConexion.createStatement();\n \n //Ejecutar SQL\n miResultset = miStatement.executeQuery(miSql);\n \n while(miResultset.next()){\n String codCarnet = miResultset.getString(\"CARNETEMPLEADO\");\n \n Empleado temporal = new Empleado(codCarnet);\n \n empleados.add(temporal);\n }\n\n }catch(Exception e){\n e.printStackTrace();\n }\n \n return empleados;\n }", "public Employeedetails getEmployeeDetailByName(String employeeId);", "public interface IEmployeeDAO {\n\t\n\tpublic boolean insertEmployee(Employee emp);\n\tpublic List<Employee> getAllEmployees(); \n\tpublic Employee getEmployee(int empId);\n\tpublic boolean updateEmp(int empId, double newSal); \n\tpublic boolean deleteEmp(int empId); \n\n}", "public List listar() {\n ArrayList<Empleado> lista = new ArrayList<>();\r\n String sql = \"SELECT * FROM empleado\";\r\n \r\n try {\r\n con = cn.getConexion();\r\n ps = con.prepareStatement(sql); \r\n rs = ps.executeQuery();\r\n \r\n while (rs.next()) {\r\n Empleado emp = new Empleado(); \r\n emp.setId(rs.getInt(\"Id\")); //campos de la tabla\r\n emp.setNombre(rs.getString(\"Nombre\"));\r\n emp.setSalario(rs.getDouble(\"Salario\")); \r\n lista.add(emp); \r\n } \r\n } catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return lista;\r\n }", "public ArrayList<String> getAllDepartments()\r\n/* 70: */ {\r\n/* 71: 60 */ String sql = \"select department from t_department\";\r\n/* 72: */ \r\n/* 73: 62 */ ArrayList<String> deptNameArr = new ArrayList();\r\n/* 74: */ try\r\n/* 75: */ {\r\n/* 76: 64 */ this.ct = new ConnDb().getConn();\r\n/* 77: 65 */ this.ps = this.ct.prepareStatement(sql);\r\n/* 78: 66 */ this.rs = this.ps.executeQuery();\r\n/* 79: 67 */ while (this.rs.next())\r\n/* 80: */ {\r\n/* 81: 68 */ String deptName = new String(this.rs.getString(1));\r\n/* 82: 69 */ deptNameArr.add(deptName);\r\n/* 83: */ }\r\n/* 84: 71 */ return deptNameArr;\r\n/* 85: */ }\r\n/* 86: */ catch (Exception e)\r\n/* 87: */ {\r\n/* 88: 74 */ e.printStackTrace();\r\n/* 89: 75 */ return null;\r\n/* 90: */ }\r\n/* 91: */ finally\r\n/* 92: */ {\r\n/* 93: 77 */ closeSourse();\r\n/* 94: */ }\r\n/* 95: */ }", "public interface EmployeeMapper {\n List<Employee> getEmpList();\n}", "@WebMethod\n public List<Employee> getEmployeesBySalary(@WebParam(name = \"arg0\") int emp_sal) {\n Connection conn = null;\n List<Employee> emplyeeList = new ArrayList<Employee>();\n try {\n conn = EmpDBUtil.getConnection();\n PreparedStatement pStmt = conn.prepareStatement(\"select * from EMPLOYEES where SALARY > ?\");\n pStmt.setInt(1, emp_sal);\n ResultSet rSet = pStmt.executeQuery();\n while (rSet.next()) {\n Employee emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n\n emplyeeList.add(emp);\n \n }\n \n System.out.println(\"done\");\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emplyeeList;\n }", "public List<PersonaDTO> consultarPersonas() ;", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "@WebMethod\n public Employee getEmployeeById(@WebParam(name = \"arg0\") int empId) {\n Connection conn = null;\n Employee emp = null;\n try {\n conn = EmpDBUtil.getConnection();\n PreparedStatement pStmt = conn.prepareStatement(\"select * from EMPLOYEES where EMPLOYEE_ID = ?\");\n pStmt.setInt(1, empId);\n ResultSet rSet = pStmt.executeQuery();\n while (rSet.next()) {\n emp = new Employee();\n emp.setEmployee_id(rSet.getInt(\"EMPLOYEE_ID\"));\n emp.setFirst_name(rSet.getString(\"FIRST_NAME\"));\n emp.setLast_name(rSet.getString(\"LAST_NAME\"));\n emp.setEmail(rSet.getString(\"EMAIL\"));\n emp.setPhone_number(rSet.getString(\"PHONE_NUMBER\"));\n emp.setHire_date(rSet.getDate(\"HIRE_DATE\"));\n emp.setJop_id(rSet.getString(\"JOB_ID\"));\n emp.setSalary(rSet.getInt(\"SALARY\"));\n emp.setCommission_pct(rSet.getDouble(\"COMMISSION_PCT\"));\n emp.setManager_id(rSet.getInt(\"MANAGER_ID\"));\n emp.setDepartment_id(rSet.getInt(\"DEPARTMENT_ID\"));\n }\n \n System.out.println(\"done\");\n\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n EmpDBUtil.closeConnection(conn);\n }\n\n return emp;\n }", "public void addHotel(int hotelId, List<Hotel_Room_Detail> hotelRoomDetailList){\n\n }", "public void listEmployees()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tBranchId\\tId\\n\";\n\t\t\n\t\tList<Employee> employees = this.company.getEmployees();\n\n\t\tfor(int i=0; i<employees.length(); i++)\n\t\t{\n\t\t\tstr += employees.get(i).getName() + \"\\t\" + employees.get(i).getSurname() + \"\\t\" + employees.get(i).getMail() + \"\\t\" + employees.get(i).getPassword() + \"\\t\\t\" + employees.get(i).getBranchId() + \"\\t\\t\" + employees.get(i).getId() + \"\\n\";\n\t\t}\n\n\t\tSystem.out.println(str);\n\n\t}", "public interface DepartmentDAO {\n\n /**\n * This method is used to retrieve a list of all departments.\n *\n * @return List of generic type {@link Department}\n */\n public List<Department> getAllDepartments();\n\n /**\n * This method is used when adding a department.\n *\n * @param department of type {@link Department}\n */\n public void addDepartment(Department department);\n\n /**\n * This method is used to update the department table.\n *\n * @param department of type {@link Department}\n * @param newDeptName of type String *\n */\n public void updateDepartment(Department department, String newDeptName);\n\n /**\n * This method is used to delete departments by department number.\n *\n * @param dept_no of type integer\n */\n public void deleteDepartmentByDeptNo(int dept_no);\n\n /**\n * This method is use to delete departments by name.\n *\n * @param dept_name of type String\n */\n public void deleteDepartmentByDeptName(String dept_name);\n\n /**\n * This method is responsible for returning a department by dept_no.\n *\n * @param dept_no of type integer\n * @return ResultSet\n */\n public ResultSet getDepartmentByID(int dept_no);\n\n /**\n * This method is responsible for returning a department by dept_name\n *\n * @param dept_name of type String\n * @return ResultSet\n */\n public ResultSet getDepartmentByName(String dept_name);\n}", "@Override\n\tpublic List<EmployeeBean> getAllEmployees() {\n\t\tLOGGER.info(\"starts getAllEmployees method\");\n\t\tLOGGER.info(\"Ends getAllEmployees method\");\n\t\t\n\t\treturn adminEmployeeDao.getAllEmployees();\n\t}", "public void setDepartment(Department d) {\r\n department = d;\r\n }", "@Override\n\tpublic String saveAll(List<Employee> empList) {\n\t\treturn null;\n\t}", "public Employee getEmployee() {\n return employee;\n }", "private List<EmpregadoDTO> mockEmpregados() {\r\n\r\n\t\tif(empregados == null){\r\n\t\t\tempregados = new ArrayList<EmpregadoDTO>();\r\n\t\t\t//TODO SETAR OS ATRIBUTOS EM CADA\r\n\t\t\tEmpregadoDTO e1 = new EmpregadoDTO(1,\"William\",true);\r\n\t\t\te1.setCpf(\"14210417742\");\r\n\t\t\tEmpregadoDTO e2 = new EmpregadoDTO(2,\"teste2\",false);\r\n\t\t\tEmpregadoDTO e3 = new EmpregadoDTO(3,\"teste3\",false);\r\n\t\t\tEmpregadoDTO e4 = new EmpregadoDTO(4,\"teste4\",false);\r\n\t\t\tEmpregadoDTO e5 = new EmpregadoDTO(113, \"Hernand solicitarEmprestimoOK\", true);\r\n\t\t\te5.setCpf(\"64675653715\");\r\n\t\t\t//TODO preencher os dados do empregado\r\n\t\t\tempregados.add(e1);\r\n\t\t\tempregados.add(e2);\r\n\t\t\tempregados.add(e3);\r\n\t\t\tempregados.add(e4);\r\n\t\t\tempregados.add(e5);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn empregados;\r\n\t}", "com.example.nettyserver.protobuf.Employee.EmployeeInfo getEmployeelist();", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "public void getEmployee() {\r\n //what needs to be returned?\r\n }", "@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\n\t@Override\n\t/**\n\t * Leo todos los empleados.\n\t */\n\tpublic List<Employees> readAll() {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_TODOS)).addEntity(Employees.class)\n\t\t\t\t.list();// no creo que funcione, revisar\n\n\t\treturn ls;\n\t}" ]
[ "0.7160459", "0.7100407", "0.6820783", "0.6816881", "0.6790288", "0.6780168", "0.6726888", "0.67020243", "0.6654738", "0.66087747", "0.65541494", "0.65327924", "0.65242016", "0.64795953", "0.6435825", "0.6405054", "0.6363575", "0.6361461", "0.6314961", "0.6281055", "0.6280573", "0.62773144", "0.6272604", "0.6268604", "0.62384284", "0.62345594", "0.62237877", "0.6207037", "0.6203097", "0.61993134", "0.6198833", "0.6178182", "0.61689645", "0.6142429", "0.61383337", "0.6135944", "0.611517", "0.61145663", "0.61136466", "0.6110683", "0.6109593", "0.61081773", "0.6094523", "0.60770166", "0.6074237", "0.60741603", "0.6073968", "0.60689944", "0.6060267", "0.60600084", "0.60573316", "0.605182", "0.60442436", "0.60396326", "0.6034785", "0.602533", "0.6017233", "0.60140896", "0.6014023", "0.6011609", "0.6008981", "0.60074615", "0.6001719", "0.6000317", "0.5998775", "0.5998023", "0.5997963", "0.5994023", "0.5990077", "0.5973671", "0.5966287", "0.5963594", "0.59604144", "0.59589577", "0.59538037", "0.59516454", "0.59456545", "0.59407747", "0.5938056", "0.59380203", "0.59369045", "0.59311587", "0.5930751", "0.59294856", "0.5929015", "0.59284574", "0.5926421", "0.5920985", "0.5920588", "0.591602", "0.5915978", "0.5914395", "0.5912461", "0.5899584", "0.5895843", "0.58933026", "0.5893039", "0.5891265", "0.58898956", "0.5878886", "0.58723277" ]
0.0
-1
add users to db
@Override public void onSuccess(AuthResult authResult) { Users user = new Users(); user.setEmail(inputEmail.getText().toString()); user.setName(inputName.getText().toString()); user.setPhone(inputPhoneNumber.getText().toString()); user.setPassword(inputPassword.getText().toString()); users.child(FirebaseAuth.getInstance().getCurrentUser().getUid()) .setValue(user) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { Snackbar.make(relativeLayoutsignup,"SignUp Successfully",Snackbar.LENGTH_SHORT) .show(); startActivity(new Intent(SignUpActivity.this,SignInActivity.class)); finish(); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Snackbar.make(relativeLayoutsignup,"Failed"+e.getMessage(),Snackbar.LENGTH_SHORT) .show(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToUsers(Users users) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERS_ADD_USER);\n preparedStatement.setString(1, users.getUser_login());\n preparedStatement.setString(2, users.getUser_pass());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "private void addUser(){\r\n\t\ttry{\r\n\t\t\tSystem.out.println(\"Adding a new user\");\r\n\r\n\t\t\tfor(int i = 0; i < commandList.size(); i++){//go through command list\r\n\t\t\t\tSystem.out.print(commandList.get(i) + \"\\t\");//print out the command and params\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t\t\t//build SQL statement\r\n\t\t\tString sqlCmd = \"INSERT INTO users VALUES ('\" + commandList.get(1) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(2) + \"', '\" + commandList.get(3) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(4) + \"', '\" + commandList.get(5) + \"', '\"\r\n\t\t\t\t\t+ commandList.get(6) + \"');\";\r\n\t\t\tSystem.out.println(\"sending command:\" + sqlCmd);//print SQL command to console\r\n\t\t\tstmt.executeUpdate(sqlCmd);//send command\r\n\r\n\t\t} catch(SQLException se){\r\n\t\t\t//Handle errors for JDBC\r\n\t\t\terror = true;\r\n\t\t\tse.printStackTrace();\r\n\t\t\tout.println(se.getMessage());//return error message\r\n\t\t} catch(Exception e){\r\n\t\t\t//general error case, Class.forName\r\n\t\t\terror = true;\r\n\t\t\te.printStackTrace();\r\n\t\t\tout.println(e.getMessage());\r\n\t\t} \r\n\t\tif(error == false)\r\n\t\t\tout.println(\"true\");//end try\r\n\t}", "void add(User user) throws SQLException;", "public void insertUser() {}", "public int addUser(Users users);", "public void addUser() {\n\t\tthis.users++;\n\t}", "void addUser(User user);", "void addUser(User user);", "public void addUser(User user);", "public void addUser(){\r\n //gets entered username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n \r\n //connects to database\r\n \r\n //creates statement\r\n Connection myConn = DriverManager.getConnection(Main.URL);\r\n //adds username and password into database\r\n PreparedStatement myStmt = myConn.prepareStatement(\"insert into LISTOFUSERS(USERNAME, PASSWORD)values(?,?)\");\r\n myStmt.setString(1,user);\r\n myStmt.setString(2,pass);\r\n int a = myStmt.executeUpdate();\r\n \r\n if(a>0){\r\n System.out.println(\"Row Update\");\r\n }\r\n myConn.close();\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n }", "public void addUser(User user) {\n\t\t\r\n\t}", "@Test\n void add() {\n List<User> userList = Arrays.asList(\n new User(1L, \"star\", 20, \"123456\"),\n new User(2L, \"green\", 21, \"123456\"),\n new User(3L, \"red\", 22, \"123456\"),\n new User(4L, \"blue\", 23, \"123456\"),\n new User(5L, \"yellow\", 24, \"123456\"),\n new User(6L, \"black\", 26, \"123456\")\n );\n userRepository.saveAll(userList);\n }", "public void addUser(User user){\r\n users.add(user);\r\n }", "public void addUser(UserModel user);", "public boolean addUsers(List<User> users);", "private void insertTestUsers() {\n\t\tinitDb();\n\t\tinsertUser(\"aaa\", \"11\");\n\t\tinsertUser(\"bbb\", \"22\");\n\t\tinsertUser(\"ccc\", \"33\");\n\t}", "private void createUsers() {\n\n\t\tList<User> UserList = Arrays.asList(new User(\"Kiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"Ram\", \"kumar\", \"[email protected]\", 22), new User(\"RamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"Lakshamn\", \"Seth\", \"[email protected]\", 50), new User(\"Sita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"Ganesh\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"KiranKiran\", \"kumar\", \"[email protected]\", 20),\n\t\t\t\tnew User(\"RamRam\", \"kumar\", \"[email protected]\", 22),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"LaxmiKiran\", \"[email protected]\", 30),\n\t\t\t\tnew User(\"RamKiranRamKiran\", \"Seth\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"SitaSita\", \"Kumar\", \"[email protected]\", 50),\n\t\t\t\tnew User(\"GaneshSita\", \"Kumar\", \"[email protected]\", 50));\n\n\t\tIterable<User> list = userService.saveAllUsers(UserList);\n\t\tfor (User User : list) {\n\t\t\tSystem.out.println(\"User Object\" + User.toString());\n\n\t\t}\n\n\t}", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "public void addusers(User user){\n SQLiteDatabase db = this.getReadableDatabase();\n ContentValues values=new ContentValues();\n\n values.put(KEY_NAME, user.getName());\n values.put(KEY_PASS,user.getPasscode());\n values.put(KEY_PHOTO, user.getImage() );\n\n\n db.insert(TABLE_USERS, null, values);\n db.close();\n }", "private void pushToHibernate(){\n DATA_API.saveUser(USER);\n }", "public void addUser(IndividualUser u) {\n try {\n PreparedStatement s = sql.prepareStatement(\"INSERT INTO Users (userName, firstName, lastName, friends) VALUES (?,?,?,?);\");\n s.setString(1, u.getId());\n s.setString(2, u.getFirstName());\n s.setString(3, u.getLastName());\n s.setString(4, u.getFriends().toString());\n s.execute();\n s.close();\n\n } catch (SQLException e) {\n sqlException(e);\n }\n }", "public void newUser(User user) {\n users.add(user);\n }", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "private void addNewUser(User user) {\n\t\tSystem.out.println(\"BirdersRepo. Adding new user to DB: \" + user.getUsername());\n\t\tDocument document = Document.parse(gson.toJson(user));\n\t\tcollection.insertOne(document);\n\t}", "public void createUser() {\n try {\n conn = dao.getConnection();\n\n ps = conn.prepareStatement(\"INSERT INTO Users(username, password) VALUES(?, ?)\");\n ps.setString(1, this.username);\n ps.setString(2, this.password);\n\n ps.execute();\n\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private void autoPopulateDB() {\r\n User newUser = new User(\"din_djarin\", \"baby_yoda_ftw\");\r\n User secondNew = new User(\"csumb\", \"otters_woo\");\r\n User lastNew = new User(\"username\", \"password\");\r\n\r\n mUserDAO.insert(newUser);\r\n mUserDAO.insert(secondNew);\r\n mUserDAO.insert(lastNew);\r\n }", "void addUser(BlogUser user) throws DAOException;", "@Override\n\tpublic void addUsers(Session session){\n\t\ttry{\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\n\t\t\tSystem.out.print(\"+++++++++++Add Customer/Admin here+++++++++++\\n\");\n\n\t\t\tSystem.out.println(\"Enter 'Admin' to add a new admin to database\");\n\t\t\tSystem.out.println(\"Enter 'Customer' to add a new admin to database\");\n\t\t\tSystem.out.println(\"--------------Enter one from above------------------\");\n\t\t\tString accType = scanner.nextLine();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter First Name:\");\n\t\t\tString firstName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Last Name:\");\n\t\t\tString lastName = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter UserId:\");\n\t\t\tString inputLoginId = scanner.nextLine();\n\n\t\t\tSystem.out.println(\"Enter Password:\");\n\t\t\tString inputLoginPwd = scanner.nextLine();\n\n\t\t\t//pass these input fields to client controller\n\t\t\tsamp=mvc.addUsers(session,accType,firstName,lastName,inputLoginId,inputLoginPwd);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Add Users Exception: \" +e.getMessage());\n\t\t}\n\t}", "public Boolean addUser(User user) throws ApplicationException;", "public int insertUser(final User user);", "void addUser(String uid, String firstname, String lastname, String pseudo);", "public void addUser(User user) {\n try (PreparedStatement pst = this.conn.prepareStatement(\"INSERT INTO users (name, login, email, createDate)\"\n + \"VALUES (?, ?, ?, ?)\")) {\n pst.setString(1, user.getName());\n pst.setString(2, user.getLogin());\n pst.setString(3, user.getEmail());\n pst.setTimestamp(4, user.getCreateDate());\n pst.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void addUser(User u){\n\r\n userRef.child(u.getUuid()).setValue(u);\r\n\r\n DatabaseReference zipUserReference;\r\n DatabaseReference zipNotifTokenReference;\r\n List<String> zipList = u.getZipCodes();\r\n\r\n for (String zipCode : zipList) {\r\n zipUserReference = baseRef.child(zipCode).child(ZIPCODE_USERID_REFERENCE_LIST);\r\n // Add uuid to zipcode user list\r\n zipUserReference.child(u.getUuid()).setValue(u.getUuid());\r\n\r\n // Add notifToken to list\r\n zipNotifTokenReference = baseRef.child(zipCode).child(ZIPCODE_NOTIFICATION_TOKENS_LIST);\r\n zipNotifTokenReference.child(u.getNotificationToken()).setValue(u.getNotificationToken());\r\n\r\n }\r\n }", "private void setupUsersInRoomDB() {\n Log.d(TAG, \"setupUsersInRoomDB: start to setup list of 200 user\");\n userList = new ArrayList<>();\n int j = 0;\n for (int i = 0; i < 200; i++) {\n switch (j) {\n case 0:\n Log.d(TAG, \"setupUsersInRoomDB: case 0 set the user with image one\");\n userList.add(new User(\"user\" + i, getImageOne()));\n j++;\n break;\n case 1:\n userList.add(new User(\"user\" + i, getImageTwo()));\n j++;\n break;\n case 2:\n userList.add(new User(\"user\" + i, getImageThree()));\n j = 0;\n break;\n }\n }\n\n db.userDao().insertListOfUser(userList);\n Log.d(TAG, \"setupUsersInRoomDB: insert list of users in room database\");\n Shared.sharedSave(MainActivity.this, \"usersdb\", USERS_EXIST);\n Toast.makeText(getApplicationContext(), \"finish set database\", Toast.LENGTH_LONG).show();\n }", "void createUser() throws SQLException {\n String name = regName.getText();\n String birthdate = regAge.getText();\n String username = regUserName.getText();\n String password = regPassword.getText();\n String query = \" insert into users (name, birthdate, username, password)\"\n + \" values (?, ?, ?, ?)\";\n\n DB.registerUser(name, birthdate, username, password, query);\n }", "public void insert(User user);", "public void addUser(User user){\n loginDAO.saveUser(user.getId(),user.getName(),user.getPassword());\n }", "@Override\n\tpublic void insertUser(User user) {\n\t\t\n\t}", "void addUser(User user) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_utilizador, user.getUser()); // Contact Name\n values.put(KEY_pass, user.getPass()); // Contact Phone\n values.put(KEY_Escola, user.getEscola());\n db.insert(tabela, null, values);\n db.close(); // Closing database connection\n }", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}", "public void addUser(String username, String password) {\n\t\t// Connect to database\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\t\n\t\t// Create new entry\n\t\tString newEntryString = \"INSERT INTO User (username, password, winNum, loseNum) VALUES (?, ?, 0, 0)\";\n\t\t\n\t\ttry {\n\t\t\tps = conn.prepareStatement(newEntryString);\n\t\t\tps.setString(1, username);\n\t\t\tps.setString(2, password);\n\t\t\tps.executeUpdate();\n\t\t}\n\t\tcatch(SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\t// Close connections\n\t\t\ttry {\n\t\t\t\tif(rs != null)\n\t\t\t\t{\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(ps != null)\n\t\t\t\t{\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(SQLException sqle)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sqle: \" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void addUser() {\n\t\tSystem.out.println(\"com.zzu.yhl.a_jdk addUser\");\r\n\t}", "public void addUser(User user){\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(USER_NAME,user.getName());\n values.put(USER_PASSWORD,user.getPassword());\n db.insert(TABLE_USER,null,values);\n db.close();\n }", "public void addUserUI() throws IOException {\n System.out.println(\"Add user: id;surname;first name;username;password\");\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n User user = new User(a[1], a[2], a[3], a[4], \" \");\n user.setId(Long.parseLong(a[0]));\n try\n {\n User newUser = service.addUser(user);\n if(newUser != null)\n System.out.println(\"ID already exists for \" + user.toString());\n else\n System.out.println(\"User added successfully!\");\n }\n catch (ValidationException ex)\n {\n System.out.println(ex.getMessage());\n }\n catch (IllegalArgumentException ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "@Transactional\r\n\tpublic void addUser(){\r\n\t}", "public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}", "public void addUser() {\r\n PutItemRequest request = new PutItemRequest().withTableName(\"IST440Users\").withReturnConsumedCapacity(\"TOTAL\");\r\n PutItemResult response = client.putItem(request);\r\n }", "public void addUser(User user) {\n\t\tSystem.out.println(\"adding user :\"+user.toString());\n\t\tuserList.add(user);\n\t}", "@Override\r\n\tpublic void add(User1 user) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.save(user);\r\n\t}", "void registerUser(User newUser);", "public void addUser(User user) {\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(UserDBHelper.COLUMN_NAME, user.getName());\n values.put(UserDBHelper.COLUMN_SURNAME, user.getSurname());\n values.put(UserDBHelper.COLUMN_EMAIL, user.getEmail());\n values.put(UserDBHelper.COLUMN_PASS, user.getPass());\n db.insert(UserDBHelper.TABLE_NAME, \"\", values); // Prevent from -1 exception\n db.close();\n }", "boolean addUser(int employeeId, String name, String password, String role);", "void addNewUser(User user, int roleId) throws DAOException;", "@Test\n\tpublic void testAddUser() {\n\t\tresetTestVars();\n\t\tuser1.setID(\"1\");\n\t\tuser2.setID(\"1\");\n\t\tassertFalse(\"User is invalid\", sn.addUser(user3));\n\t\tassertTrue(\"User is valid\", sn.addUser(user1));\n\t\tassertFalse(\"Same user cant be added\", sn.addUser(user1));\n\t\tassertFalse(\"ID already exists\", sn.addUser(user2));\n\t}", "@Override\n\tpublic void addUser(ERSUser user) {\n\t\tuserDao.insertUser(user);\n\t}", "private void addUser(HttpServletRequest req) throws PolygonException {\n //int id = Integer.parseInt(req.getParameter(\"id\"));\n String username = (String) req.getParameter(\"username\");\n String password = (String) req.getParameter(\"password\");\n String password2 = (String) req.getParameter(\"password2\");\n String email = (String) req.getParameter(\"email\");\n String type = (String) req.getParameter(\"type\");\n if (username.length() > 0 && password.length() > 0 && password.equals(password2) && type.length() > 0) {\n User user = new User(username, password, email, type);\n UsersMapper.insertUser(user);\n } else {\n String msg = \"Udfyld alle krævede felter\";\n throw new PolygonException(msg);\n }\n }", "@Override\n\tpublic String createUser(User users) {\n\t\tuserRepository.save(users);\n\t\treturn \"Save Successful\";\n\t}", "public static void addUser(String name)\n {\n userList.add(name);\n }", "public void addUserData(HttpServletRequest request) {\n\n String userName = request.getParameter(\"userName\");\n String password = request.getParameter(\"userPassword\");\n String address = request.getParameter(\"userAddress\");\n String phone = request.getParameter(\"userPhone\");\n String email = request.getParameter(\"userEmail\");\n\n userDao = new UserDao();\n //user = new User(0, userName, password, address, phone, email);\n //userDao.addUser(user);\n\n log.info(user.toString());\n }", "@Override\n public boolean userRegister(User user) \n { \n Connection conn = null;\n Statement stmt = null;\n try \n {\n db_controller.setClass();\n conn = db_controller.getConnection();\n stmt = conn.createStatement();\n String sql;\n \n sql = \"INSERT INTO users (firstname,lastname,username,password,city,number) \"\n + \"values ('\"+ user.getFirstname()+\"',\" \n + \"'\" + user.getLastname() + \"',\" \n + \"'\" + user.getUsername() + \"',\" \n + \"'\" + user.getPassword() + \"',\" \n + \"'\" + user.getCity() + \"',\"\n + \"'\" + user.getNumber() + \"')\";\n int result = stmt.executeUpdate(sql);\n \n stmt.close();\n conn.close();\n if(result == 1) return true;\n else return false;\n } \n catch (SQLException ex) { ex.printStackTrace(); return false;} \n catch (ClassNotFoundException ex) { ex.printStackTrace(); return false;} \n }", "public void createAdminUser() {\n\n Users user = new Users();\n user.setId(\"1\");\n user.setName(\"admin\");\n user.setPassword(bCryptPasswordEncoder.encode(\"admin\"));\n\n ExampleMatcher em = ExampleMatcher.matching().withIgnoreCase();\n Example<Users> example = Example.of(user, em);\n List<Users> users = userRepository.findAll(example);\n System.out.println(\"Existing users: \" + users);\n\n if (users.size() == 0) {\n System.out.println(\"admin user not found, hence creating admin user\");\n userRepository.save(user);\n System.out.println(\"admin user created\");\n latch.countDown();\n }\n try {\n latch.await();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void insertUser(String firstname, String lastname, String email) {\n/* 53 */ Connection conn = null;\n/* 54 */ PreparedStatement pstmt = null;\n/* 55 */ String sql = null;\n/* */ \n/* */ try {\n/* 58 */ conn = getConn();\n/* 59 */ System.out.println(\"db접속 성공\");\n/* 60 */ sql = \"insert into members(firstname,lastname,email) values(?,?,?)\";\n/* 61 */ pstmt = conn.prepareStatement(sql);\n/* 62 */ pstmt.setString(1, firstname);\n/* 63 */ pstmt.setString(2, lastname);\n/* 64 */ pstmt.setString(3, email);\n/* 65 */ int i = pstmt.executeUpdate();\n/* */ }\n/* 67 */ catch (Exception e) {\n/* 68 */ e.printStackTrace();\n/* */ } finally {\n/* 70 */ closeDB();\n/* */ } \n/* */ }", "public void createUser() {\r\n\t\tif(validateUser()) {\r\n\t\t\t\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"INSERT INTO t_user (nom,prenom,userName,pass,tel,type,status) values(?,?,?,?,?,?,?)\");\r\n\t\t\t\tps.setString(1, this.getNom());\r\n\t\t\t\tps.setString(2, this.getPrenom());\r\n\t\t\t\tps.setString(3, this.getUserName());\r\n\t\t\t\tps.setString(4, this.getPassword());\r\n\t\t\t\tps.setInt(5, Integer.parseInt(this.getTel().trim()));\r\n\t\t\t\tps.setString(6, this.getType());\r\n\t\t\t\tps.setBoolean(7, true);\r\n\t\t\t\tps.executeUpdate();\r\n\t\t\t\tnew Message().error(\"Fin d'ajout d'utilisateur\");\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tnew Message().error(\"Echec d'ajout d'utilisateur\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closePrepareStatement(ps);\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public static boolean addUser(UserDetailspojo user) throws SQLException {\n Connection conn=DBConnection.getConnection();\n String qry=\"insert into users1 values(?,?,?,?,?)\";\n System.out.println(user);\n PreparedStatement ps=conn.prepareStatement(qry);\n ps.setString(1,user.getUserid());\n ps.setString(4,user.getPassword());\n ps.setString(5,user.getUserType());\n ps.setString(3,user.getEmpid());\n ps.setString(2,user.getUserName());\n //ResultSet rs=ps.executeQuery();\n int rs=ps.executeUpdate();\n return rs==1;\n //String username=null;\n }", "public void Adduser(User u1) {\n\t\tUserDao ua=new UserDao();\n\t\tua.adduser(u1);\n\t\t\n\t}", "public void addUser(String u, String p) {\n \t//users.put(\"admin\",\"12345\");\n users.put(u, p);\n }", "public void createUser(User user) {\n\n\t}", "public void add(User user) {\r\n this.UserList.add(user);\r\n }", "@Override\n\tpublic int insertUsers(User user) {\n\t\treturn userDao.insertUsers(user);\n\t}", "public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\t@Transactional(rollbackFor=Exception.class)\r\n\tpublic int insertUser(TUsers users) {\n\t\tdao.insertUser(users);\r\n\t\tint i=10/0;\r\n\t\tdao.insertUser(users);\r\n\t\treturn users.getId();\r\n\t}", "void addUser(Username username) throws UserAlreadyExistsException;", "public void create(Users users) {\n try {\n session = sessionFactory.openSession();\n transaction = session.beginTransaction();\n session.save(users);\n transaction.commit();\n } catch (HibernateException e) {\n e.getMessage();\n transaction.rollback();\n } finally {\n session.close();\n }\n }", "public void saveUsers(@ModelAttribute(\"users\") Users user) {\n\t\t\r\n\t\tusersService.saveUsers(user);\r\n\t\t\r\n\t}", "private void addUserToDatabase( DatabaseReference postRef) {\n\n // check username, password cannot be null and may not have spaces\n final String usernameChecked = checkNullString(usernameText.getText().toString());\n final String password = checkNullString(passwordText.getText().toString());\n final String confirmPassword = checkNullString(confirmPasswordText.getText().toString());\n\n if (usernameChecked == null || password == null) {\n Toast.makeText(this, \"Entries may not be null, and may not have spaces!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (!password.equals(confirmPassword)){\n Toast.makeText(this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (users.contains(usernameChecked)){\n Toast.makeText(this, \"Username is already taken\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // initialize data for SentCount\n postRef\n .child(\"Users\")\n .child(usernameChecked)\n .runTransaction(new Transaction.Handler() {\n\n @NonNull\n @Override\n public Transaction.Result doTransaction(@NonNull MutableData currentData) {\n User newUser = new User(usernameChecked, password);\n currentData.setValue(newUser);\n return Transaction.success(currentData);\n }\n\n @Override\n public void onComplete(@Nullable DatabaseError error, boolean committed,\n @Nullable DataSnapshot currentData) {\n Log.d(TAG, \"postTransaction:onComplete:\" + currentData);\n Toast.makeText(getApplicationContext(), \"Sign up successful!\", Toast.LENGTH_LONG);\n finish();\n }\n });\n }", "public void addUser(Customer user) {}", "public void addNewUser(User user) throws SQLException {\n PreparedStatement pr = connection.prepareStatement(Queries.insertNewUser);\n pr.setString(1, user.getUserFullName());\n pr.setString(2, user.getUserEmail());\n pr.setInt(3, user.getPhoneNumber());\n pr.setString(4, user.getUserLoginName());\n pr.setString(5, user.getUserPassword());\n pr.execute();\n pr.close();\n }", "public int createUser(Users user) {\n\t\t int result = getTemplate().update(INSERT_users_RECORD,user.getUsername(),user.getPassword(),user.getFirstname(),user.getLastname(),user.getMobilenumber());\n\t\t\treturn result;\n\t\t\n\t\n\t}", "@Override\n public void addUser(User u) {\n Session session = this.sessionFactory.getCurrentSession();\n session.persist(u);\n logger.info(\"User saved successfully, User Details=\"+u);\n }", "int insert(ROmUsers record);", "public Boolean addUser( User user){\n\t\tConnection connection = db.getConnection();\n\t\tPreparedStatement stmt = null;\n\t\ttry { \n\t\t\tString sql = \"INSERT INTO USER\" +\n\t\t\t\t\t\"(username, password, firstname, lastname, email, recordsindexed, batchid)\" + \n\t\t\t\t\t\"\t\t\t\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?)\";\n\t\t\tstmt = connection.prepareStatement(sql); \n\t\t\tstmt.setString(1, user.getUsername()); \n\t\t\tstmt.setString(2, user.getPassword()); \n\t\t\tstmt.setString(3, user.getFirstname()); \n\t\t\tstmt.setString(4, user.getLastname()); \n\t\t\tstmt.setString(5, user.getEmail());\n\t\t\tstmt.setInt(6, user.getNumIndexedRecords());\n\t\t\tstmt.setInt(7, user.getCurBatchId());\n\n\t\t\tstmt.executeUpdate();\t\n\t\t\tstmt.close();\n\t\t} \n\t\tcatch (SQLException e) { \n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} \n\t\treturn true;\n\t}", "public void addUser(String name,String password) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_USERNAME, name); // UserName\n values.put(KEY_PASSWORD,password);\n // Inserting Row\n long id = db.insert(TABLE_USER, null, values);\n //db.close(); // Closing database connection\n\n Log.d(TAG, \"New user inserted into sqlite: \" + id);\n }", "@Override\r\n\tpublic void add() {\n\t\tif(alreadyAdded()) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Member is already added\");\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\t\ttry(Connection connection= db.getConnection();) {\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString addString=\"INSERT INTO members VALUES(?,?,?,?)\";\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(addString);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t\t\tpreparedStatement.setString(2, super.getNameString());\r\n\t\t\t\tpreparedStatement.setString(3, super.getSurnameString());\r\n\t\t\t\tpreparedStatement.setString(4, super.getEmailString());\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t \r\n\t\t\r\n\t}", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"unused\" })\n\tprivate void addUser(TextField nameField, TextField passwordField) {\n\t\t\n\t\tString name = nameField.getText();\n\t\tString password = passwordField.getText();\n\t\tname.trim();\n\t\tpassword.trim();\n\t\t\n\t\tif(name.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user name!\");\n\t\t}\n\t\telse if(password.isEmpty()) {\n\t\t\tAlertMe alert = new AlertMe(\"You must enter a user password!\");\n\t\t}\n\t\telse if(admin == null) {\n\t\t\tAlertMe alert = new AlertMe(\"You must select an account type!\");\n\t\t}\n\t\telse {\n\t\t\tArrayList<Student> students = JukeBox.getUsers();\n\t\t\t\n\t\t\tif(JukeBox.locateUser(name) != -1) {\n\t\t\t\tAlertMe alert = new AlertMe(\"User \" + name + \" already exists!\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tStudent newStudent;\n\t\t\t\tif(admin) {\n\t\t\t\t\tnewStudent = new Student(name, password, true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tnewStudent = new Student(name, password, false);\n\t\t\t\t}\n\t\t\t\tstudents.add(newStudent);\n\t\t\t\t\n\t\t\t\tnameField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\n\t\t\t\tusers.setItems(null); \n\t\t\t\tusers.layout(); \n\n\t\t\t\tObservableList<Student> data = FXCollections.observableArrayList(JukeBox.getUsers());\n\t\t\t\tusers.setItems(data);\n\t\t\t}\n\t\t}\n\t}", "public void addToUsermetaUserLevel(Users users, int countUsers) {\n Connection connection = connectionDB.openConnection();\n PreparedStatement preparedStatement;\n try {\n preparedStatement = connection.prepareStatement(WP_USERMETA_USER_LEVEL);\n preparedStatement.setInt(1, countUsers);\n preparedStatement.setString(2, users.getWp_user_level());\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n connectionDB.closeConnection(connection);\n }\n }", "@Override\r\n\tpublic boolean addUser(user user) {\n\t\tif(userdao.insert(user)==1){\r\n\t\t\treturn true;}else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}", "private void addToUsers(final int id, String username) {\n UserRequests.AddUserModel addUserModel = new UserRequests.AddUserModel(id, username);\n\n Response.Listener<UserRecord> responseListener = new Response.Listener<UserRecord>() {\n @Override\n public void onResponse(UserRecord response) {\n progressDialog.cancel();\n if (response != null && response.getId() == id) {\n showResults();\n } else {\n Log.d(TAG, \"Error\");\n }\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String err = (error.getMessage() == null) ? \"error message null\" : error.getMessage();\n Log.d(TAG, err);\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n };\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_add_user));\n UserRequests addUserRequest = UserRequests.addUser(this,\n addUserModel, responseListener, errorListener);\n if (addUserRequest != null) addUserRequest.setTag(CANCEL_TAG);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(addUserRequest);\n }", "public void addAccount(String user, String password);", "@Override\n\tpublic void addUser(User user) {\n mapper.addUser(user);\n\t}", "@Override\n\tpublic void insert(User objetc) {\n\t\tuserDao.insert(objetc);\n\t\t\n\t}", "public void saveNewUser(String username) {\r\n\r\n\t\ttry {\r\n\t Statement statement = connection.createStatement();\r\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t statement.executeUpdate(\"insert into users values(null, '\" + username + \"')\");\r\n\t\t}\r\n\t catch(SQLException e)\r\n\t {\r\n\t // if the error message is \"out of memory\", \r\n\t // it probably means no database file is found\r\n\t System.err.println(e.getMessage());\r\n\t \r\n\t }\r\n\r\n\t}", "public String add() {\r\n\t\tuserAdd = new User();\r\n\t\treturn \"add\";\r\n\t}", "public String create() {\r\n\t\tuserService.create(userAdd);\r\n\t\tusers.setWrappedData(userService.list());\r\n\t\treturn \"create\";\r\n\t}", "@Override\n\tpublic void add(UserModel um) throws Exception {\n\t\tuserMapper.insert(um);\n\t}", "private static void saveNewUserTest(Connection conn) {\n\n\t\tUser user1 = new User();\n\t\tuser1.setUsername(\"john\");\n\t\tuser1.setPassword(\"123\");\n\t\tuser1.setEmail(\"[email protected]\");\n\t\ttry {\n\t\t\tuser1.saveToDB(conn);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void addUserToDb(Person person) {\n\n //converting person's data for SQL database\n String name = person.getName();\n int height = person.getHeight();\n double weight = person.getWeight();\n double waist = person.getWaistCircumference();\n int multiplier = person.getMultiplier();\n double calorieRate = person.getCalorieRate();\n String lastDate = getTodaysDate();\n\n //using data to create a query\n String dbQuery = \"INSERT INTO users(username, userheight, userweight, userwaist, usermultiplier, usercaloryrate, lastdate) \" +\n \"VALUES ('\" + name + \"', \" + height + \", \" + weight + \", \" + waist + \", \" +\n multiplier + \", \" + calorieRate + \", '\" + lastDate + \"')\";\n\n //sending a query and effectively adding user to the DB. Setting sql generated ID to the java object\n int personsId = DbConnector.addingNewRecordToDb(dbQuery);\n person.setId(personsId);\n }", "public void addUser(ArrayList<User> users) {\n comboCreateBox.removeAllItems();\n for (User usr : users) {\n comboCreateBox.addItem(usr.getUsername());\n }\n }", "public void addingNewUser() throws Exception {\n\t\tlog.info(\"Started ----- Adding New User -----\");\n\t\tFirstNameField.sendKeys(pr.loaddata(\"FirstNameField\"));\n\t\tExcelAPI e=new ExcelAPI(System.getProperty(\"user.dir\")\n\t\t\t\t+ \"/src/main/java/WebTesting/AutomationTask/TestData/AutomationTask_TestData.xlsx\");\n\t\tint rcnt = e.getRowCount(\"Task2_TestData\");\n\t\tfor (int i = 1; i < rcnt; i++) {\n\t\t\tLastNameField.clear();\n\t\t\tLastNameField.sendKeys(e.getCellData(\"Task2_TestData\", \"Last Name\", i));\n\t\t\tPasswordField.sendKeys(e.getCellData(\"Task2_TestData\", \"Password\", i));\n\t\t\tEmailField.sendKeys(e.getCellData(\"Task2_TestData\", \"Email\", i));\n\t\t}\n\t\tUserNameField.sendKeys(pr.loaddata(\"username\") + pr.randomusername());\n\t\tWebElement radio_Button = CustomerField;\n\t\tif (!radio_Button.isSelected()) {\n\t\t\tCustomerField.click();\n\t\t\tThread.sleep(1000);\n\t\t}\n\t\tRoleField.click();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); // Implicitly Wait\n\t\tPhoneField.sendKeys(pr.loaddata(\"phonenumber\") + pr.randomphonenumber());\n\t\tSaveButtonField.click();\n\t\twaitforElement(SearchField, 30); // Explicitly Wait\n\t\tlog.info(\"Ended ----- Adding New User -----\");\n\t}", "public void addUser(TIdentifiable user) {\r\n\t // make sure that the user doesn't exists already\r\n\t if (userExists(user)) return;\r\n\t \r\n\t // check to see if we need to expand the array:\r\n\t if (m_current_users_count == m_current_max_users) expandTable(2, 1);\t \r\n\t m_users.addID(user);\r\n\t m_current_users_count++;\r\n }" ]
[ "0.77688086", "0.76680017", "0.7514696", "0.7508544", "0.74693865", "0.7362627", "0.7335788", "0.7335788", "0.72705656", "0.7249984", "0.72345394", "0.7147722", "0.71135116", "0.70891446", "0.70748556", "0.70522434", "0.70271295", "0.6988714", "0.6917955", "0.6899528", "0.6870544", "0.685849", "0.685522", "0.67922944", "0.67901963", "0.6789517", "0.6785402", "0.67852", "0.677967", "0.67752075", "0.6770543", "0.6729346", "0.67280763", "0.6727074", "0.6717071", "0.6714631", "0.6712836", "0.6701587", "0.6700532", "0.6698255", "0.6689451", "0.6679045", "0.6663323", "0.66554016", "0.6637593", "0.66366905", "0.66314393", "0.6630101", "0.6629436", "0.6607774", "0.65942633", "0.6593711", "0.6593151", "0.65901774", "0.6579119", "0.656869", "0.65471894", "0.6539359", "0.6532774", "0.652693", "0.65237284", "0.6508674", "0.6505598", "0.65031004", "0.65008825", "0.64963096", "0.6495651", "0.6492333", "0.6491218", "0.64837784", "0.6479969", "0.64713913", "0.6470634", "0.64661986", "0.6455386", "0.64493465", "0.64423364", "0.6442058", "0.6431583", "0.64291424", "0.6417862", "0.641767", "0.64152414", "0.64151305", "0.64144903", "0.6412205", "0.64101976", "0.6401754", "0.6400802", "0.63993245", "0.63984066", "0.6388355", "0.6388267", "0.6381637", "0.6381512", "0.63788456", "0.63763255", "0.6376156", "0.63753366", "0.6375081", "0.63701636" ]
0.0
-1
Besides the value, also contains a version and expiration information.
public interface MetadataValue<V> extends VersionedValue<V> { long getCreated(); int getLifespan(); long getLastUsed(); int getMaxIdle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getExpiration() {\n return this.expiration;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"value:%s;expiry:%s\", value,\n\t\t\t\tTimeHepler.getStringDateShort(expiry));\n\t}", "public long getExpiration() {\n return expiration;\n }", "public Timestamp getExpirationDate() {\n return expirationDate;\n }", "public String getExpirationDate() { return date; }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "@java.lang.Override\n public long getExpirationDate() {\n return expirationDate_;\n }", "public Integer getExpiry() {\n return expiry;\n }", "@Override\n public Date getExpiration()\n {\n return null;\n }", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public Date getExpirationDate() {\r\n return expirationDate;\r\n }", "@java.lang.Override\n public long getExpires() {\n return instance.getExpires();\n }", "public int getExpiry()\n {\n return expiry;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Date getExpirationDate() {\n return expirationDate;\n }", "public Timestamp getDateExpiry( )\r\n {\r\n return _tDateExpiry;\r\n }", "@java.lang.Override\n public long getExpires() {\n return expires_;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getExpirationDate();", "public long getExpirationDate() {\n return expirationDate_;\n }", "public String getExpirationDate() {\r\n\t\treturn expirationDate;\r\n\t}", "public String getExpiryDate() {\n return this.expiryDate;\n }", "public SIPDateOrDeltaSeconds getExpiryDate() {\n return expiryDate ;\n }", "@ApiModelProperty(required = false, value = \"epoch timestamp in milliseconds\")\n public Long getExpires() {\n return expires;\n }", "public long getExpirationDate() {\n return expirationDate_;\n }", "@SuppressWarnings(\"unused\")\n private Long getVersion() {\n return version;\n }", "public BigDecimal getVersion() {\r\n return version;\r\n }", "public int getExpiry();", "public long getExpiry() {\n return this.expiry;\n }", "String getExpiry();", "public String getVersion(){\r\n return version;\r\n }", "public Date getExpiryDate() {\n return expiryDate;\n }", "public Date getExpires() {\r\n return expiresDate;\r\n }", "long getExpiration();", "public long getExpires()\r\n/* 229: */ {\r\n/* 230:347 */ return getFirstDate(\"Expires\");\r\n/* 231: */ }", "public Date getExpiryDate()\n {\n return expiryDate;\n }", "long getExpiryTime() {\n return expiryTime;\n }", "String getSpecifiedExpiry();", "@Override\n public void setExpiration( Date arg0)\n {\n \n }", "public DateTime expiryTime() {\n return this.expiryTime;\n }", "public long getExpiryTime()\n {\n return m_metaInf.getExpiryTime();\n }", "public Date getExpirationDate() {\n\t\treturn expirationDate;\n\t}", "public Date getExpirationDate() {\n\t\treturn expirationDate;\n\t}", "public java.util.Date getExpirationDate() {\n return this.expirationDate;\n }", "public Date getExpirationTime() {\n return expirationTime;\n }", "public long getExpires() {\n return expires;\n }", "@Override\n @XmlElement(name = \"version\", required = true)\n public synchronized InternationalString getVersion() {\n return version;\n }", "@Range(min = 0)\n\t@NotNull\n\tpublic Integer getExpiration() {\n\t\treturn this.expiration;\n\t}", "public int getExpiryTime() {\n return expiryTime;\n }", "protected VersionData() {}", "public Timestamp getVersion() {\n return mVersion;\n }", "public java.math.BigInteger getExpirationYear() {\r\n return expirationYear;\r\n }", "public Date\ngetExpire() {\n\treturn expire;\n}", "public String getVersion () {\r\n return version;\r\n }", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "public Float getVersion() { return version; }", "public String getVersion() {\r\n return version;\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return this.version;\n }", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "public String getVersion() {\n return _version;\n }", "public String getVersion()\n\t{\n\t\treturn \"$Date$\";\n\t}", "public String getExpiresString() {\n return expiresString;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "public String version() {\n return this.version;\n }", "long getExpirationDate();", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "private void setExpires(long value) {\n bitField0_ |= 0x00000004;\n expires_ = value;\n }", "public String getVersionDate();", "@java.lang.Override\n public boolean hasExpirationDate() {\n return ((bitField0_ & 0x00000020) != 0);\n }", "public String getReleaseDate() {\r\n return releaseDate;\r\n }", "public String getVersion()\n {\n return version;\n }", "public long getExpiresIn() {\n return expiresIn;\n }", "public long getVersion() {\n return version;\n }", "public long getVersion() {\n return version;\n }", "public java.util.Calendar getExpirationDate() {\n return expirationDate;\n }", "public long getVersion(){\n return localVersion;\n }", "public String getVersion() {\r\n\t\treturn version;\r\n\t}", "public Date getVersionDate ();", "public Integer getVersion() {\r\n return version;\r\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public String getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public Long getVersion() {\n return version;\n }", "public CachetVersion getVersion() {\n JsonNode rootNode = get(\"version\");\n CachetVersion version = CachetVersion.parseRootNode(rootNode);\n\nSystem.out.println(\"SSDEDBUG: version = \" + version.getVersion() + \" (latest=\" + version.isLatest() + \")\");\n return version;\n }" ]
[ "0.65693164", "0.6368129", "0.6327676", "0.63065594", "0.6273968", "0.62186384", "0.6185945", "0.6146828", "0.6146412", "0.6093724", "0.6092118", "0.607364", "0.6063143", "0.60579985", "0.60579985", "0.6016786", "0.5992321", "0.5991394", "0.59828305", "0.59815556", "0.59805703", "0.59741116", "0.5969375", "0.5962296", "0.5960965", "0.59444594", "0.5942714", "0.5942461", "0.5937664", "0.5934374", "0.5920656", "0.5914952", "0.5895167", "0.58946985", "0.5892556", "0.5889393", "0.58517724", "0.5847775", "0.58295256", "0.58261937", "0.5817725", "0.5817725", "0.5797778", "0.578162", "0.5775746", "0.5775732", "0.57590526", "0.5754204", "0.5743412", "0.5738232", "0.57291037", "0.5728602", "0.5723001", "0.5699592", "0.56592137", "0.5658311", "0.56499964", "0.56499964", "0.56439775", "0.5630606", "0.5625503", "0.5625503", "0.5623794", "0.5612894", "0.5605629", "0.56026614", "0.56026614", "0.56026614", "0.56026614", "0.5602567", "0.5599314", "0.5598257", "0.55897146", "0.5589566", "0.5586965", "0.5578117", "0.5571977", "0.55666536", "0.55666536", "0.5558515", "0.5555523", "0.55532515", "0.55531025", "0.5551195", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5550594", "0.5546371", "0.5546371", "0.5546371", "0.5546371", "0.5537191" ]
0.6483819
1
Delete a Record in Database
private void DeleteRecord() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Enter Roll no of Student to Delete"); final EditText input = new EditText(this); input.setInputType(InputType.TYPE_CLASS_TEXT); builder.setView(input); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { String mrollno=String.valueOf(input.getText()); Toast.makeText(getApplicationContext(),"Ciev", Toast.LENGTH_LONG).show(); dbInstance.execSQL("DELETE FROM studentWHERE rollno='"+mrollno+"'"); Toast.makeText(getApplicationContext(),"Record is Deleted", Toast.LENGTH_LONG).show(); } }); builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); builder.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.delete(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "public void deleteRecord() {\n// foods.clear();\n// try {\n// FoodRecordDao dao = new FoodRecordDao();\n// dao.saveFoodRecords(foods);\n// } catch (DaoException ex) {\n// Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n// }\n }", "protected void deleteRecord() throws DAOException {\r\n\t\t// Elimina relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.delete(relco);\r\n\t\t}\r\n\t\t// Elimina objeto\r\n\t\tobjectDao.delete(object);\r\n\t}", "int deleteByPrimaryKey(Integer recordId);", "int deleteByPrimaryKey(PersonRegisterDo record);", "@Override\n public int deleteByPrimaryKey(BorrowDO record){\n return borrowExtMapper.deleteByPrimaryKey(record);\n }", "public void deleteRecord() {\n\n new BackgroundDeleteTask().execute();\n }", "public void deleteUserRecord() {\n\t\tSystem.out.println(\"Calling deleteUserRecord() Method To Delete User Record\");\n\t\tuserDAO.deleteUser(user);\n\t}", "@Override\r\n public long deleteRecord(Object o) throws SQLException {\r\n String sql = \"delete from patient where patientid = ?\";\r\n long result = -1;\r\n PatientBean pb;\r\n\r\n try (PreparedStatement pStatement = connection.prepareStatement(sql);) {\r\n pb = (PatientBean) o;\r\n pStatement.setLong(1, pb.getPatientID());\r\n\r\n result = pStatement.executeUpdate();\r\n }\r\n\r\n logger.info(\"Patient record has been deleted: patient id \" + pb.getPatientID() + \", \" + result + \" row(s) affected\");\r\n\r\n return result;\r\n }", "int deleteByPrimaryKey(GpPubgPlayer record);", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t}", "void delete ( int id ) throws DAOException;", "public void deleteRecord(Record record, String clientName, String assessmentYear, String taxType, String paymentDate, String paymentAmount) {\n String delete = \"DELETE FROM \" + TABLE_RECORDS + \" WHERE \" + COLUMN_NAME + \"=\\\"\" + clientName + \"\\\" AND \" + COLUMN_ASSESSMENT_YEAR + \"=\\\"\" + assessmentYear + \"\\\" AND \" +\n COLUMN_IT_GST + \"=\\\"\" + taxType + \"\\\" AND \" + COLUMN_PAYMENT_DATE + \"=\\\"\" + paymentDate + \"\\\" AND \" + COLUMN_PAYMENT_AMOUNT + \"=\\\"\" + paymentAmount + \"\\\"\";\n records.remove(record);\n\n try {\n statement = connection.prepareStatement(delete);\n statement.executeUpdate();\n logFile.modifyLogFile(\"Data successfully deleted from database\");\n } catch (SQLException e) {\n logFile.modifyLogFile(\"Error deleting record : \" + e.getMessage());\n e.printStackTrace();\n }\n }", "int deleteByPrimaryKey(String samId);", "private void deleteRecord(){\n if (mCurrentSymptomUri != null) {\n // pull out the string value we are trying to delete\n mEditSymptomText = findViewById(R.id.edit_symptoms);\n String deleteTry = mEditSymptomText.getText().toString();\n\n // set up the ContentProvider query\n String[] projection = {_IDST, SymTraxContract.SymTraxTableSchema.C_SYMPTOM};\n String selectionClause = SymTraxContract.SymTraxTableSchema.C_SYMPTOM + \" = ? \";\n String[] selectionArgs = {deleteTry};\n\n Cursor c = getContentResolver().query(\n SYM_TRAX_URI,\n projection,\n selectionClause,\n selectionArgs,\n null );\n\n // if there are no instances of the deleteTry string in the Machines DB\n // Go ahead and try to delete. If deleteTry value is in CMachineType column do not delete (no cascade delete)\n if (!c.moveToFirst()){\n int rowsDeleted = getContentResolver().delete(mCurrentSymptomUri, null, null);\n if (rowsDeleted == 0) {\n Toast.makeText(this, getString(R.string.delete_record_failure),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, getString(R.string.delete_record_success),\n Toast.LENGTH_SHORT).show();\n }\n c.close();\n finish(); // after deleting field value\n } else {\n c.close();\n showNoCascadeDeleteDialog();\n }\n }\n }", "int deleteById(ID id) throws SQLException, DaoException;", "int delete(Long id) throws SQLException, DAOException;", "int deleteByPrimaryKey(String idTipoPersona) throws SQLException;", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "int deleteByPrimaryKey(String maht);", "int deleteByPrimaryKey(String objId);", "int deleteByPrimaryKey(String objId);", "int deleteByPrimaryKey(String detailId);", "public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "public void delete(RutaPk pk) throws RutaDaoException;", "int deleteByPrimaryKey(String fucno);", "@Override\n\tpublic MahasiswaModel delete(String nik) throws SQLException {\n\t\tdeleteStatement.setString(1, nik);\n\t\tdeleteStatement.executeUpdate();\n\t\treturn null;\n\t}", "public void delete(int id) throws DAOException;", "@Override\n public int deleteByPrimaryKey(Ares2ClusterDO record) {\n return ares2ClusterExtMapper.deleteByPrimaryKey(record);\n }", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\r\n\tpublic void delete() {\n\t\tString delete=\"DELETE FROM members WHERE id =?\";\r\n\t\t try(Connection connection=db.getConnection();) {\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(delete);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t \tpreparedStatement.executeUpdate();\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction successful\");\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t}\r\n\t}", "int deleteByExample(LoginRecordDOExample example);", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "public void delete(Object obj) throws SQLException {\n\r\n\t}", "int deleteByPrimaryKey(Long idreg);", "public abstract boolean delete(PK id);", "int deleteByPrimaryKey(Long personId);", "int deleteByPrimaryKey(String taxregcode);", "int deleteByPrimaryKey(Long autoid);", "int deleteByPrimaryKey(String registerId);", "public void delete(Employee employee) {\r\n\r\n String sql = \"delete from db.emp where id= ?\";\r\n try {\r\n Connection connection = ConnectDB();\r\n PreparedStatement preparedStatement = connection.prepareStatement(sql);\r\n preparedStatement.setInt(1,employee.getId());\r\n\r\n int rows=preparedStatement.executeUpdate();\r\n String message=rows==1 ? \"A fost sters cu succes\": \"Nu este nimic de sters\";\r\n\r\n System.out.println(message);\r\n\r\n } catch (SQLException Ex) {\r\n System.out.println(Ex.getMessage());\r\n System.out.println(\"Eroare la stergere\"+ Ex.getMessage());\r\n\r\n }\r\n }", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "public boolean del() {\n return db.delete (TABLE, createWhere());\n }", "int deleteByPrimaryKey(Long researchid);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);", "int deleteByPrimaryKey(String id);" ]
[ "0.7673416", "0.7645139", "0.76233995", "0.75802433", "0.7541344", "0.7514147", "0.7454727", "0.740151", "0.73605305", "0.7353749", "0.72510195", "0.7243198", "0.7209222", "0.7191327", "0.7183535", "0.71477515", "0.71470165", "0.7122797", "0.71154416", "0.7114476", "0.7097285", "0.7094026", "0.70799124", "0.70799124", "0.7074572", "0.70672035", "0.70639944", "0.7060083", "0.70516384", "0.7047182", "0.70449364", "0.70328444", "0.7022518", "0.7022518", "0.7018483", "0.7017458", "0.6996713", "0.6977985", "0.6962361", "0.69607437", "0.6948433", "0.6944906", "0.69372666", "0.69231004", "0.69220537", "0.6902022", "0.68988305", "0.68960893", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995", "0.6890995" ]
0.0
-1
Main method which is starting the game
public void startGame() { // Initialize both players players[0] = new Player("Paras", true); players[1] = new Player("Computer", false); // Initialize ChessBoard board = new ChessBoard(8); movesPlayed = new ArrayList<>(); // Keep playing game until GameStatus is BLACK_WIN or WHITE_WIN while (true) { processTurn(players[0]); if (this.status == GameStatus.WHITE_WIN) { System.out.println("P1 win!"); break; } processTurn(players[1]); if (this.status == GameStatus.BLACK_WIN) { System.out.println("P2 win!"); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n MainGameClass mg=new MainGameClass();\n mg.start();\n \n \n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n Game game = new Game(\"Programming 2 Project\",600,600);\n game.start();\n \n }", "public static void main(String[] args) {\n init();\n\n //take input from the players before starting the game\n input();\n\n //the gameplay begins from here\n System.out.println();\n System.out.println();\n System.out.println(\"***** Game starts *****\");\n play();\n }", "public static void main(String[] args) {\n game();\n }", "public static void main(String args[]) {\n (new Game()).start();\n }", "public static void main(String[] args){\n try {\n GameClient.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tGame game = new Game();\n\t\t//game.playGame();\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"Welcome to TEAM-11 Game\");\n new GameEngine().start();\n }", "public static void main(String[] args){\n DotComBust game = new DotComBust();\n game.setUpGame();\n game.startPlaying();\n }", "public static void main(String[] args) {\n\t\tGame myGame = new Game();\n\t\tmyGame.start();\n\t}", "public static void main(String[] args) {\n clock = new GameClock();\n ProjectGame game = new ProjectGame();\n game.start();\n\n\n }", "private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}", "public static void main(String args[]) {\n (new Game()).play();\n }", "public void run() {\n\t\tprepareVariables(true);\n\t\t\n\t\t// Prepares Map Tables for Song and Key Info.\n\t\tprepareTables();\n\t\t\n\t\t// Selects a Random Song.\n\t\tchooseSong(rgen.nextInt(0, songlist.size()-1));\n\t\t\n\t\t// Generates layout.\n\t\tgenerateLabels();\n\t\tgenerateLines();\n\t\t\n\t\t// Listeners\n\t\taddMouseListeners();\n\t\taddKeyListeners();\n\t\t\n\t\t// Game Starts\n\t\tplayGame();\n\t}", "public void startGame() {\r\n this.setupGame();\r\n }", "public static void main(String[] args) {\n setUpGamePlayer();\r\n \r\n //display of game board for computer\r\n setUpGameComp();\r\n System.out.println();\r\n \r\n System.out.println();\r\n System.out.println();\r\n \r\n //starting game\r\n // code incomplete to play game\r\n //playGame();\r\n }", "public static void main(String[] args)\n {\n //Create an instance of the game\n game Game = new game(PAGE_HEIGHT,PAGE_WIDTH,PAGE_TITLE);\n \n //Start the game loop\n Game.start();\n }", "public void start() {\n ArrayList<String> names = new ArrayList<>();\n game.initialize(names);\n //game.play(this.mainPkmn, this.attack);\n\n }", "public static void main(String arg[]){\r\n GameContainer gc = new GameContainer(new GameManager());\r\n\r\n gc.setWidth(400);\r\n gc.setHeight(300);\r\n gc.setScale(2);\r\n\r\n gc.setClearScreen(true);\r\n gc.setLightEnable(true);\r\n gc.setDynamicLights(true);\r\n gc.start();\r\n }", "public static void main(String[] args) {\n GameEx gameEx = new GameEx();\n\n gameEx.play();\n }", "public static void main(String[] args) {\n // TODO code application logic here\n //play();//This method will start the 20 minute battle scene music\n gameplay = true;\n while(gameplay) {\n /*#extra credit made a separate class and music selector below:*/\n Luong_7_audioclass pl = new Luong_7_audioclass();//this is how to use classes, pl._ to start the methods\n pl.soundsystem_commands();//this is the object used to call upon the public method sound system\n intro();//starts the game \n } \n }", "public void startProgram()\r\n\t{\r\n\t\tview.displayPlayerNames();\r\n\t\tview.loadGameData();\r\n\t\tview.displayGame();\r\n\t}", "public static void main(String[] args)\r\n\t{\r\n\t\tnew SimpleGame();\r\n\t}", "public static void main(String[] args) {\n Game game = new Game();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tResources.setEncoding(Resources.ENCODING_UTF_8);\r\n\t\tGame.setInfo(\"gameInfo.xml\");\r\n\t\tGame.init();\r\n\t\tGame.getRenderEngine().setBaseRenderScale((float) 2);\r\n\t\tGame.getScreenManager().setResolution(Resolution.custom(1280, 720, \"1280*720\"));\r\n\t\tGame.getScreenManager().addScreen(new mainMenu());\r\n\t\tGame.getScreenManager().addScreen(mainGameScreen.getInstance());\r\n\t\tGame.getScreenManager().displayScreen(mainMenu.NAME);\r\n\t\tGame.start();\r\n\t\tSystem.out.println(\"Game version is: \" + Game.getInfo().getVersion());\r\n\t\tSystem.out.println(\"Currently active screen: \" + Game.getScreenManager().getCurrentScreen().getName());\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Game game = new HaMGame();\n game.playGame();\n }", "public static void main(String[] args){\n GameFrame frame = new GameFrame(1);\n frame.run();\n }", "public static void main(String[] args) {\r\n\r\n\t\tGame game = new Game();\r\n\r\n\t}", "public static void main(String[] args){\n\t\tnew GamePanel(790,630); //Sonst grauer Streifen an den Rändern rechts und unten\n\t}", "public static void main(String[] args) {\n\t\tGameEnvironment runningGame = new GameEnvironment();\n\t\trunningGame.launchStartupScreen();\n\t}", "public static void main(String[] args) {\n\t\tgame(1);\r\n\t}", "public static void main(String[] args) throws Exception {\r\n\t\tGame game = new Game();\r\n\t\tgame.start(true,null,null,null);\r\n\t}", "public static void main(String[] args) {\n int width = 800;\n int height = 600;\n Game game = new Game(width, height);\n game.start();\n }", "public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}", "public static void main(String[] args) {\n Properties props = new Properties();\n try {\n props.load(ResourceLoader.getResourceAsStream(\"game.properties\"));\n Config config = new Config(props);\n Game game = new Game(\"PlatformerState\");\n AppGameContainer app = new AppGameContainer(game);\n app.setIcons( new String[] {\"res/icon/16x16.png\", \"res/icon/32x32.png\"} ); //load icons\n app.setDisplayMode(config.getInteger(Config.WINDOW_WIDTH_CONFIG_KEY), \n config.getInteger(Config.WINDOW_HEIGHT_CONFIG_KEY), \n config.getBoolean(Config.WINDOW_FULLSCREEN_CONFIG_KEY));\n app.setTargetFrameRate(60);\n app.setShowFPS(false);\n app.start();\n } catch(IOException e) {\n e.printStackTrace();\n } catch(SlickException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tnew GameTest();\n\t}", "void startGame();", "void startGame();", "void startGame();", "public static void main(String[] args) {\n\n ConsoleChessGui gui = new ConsoleChessGui();\n GameController gameController = new GameController(gui);\n gameController.run();\n\n\n\n\n }", "public static void main(String[] args){\n\t\t\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGameLauncher gameLauncher = new GameLauncher();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}", "public static void main(String[] argv) {\n\t\ttry {\n\t\t\tAppGameContainer container = new AppGameContainer(new MyGame());\n\t\t\tcontainer.setDisplayMode(800, 600, false);\n\t\t\tcontainer.start();\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void runGame()\r\n\t{\r\n\t\tmainFrame.runGame();\r\n\t}", "public static void main(String[] args) {\n Model model = new Model();\n View view = new View(model);\n Controller controller = new Controller(model, view);\n\n /*main program (each loop):\n -player token gets set\n -game status gets shown visually and user input gets requested\n -game grid gets updated\n -if the game is determined: messages gets shown and a system exit gets called*/\n while (model.turnCounter < 10) {\n model.setToken();\n view.IO();\n controller.update();\n if (controller.checker()){\n System.out.println(\"player \" + model.playerToken + \" won!\");\n System.exit(1);\n }\n System.out.println(\"draw\");\n }\n }", "public static void main(String[] args) {\n\n ShapeGame shapeGame = new ShapeGame();\n shapeGame.run();\n }", "public static void main(String[] args) {\n\n\t\t// Aus diese Schleife sorgt dafür, das man ohne großen aufwand immer neu spielen kann\n\t\t// hier wird auch das spiel raus gestartet\n\t\twhile (true){\n\n\t\tboard = new Board(); //erstellt das Fenster des Spielfeldes\n\t\tgui = new GUI();\t//erstellt das Fenster des Einstellungs/Start fensters\n\t\tgui.checkBtnPlay(); //wird von hier aufgerufen damit gui nicht = null ist und objekt erstellung abgeschlossen wird\n\t\t\t\t\t\t\t//in dieser Funktion wird auch das spiel gestartet\n\n\t\t//Wenn man hier angekommen ist ist das Aktuelle spiel zuende\n\t\tboard.dispose();\n\n\n\n\t\t//Zurück setzen der der Richtung\n\t\t// 4 heißt keine Bewegung\n\t\tGame.p1direction = 4;\n\t\tGame.p2direction = 4;\n\t}\n\n\n\t\t\n\t}", "public void start() {\n\t\t// initialize stuff\n\t\tinitGL();\n\t\tinit();\n\t\t\n\t\t// main game loop\n\t\twhile (true) {\n\t\t\t// display the title screen\n\t\t\tshowTitleScreen();\n\t\t\t\n\t\t\twhile (!gameOver) {\n\t\t\t\tupdateDelta();\n\t\t\t\trender();\n\t\t\t\tpollInput();\n\t\t\t\tupdate();\n\t\t\t\tupdateDisplay();\n\t\t\t}\n\t\t\t// Game Over\n\t\t\ttry {\n\t\t\t\tThread.sleep(2500);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\tThread t = new Thread(new GameLauncher());\r\n\t\tt.start();\r\n\t}", "public static void main(String[] argv) {\r\n\t\tboolean sharedContextTest = false;\r\n\r\n\t\tAppGameContainer container = new AppGameContainer(new ImageCornerTest(), 800, 600, DisplayMode.Opt.WINDOWED);\r\n\t\tcontainer.setDisplayMode(800,600, DisplayMode.Opt.WINDOWED);\r\n\t\tcontainer.start();\r\n\t}", "public static void main(String[] args) {\n\t\t// System.out.println(Tile.class.getName());\n\t\tAppGameContainer app = null;\n\t\ttry {\n\t\t\tapp = new AppGameContainer(new GameStart());\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\t// app.setMinimumLogicUpdateInterval(TICK_TIME);\n\t\t\t// app.setMaximumLogicUpdateInterval(TICK_TIME);\n\t\t\tapp.setDisplayMode(WINDOW_WIDTH, WINDOW_HEIGHT, false);\n\t\t\tapp.start();\n\t\t} catch (SlickException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args){\n\t\tGameLoop game=new GameLoop();\n\t\tgame.registerGlobalCallbacks();\n\t\t//Game loop and setting initial scene\n\t\tmusic = new Sound(\"res\\\\Music.wav\");\n\t\tmusic.setLoop(true);\n\t\tgameOverMenu.setMusic(new Sound(\"res\\\\GameOver.wav\"));\n\t\ttimeText = new Text(screenWidth*9/10-100,screenHeight*1/32-20,20,20,\"\");\n\t\ttimeText.setColor(0, 0, 0);\n\t\tscoreText = new Text(screenWidth*9/10-100,screenHeight*1/32,20,20,\"\");\n\t\tscoreText.setColor(0, 0, 0);\n\t\twaveText = new Text(screenWidth*9/10-100,screenHeight*1/32+20,20,20,\"\");\n\t\twaveText.setColor(0, 0, 0);\n\t\t\n\t\tinitScene iLauncher = new initScene(game);\n\t\toLauncher = new overScene(game);\n\t\t\n\t\tmainMenu.addUnselItem(screenWidth/2-165, screenHeight/2-300, 50, 50, \"Spell Flingers\",0,0,1);\n\t\tmainMenu.addUnselItem(25, screenHeight-45, 20, 20, \"CONTROLS: WASD to move, esc to pause, and mouse buttons to cast spells!\",0,0,0);\n\t\tmainMenu.addUnselItem(screenWidth/2-265, screenHeight/2-308, 64, (Texture) SpellList.getTexture(Spell.ARCANE_MISSILE)[0]);\n\t\tmainMenu.addUnselItem(screenWidth/2+265, screenHeight/2-308, 64, (Texture) SpellList.getTexture(Spell.ARCANE_MISSILE)[0]);\n\t\tmainMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-100, 30, 30, \"Play Game\", 1, 0, 0, 0, 0, 0), iLauncher);\n\t\tmainMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-50, 30, 30, \"Exit\", 1, 0, 0, 0, 0, 0), null);\n\t\tmainMenu.select(0);\n\t\t\n\t\tpauseMenu.addUnselItem(screenWidth/2-165, screenHeight/2-300, 50, 50, \"PAUSED\",0,1,0);\n\t\tpauseMenu.addUnselItem(timeText);\n\t\tpauseMenu.addUnselItem(scoreText);\n\t\tpauseMenu.addUnselItem(waveText);\n\t\tpauseMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-100, 30, 30, \"Resume Game\", 1, 0, 0, 0, 0, 0), game);\n\t\tpauseMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2-50, 30, 30, \"Abandon Run\", 1, 0, 0, 0, 0, 0), oLauncher);\n\n\t\ttimeTextGO = new Text(screenWidth/2-165, 240, 20, 20,\"\");\n\t\ttimeTextGO.setColor(1, 1, 1);\n\t\tscoreTextGO = new Text(screenWidth/2-165, 270, 20, 20,\"\");\n\t\tscoreTextGO.setColor(1, 1, 1);\n\t\twaveTextGO = new Text(screenWidth/2-165, 300, 20, 20,\"\");\n\t\twaveTextGO.setColor(1, 1, 1);\n\t\tgameOverMenu.addUnselItem(screenWidth/2-165, 100, 50, 50, \"GAME OVER\",1,0,0);\n\t\tgameOverMenu.addUnselItem(timeTextGO);\n\t\tgameOverMenu.addUnselItem(scoreTextGO);\n\t\tgameOverMenu.addUnselItem(waveTextGO);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+50, 30, 30, \"New Game\", 1, 0, 0, 1, 1, 1), iLauncher);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+100, 30, 30, \"Return to Main Menu\", 1, 0, 0, 1, 1, 1), mainMenu);\n\t\tgameOverMenu.addSelItem(new Scenes.SelectableText(screenWidth/2-165, screenHeight/2+150, 30, 30, \"Exit\", 1, 0, 0, 1, 1, 1), null);\n\t\t\n\t\tgame.setScene(mainMenu);\n\t\tgame.gameLoop();\n\t}", "public static void main(String[] args){\n\t\t EventQueue.invokeLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t // create our game and set it to visible\n\t \tSnakeGame game = new SnakeGame();\n\t }\n\t });\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.printf(\"炒青菜的第一个小游戏\");\n\t\tBallGame game=new BallGame();\n\t\tgame.launchFrame();\n\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n new GameJFrame();\n // new DigitalWatch();\n }", "public static void main(String[] args) {\n\t\t// MarioGame game = new MarioGame();\n//\t\tChessGame game = new ChessGame();\n\n//\t\tGamingConsole game = new MarioGame();\n\t\tChessGame game = new ChessGame();\n\t\tgame.up();\n\t\tgame.down();\n\t\tgame.left();\n\t\tgame.right();\n\t}", "public final void start() {\n logger.info(\"Application started.\");\n try {\n getAttributes();\n\n initSystem();\n\n assertDisplayCreated();\n\n timer = Timer.getTimer();\n \n initGame();\n\n //main loop\n while (!finished && !display.isClosing()) {\n //determine time elapsed since last frame\n updateTime();\n\n //handle input events prior to updating the scene\n // - some applications may want to put this into update of the game state\n InputSystem.update();\n\n //update game state, pass amount of elapsed time\n update(frametime);\n\n //render, do not use interpolation parameter\n render(-1.0f);\n\n //swap buffers\n display.getRenderer().displayBackBuffer();\n\n Thread.yield();\n }\n } catch (Throwable t) {\n logger.logp(Level.SEVERE, this.getClass().toString(), \"start()\", \"Exception in game loop\", t);\n } finally {\n cleanup();\n }\n logger.info(\"Application ending.\");\n\n if (display != null) {\n display.reset();\n }\n quit();\n }", "public static void main(String[] args) { \n \tprintAvailableMaps();\n \t\n\t\tGame game = new Game();\n\t\tScanner input = game.openFile();\n \tgame.readMapFile(input);\n \tgame.prepareTable();\n \tTapeHead player = game.preparePlayer();\n \t//game.print();\n \twhile(true) {\n \t\tgame.GameRunning(player);\n \t} \n }", "public static void main(String[] args)\n {\n Game game = new Game(8);\n \n Turn turn = game.nextTurn();\n printStatus(turn);\n \n turn = game.nextTurn();\n printStatus(turn);\n }", "@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }", "@Override\n public void run(){\n Initialize();\n // Load game files (images, sounds, ...)\n LoadContent();\n \n Framework.gameState = Framework.GameState.PLAYING;\n }", "public static void main(String[] args) {\n GameApplication application = new GameApplication();\n application.startApplication(args);\n }", "@SuppressWarnings(\"unused\")\r\n\tpublic static void main(String[] args) {\n\t\tGame game = new Game();\r\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Starting...\");\r\n\t\ttry {\r\n\t\t\tCmdApp cmd = new CmdApp();\t\t\r\n\t\t\tcmd.launchGame();\t\t\t\r\n\t\t} catch (FileNotFoundException | LevelException | VacuumException | SpriteException e) {\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Finishing... bye!!\");\r\n\t}", "public ConsoleGame() {\n\t\tSystem.out.println(\"Welcome to Quoridor!\");\n\t\twhile (!setUp());\n\t}", "public static void main(String[] args)\n\t{\n\t\t// welcome message (call)\n\t\twelcome();\n\t\t\n\t\t// game call\n\t\tgame();\n\t\n\t}", "public static void startGame()\r\n\t{\r\n\t\tnew ModeFrame();\r\n\t}", "public static void main(String[] args){\n \t\tJFrame game = new theGame();\n \t\tgame.setVisible(true);\n \n \t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tGameGrafic game = null;\r\n\t\t\t\tGameState state = new GameState();\r\n\t\t\t\t// if (opt == 2) {\r\n\t\t\t\t// game = SaveGameOptions.load();\r\n\t\t\t\t// } else {\r\n\t\t\t\tgame = new GameGrafic(state);\r\n\t\t\t\t// }\r\n\r\n\t\t\t\tif (game != null) {\r\n\t\t\t\t\tgame.start();\r\n\t\t\t\t}\r\n\r\n\t\t\t}", "public static void main(String[] args) {\n\t\t\t\tAdditonGameMethod();\n\t\t\t}", "public static void main(String[] args) \r\n\t{\n\t\t\r\n\t\tboolean playing = false;\r\n\t\t\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tString option = menu();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"\\n\\n\\n\\n\\n\\n\");\r\n\t\t\t\r\n\t\t\tif(option.equals(\"1\"))\r\n\t\t\t{\r\n\t\t\t\tcreateGame();\r\n\t\t\t\tplaying = true;\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"2\"))\r\n\t\t\t{\r\n\t\t\t\tcontinueGame();\r\n\t\t\t\tplaying = true;\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"3\"))\r\n\t\t\t{\r\n\t\t\t\tdeleteGames();\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"4\"))\r\n\t\t\t{\r\n\t\t\t\tGameManager.instance().viewHallOfFame();\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t\telse if(option.equals(\"5\"))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Thanks for playing Rogue Lands\");\r\n\t\t\t\t\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid option\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(playing)\r\n\t\t\t{\t\r\n\t\t\t\tboolean ans = Game.instance().Load();\r\n\t\t\t\t\r\n\t\t\t\tif(!ans) continue;\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().AssembleScene();\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().Setup();\r\n\t\t\t\t\r\n\t\t\t\tGame.instance().Play();\r\n\t\t\t\t\r\n\t\t\t\tplaying = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws InterruptedException {\n runGame();\n System.out.println(\"Game has finished\");\n\n }", "public static void main(String[] args) {\r\n\t\tTicketToRide myGame = new TicketToRide();\r\n\t\tmyGame.setFramesPerSecond(60);\r\n\r\n\t\t/*\r\n\t\t * Initialize two players. This can be any combination of human players\r\n\t\t * or AI players\r\n\t\t */\r\n\t\tPlayer player1 = new SuperPlayer();\r\n\t\tPlayer player2 = new ShaoPlayer();\r\n\r\n\t\t/* Setup the scene, and get the game started */\r\n\t\tTTRGamePlayScene scene = new TTRGamePlayScene(\"Ticket To Ride\",\r\n\t\t\t\t\"woodBacking.jpg\", myGame, player1, player2);\r\n\t\tmyGame.setCurrentScene(scene);\r\n\t\tplayer1.setScene(scene);\r\n\t\tplayer2.setScene(scene);\r\n\t\tmyGame.start();\r\n\t\tscene.playGame();\r\n\t}", "public void run() {\n \twhile(true) {\n \t \tsetupGame();\n \tplayGame();\n \t}\n }", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public SnakeGame() {\n\t\t// game initialy not running\n\t\tgameRunning = false; \n\t\t// init our GUI\n\t\tinitGUI();\n\t}", "public static void main(String[] args) {\n BasicConfigurator.configure();\n // note: running mode starts as a result of finishing building mode\n BuildingWindow buildingWindow = new BuildingWindow(\"Game Build\");\n buildingWindow.start();\n }", "public GameMain()\n {\n allenBad = new AllenSucks(this);\n }", "public static void main(String[] args) {\n\t\tif (sNeedRepack == 1) {\n\t\t\trepackGfx();\n\t\t\tSystem.out.printf(\"repacking completed; don't forget to refresh projects(F5 eclipse)\");\n\t\t\treturn;\n\t\t}\n\t\tif (sNeedCrypt == 1) {\n\t\t\tcryptAssets();\n\t\t\tSystem.out.printf(\"encrypting completed; don't forget to refresh projects(F5 eclipse)\");\n\t\t\treturn;\n\t\t}\n\n\t\tLwjglApplicationConfiguration cfg = new LwjglApplicationConfiguration();\n\t\tcfg.title = \"Demo Title\";\n\t\tcfg.width = 1280;\n\t\tcfg.height = 800;\n\t\t\n\t\t\n\t\tCoreManager coreManager = new CoreManager(new CoreOsManager() {\n\t\t\t@Override\n\t\t\tpublic void doAction(int actionId, UniversalBundle bundle) {\n\t\t\t}\n\t\t}, 32, 20) {\n\t\t\t@Override\n\t\t\tpublic void create() {\n\t\t\t\tsuper.create();\n\t\t\t\tCoreScreen screen = new ExampleGameScreen();\n\t\t\t\tpushScreen(screen);\n\t\t\t\tpushScreen(screen.createLoaderScreen());\n\t\t\t}\n\t\t};\n\n\t\tnew LwjglApplication(coreManager, cfg);\n\t}", "public static void main(String[] args) {\n\t\tJFrame frame=new JFrame();\n\t\tStart start=new Start();\n\t\tframe.add(start);\n\t\tframe.setSize(WIDTH, HEIGHT);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.addKeyListener(start.kl);\n\t\tframe.setVisible(true);\n\t\tstart.mos.add(start.sky);\n\t\tstart.mos.add(start.hero);\n\t\tstart.action();\n\n\t}", "public void startProgram() {\n this.displayBanner();\n// prompt the player to enter their name Retrieve the name of the player\n String playersName = this.getPlayersName();\n// create and save the player object\n User user = ProgramControl.createPlayer(playersName);\n// Display a personalized welcome message\n this.displayWelcomeMessage(user);\n// Display the Main menu.\n MainMenuView mainMenu = new MainMenuView();\n mainMenu.display();\n }", "public void startGame() {\n\t\t//Start the rendering first\n\t\tgetRenderer().startRendering();\n\t\t\n\t\t//Start the game thread after that.\n\t\tgetGameThread().start();\n\t}", "public Main(){\n \tsetSize(new Dimension(1024, 768));\n \t\n \t//setUndecorated(true); // borderless (fullscreen) window\n \tsetExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); // maximize window\n \t\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setTitle(\"Game\");\n setLocationRelativeTo(null); // center on screen\n\n \tContentLoader.LoadContent();\n init();\n start();\n }", "public void startGame(){\n\t\tSystem.out.println(\"UNI: nas2180\\n\" +\n\t\t\t\t\"Hello, lets play Rock Paper Scissors Lizard Spock!\\n\");\n\t\tSystem.out.println(\"Rules:\\n Scissors cuts Paper\\n \" +\n\t\t\t\t\"Paper covers Rock\\n \" +\n\t\t\t\t\"Rock crushes Lizard\\n \" +\n\t\t\t\t\"Lizard poisons Spock\\n \" +\n\t\t\t\t\"Spock smashes Scissors\\n \" +\n\t\t\t\t\"Scissors decapitates Lizard\\n \" +\n\t\t\t\t\"Lizard eats Paper\\n \" +\n\t\t\t\t\"Paper disproves Spock\\n \" +\n\t\t\t\t\"Spock vaporizes Rock\\n \" +\n\t\t\t\t\"(and as it always has) Rock crushes Scissors\\n\");\n\t\tthisGame = new GameResult();\n\t\tplayRound();\n\t}", "public static void main(String[] args) {\n boolean stillPlaying = true;\r\n // the boolean above passes through the while function, which will start \r\n // the method newGame()\r\n while(stillPlaying==true){\r\n // the stillPlaying may no longer still be equal to the newGame, as the \r\n // newGame may return a boolean stating false. That will close the loop, \r\n // stop the game, and print the results.\r\n stillPlaying = newGame(attempts);\r\n }\r\n }", "public static void main( String args[] ) {\r\n\t\tGameContainer gc = \r\n\t\tnew GameContainer(DEFAULT_GAME_SIZE,DEFAULT_GAME_SIZE);\r\n\t}", "private void startGame() {\r\n\t\tthis.gameMap.startGame();\r\n\t}", "public static void main(String args[]) \n {\n\n \n \n \tNewFrame.introDialog();\n EvolutionGame game = new EvolutionGame();\n \n \n while(true)\n\n {\n Area nextArea = ioUtils.enterCommand(character);\n\n if(!character.fighting)\n {\n if(nextArea != character.currentArea)\n\n {\n\n character.moveToArea(nextArea);\n NewFrame.setAreaDescription();\n NewFrame.addCharacters();\n\n }\n }\n else\n {\n\n }\n \n\n }\n\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public void startGame() \n\t{\n\t\tgamePanel.startGame();\n\t}", "public void runProgram()\n\t{\n\t\tintro();\n\t\tfindLength();\n\t\tguessLetter();\n\t\tguessName();\n\t}", "public static void main(String[] arguments){\r\n TicTac frame = new TicTac(); //runs the screen layout class.\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tGameLauncher gameLauncher = new GameLauncher();\n\t\t\t}", "public void run() {\n\t\t\n\t\t//* Initializing starting variables ** //\n\t\t\n\t\tturns = NTURNS;\n\t\tstartturn = true; \n\t\tgameover = false;\n\t\t\t\t\n\t\t//* setup game board** //\n\t\t\n\t\tturns--;\n\t\tsetupBricks();\n\t\tsetupPaddle();\n\t\tsetupScoreboard();\n\n\t\t\n\t\n\t\t//* play game** //\n\t\t\t\t\n\t\t\n\t\twhile (turns >= 0) {\n\t\t\t\n\t\t\tif (startturn == true) {\n\t\t\t\t// starttext = new GLabel(\"Click mouse to start turn\", WIDTH / 2, HEIGHT / 2);\n\t\t\t\t// add(starttext);\n\t\t\t\tupdateScoreboard();\n\t\t\t\tplayBall();\n\t\t\t\twaitForClick();\n\t\t\t\tstartturn = false;\n\t\t\t}\n\t\t\t\n\t\t\tcheckWalls();\n\t\t\tcheckCollision();\n\t\t\tmoveBall();\n\t\t\tcheckWin();\n\n\t\t}\n\t\tshowLose();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tUtil.debug = true;\n\t\tTitleScreen screen = new TitleScreen(WIDTH, HEIGHT);\n\n\t\twhile (!screen.getMadeGame())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep(100);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tscreen.stopMusic();\n\t\tscreen.dispose();\n\t\tGameBoard g = new GameBoard(WIDTH, HEIGHT);\n\t\tg.gameLoop();\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tplay();\r\n\t\t\r\n\t}", "public void run() {\n addMouseListeners();\n playGame();\n }", "void start () {\n System.out.println(\"Starting the game\");\n score = 0;\n updateScore();\n stepDelay = startingSpeed;\n isFalling = false;\n gameOver = false;\n board.clear();\n board.clearTemp();\n setNormalSpeed();\n spawnNewPiece();\n updateView();\n resetLoop();\n }", "public GameStart() {\n\t\tsuper(\"First 2D Game\");\n\t}", "public void run() {\n\t\toutput.println(\"This is a tic-tac-toe game\\n\");\r\n\t\t\r\n\t\t//output.println(\"REQUEST 1. PvP 2.PvE\");\r\n\t\t//mode = input.nextInt();\t\t\r\n\t\tgameMode(2);\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tnew GameBoard();\n\t}", "public static void main(String[] args){\n\t\tChessGame G = new ChessGame(PrinterFactory.getPrinter(PrinterType.SWING));\n\t\tG.start();\n\t}" ]
[ "0.8080331", "0.8016679", "0.7838696", "0.78375745", "0.7804801", "0.7770804", "0.7742695", "0.77302295", "0.7725521", "0.76929986", "0.7670546", "0.7657434", "0.765607", "0.7636359", "0.7627785", "0.7619574", "0.7616576", "0.7608203", "0.75862205", "0.75713867", "0.75214887", "0.7508699", "0.75056046", "0.7498492", "0.7496579", "0.7485486", "0.7447671", "0.74328524", "0.7427088", "0.7423075", "0.74080646", "0.73959756", "0.7386885", "0.7379311", "0.7376787", "0.7372754", "0.7342133", "0.7342133", "0.7342133", "0.7341878", "0.7309393", "0.7289412", "0.7285502", "0.72784925", "0.72775245", "0.7267781", "0.72547346", "0.7239141", "0.7233285", "0.7230583", "0.7228801", "0.7217563", "0.7211891", "0.7179454", "0.71613735", "0.7159754", "0.7153911", "0.71460015", "0.71427935", "0.71427935", "0.71388644", "0.7132252", "0.7114915", "0.7112103", "0.71085006", "0.71064013", "0.71035194", "0.71030074", "0.70994765", "0.70868194", "0.7060211", "0.7054587", "0.7039636", "0.7013519", "0.70067", "0.7003563", "0.6997745", "0.6997579", "0.69921446", "0.6991227", "0.6971935", "0.6963914", "0.69632757", "0.6959389", "0.6955856", "0.69536924", "0.6949517", "0.6935039", "0.6933276", "0.69330376", "0.6932355", "0.69257164", "0.6923969", "0.6912253", "0.69115645", "0.6909223", "0.69018686", "0.6899314", "0.68933976", "0.6890412", "0.68824637" ]
0.0
-1
Move played by Player keep in Loop till valid move happens
public void processTurn(Player player) { Move move; do { Scanner scan = new Scanner(System.in); System.out.println("Enter current position of Piece you want to move"); // Positions entered by player int startX = scan.nextInt(); int startY = scan.nextInt(); System.out.println("Enter position where you want to put Piece"); int endX = scan.nextInt(); int endY = scan.nextInt(); // Move created based on position entered by player 1 move = new Move(player, board.getCellAtLocation(startX, startY), board.getCellAtLocation(endX, endY)); } while (!makeMove(move)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void play() {\n HashSet<Board> positionsPlayed = new HashSet<Board>();\n _board = new Board();\n\n while (true) {\n int playerInd = _board.turn().ordinal();\n Move next;\n if (_playing) {\n if (_board.gameOver()) {\n announceWinner();\n _playing = false;\n continue;\n }\n if (_hasGUI) {\n if (_players[playerInd].type().equals(\"human\")) {\n if (_ready) {\n next = _nextMove;\n } else if (_readyCommand) {\n processCommand(_nextCommand);\n next = null;\n } else {\n continue;\n }\n } else {\n next = _players[playerInd].makeMove();\n }\n } else {\n next = _players[playerInd].makeMove();\n }\n assert !_playing || next != null;\n } else {\n if (_hasGUI) {\n System.out.print(\"\");\n if (_readyCommand) {\n processString(_nextCommand);\n }\n } else {\n getMove();\n }\n next = null;\n }\n if (next != null) {\n assert _board.isLegal(next);\n _board.makeMove(next);\n if (_players[playerInd].type().equals(\"machine\") && !_hasGUI) {\n System.out.println(_players[playerInd].side().abbrev().toUpperCase() + \"::\" + next.toString());\n if (_autoprint) {\n System.out.println(_board.toString2());\n }\n }\n if (_board.gameOver()) {\n announceWinner();\n _playing = false;\n }\n }\n _ready = false;\n }\n }", "public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);", "private void handleMovement() {\n if (movements.isEmpty()) return;\n try {\n switch (movements.peek()) {\n case MOVE_UP:\n game.movePlayer(Direction.N);\n break;\n case MOVE_LEFT:\n game.movePlayer(Direction.W);\n break;\n case MOVE_DOWN:\n game.movePlayer(Direction.S);\n break;\n case MOVE_RIGHT:\n game.movePlayer(Direction.E);\n break;\n }\n } catch (Exception ignored) { }\n }", "private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }", "public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }", "public void move()\n {\n if (!alive) {\n return;\n }\n\n if (speedTimer > 0) {\n speedTimer --;\n } else if (speedTimer == 0 && speed != DEFAULT_SPEED) {\n speed = DEFAULT_SPEED;\n }\n\n Location last = playerLocations.get(playerLocations.size()-1);\n Location next = null;\n\n // For the speed, iterate x blocks between last and next\n\n if (direction == UPKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() - speed * getPixelSize()));\n } else if (direction == DOWNKEY)\n {\n next = getLocation(last.getX(), (int)(last.getY() + speed * getPixelSize()));\n } else if (direction == LEFTKEY)\n {\n next = getLocation((int)(last.getX() - speed * getPixelSize()), last.getY());\n } else if (direction == RIGHTKEY)\n {\n next = getLocation((int)(last.getX() + speed * getPixelSize()), last.getY());\n }\n\n ArrayList<Location> line = getLine(last, next);\n\n if (line.size() == 0) {\n gameOver();\n return;\n }\n\n for (Location loc : line) {\n if (checkCrash (loc)) {\n gameOver();\n return;\n } else {\n // Former bug: For some reason when a player eats a powerup a hole appears in the line where the powerup was.\n Location l2 = getLocation(loc.getX(), loc.getY());\n l2.setType(LocationType.PLAYER);\n l2.setColor(this.col);\n\n playerLocations.add(l2);\n getGridCache().add(l2);\n }\n }\n }", "@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}", "public void checkMoveOrPass(){\n if (this.xTokens.size() > 0) {\n this.diceRoller = false;} \n else { //if no tokens to move, pass and let player roll dice\n this.turn++;\n //System.out.println(\"next turn player \" + this.players[currentPlayer].getColor());\n }\n this.currentPlayer = this.xPlayers.get(this.turn % this.xPlayers.size());\n }", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "@Override\r\n public void tick() {\n playerNextTo();\r\n if (playerContact() && isCollisioned()) {\r\n if (!((GameState) game.getGameState()).getWorld().getTile((int) (x + xMove), (int) (y + yMove)).isSolid()\r\n && isValidMove(xMove, yMove)) {\r\n x += xMove;\r\n y += yMove;\r\n }\r\n }\r\n }", "public void doNextMove(Player player) {\r\n int newX = xCoord;\r\n int newY = yCoord;\r\n switch (currentDirection) {\r\n case 1:\r\n newX = xCoord + 1;\r\n break;\r\n case 2:\r\n newY = yCoord + 1;\r\n break;\r\n case -1:\r\n newX = xCoord - 1;\r\n break;\r\n case -2:\r\n newY = yCoord - 1;\r\n break;\r\n }\r\n if (checkValidMove(newX, newY)) {\r\n // System.out.println(xCoord + \" \" + yCoord);\r\n // System.out.println(newX + \" \" + newY);\r\n moveTo(newX, newY);\r\n // System.out.println(xCoord + \" \" + yCoord);\r\n\r\n } else {\r\n turnAround();\r\n doNextMove(player);\r\n }\r\n }", "private void tryMovePlayer(int direction) {\n int layerOffset = 0, rowOffset = 0, colOffset = 0;\n boolean canMove = false;\n Maze3D.Cell currentCell = maze3D[playerLayer][playerRow][playerCol];\n Maze3D.Cell nextCell = null;\n try {\n switch (direction)\n {\n case Maze3D.UP:\n nextCell = maze3D[playerLayer][playerRow - 1][playerCol];\n canMove = !(currentCell.isWallTop() || nextCell.isWallBottom());\n rowOffset = -1;\n break;\n case Maze3D.DOWN:\n nextCell = maze3D[playerLayer][playerRow + 1][playerCol];\n canMove = !(currentCell.isWallBottom() || nextCell.isWallTop());\n rowOffset = 1;\n break;\n case Maze3D.LEFT:\n nextCell = maze3D[playerLayer][playerRow][playerCol - 1];\n canMove = !(currentCell.isWallLeft() || nextCell.isWallRight());\n colOffset = -1;\n break;\n case Maze3D.RIGHT:\n nextCell = maze3D[playerLayer][playerRow][playerCol + 1];\n canMove = !(currentCell.isWallRight() || nextCell.isWallLeft());\n colOffset = 1;\n break;\n case Maze3D.FRONT:\n nextCell = maze3D[playerLayer - 1][playerRow][playerCol];\n canMove = !(currentCell.isWallFront() || nextCell.isWallBack());\n layerOffset = -1;\n break;\n case Maze3D.BACK:\n nextCell = maze3D[playerLayer + 1][playerRow][playerCol];\n canMove = !(currentCell.isWallBack() || nextCell.isWallFront());\n layerOffset = 1;\n break;\n }\n //if cell is not null and can move, then move\n if (nextCell != null && canMove)\n {\n playerLayer += layerOffset;\n playerRow += rowOffset;\n playerCol += colOffset;\n mazeView.setPlayerLocation(playerLayer, playerRow, playerCol);\n moves++;\n }\n //if new position is the solution, then game is solved\n if (isSolved())\n {\n notifyGameEnd();\n }\n }\n catch (ArrayIndexOutOfBoundsException e)\n {\n Log.d(TAG, \"tryMovePlayer: player tried to move to edge\");\n }\n }", "private void movementPhase() {\n ClickObserver.getInstance().setCreatureFlag(\"\");\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(false);\n TheCupGUI.update();\n Board.removeCovers();\n }\n });\n for (Player p : playerList) {\n \tplayer = p;\n player.flipAllUp();\n\t ClickObserver.getInstance().setActivePlayer(player);\n\t ClickObserver.getInstance().setCreatureFlag(\"Movement: SelectMovers\");\n\t InfoPanel.uncover(player.getName());\n\t if (p.getHexesWithPiece().size() > 0) {\n\t \tClickObserver.getInstance().setClickedTerrain(p.getHexesWithPiece().get(0));\n\t }\n\t pause();\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n \tClickObserver.getInstance().whenTerrainClicked();\n \t GUI.getHelpText().setText(\"Movement Phase: \" + player.getName()\n + \", Move your armies\");\n \t Game.getRackGui().setOwner(player);\n }\n });\n\t \n\t while (isPaused) {\n \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t }\n\t InfoPanel.cover(player.getName());\n player.flipAllDown();\n }\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getDoneButton().setDisable(true);\n }\n });\n ClickObserver.getInstance().setCreatureFlag(\"\");\n }", "private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }", "public boolean playMove(String input_command) {\n // This function will take a command, validates input and calls for a move for a\n // player\n // whoes turn is there.\n String[] inputs = input_command.split(\" \");\n String move = inputs[0];\n PlayerController playerController = getNextPlayer();\n this.playerControllerList.remove(playerController);\n System.out.println(\"\\nPlayer\" + playerController.getPlayerId() + \" choosed:\" + input_command + \" move\");\n System.out.println(\"Before playing move=>\" + getStateOfPlayer(playerController));\n System.out.println(\"Before playing move=> Board State:\" + getStateOfBoard());\n switch (move) {\n case \"STRIKE\":\n this.gameController.strikeMove(playerController);\n break;\n case \"MULTI_STRIKE\":\n // We should take one more input that is count of striked coins\n this.gameController.multiStrikeMove(playerController, Integer.parseInt(inputs[1]));\n break;\n case \"RED_STRIKE\":\n this.gameController.redStrikeMove(playerController);\n break;\n case \"NONE\":\n this.gameController.noneMove(playerController);\n break;\n case \"DEFUNCT_COIN\":\n if(inputs[1].equals(\"BLACK\")){\n this.gameController.defunctCoinMove(playerController, CoinType.BLACK);\n }else if(inputs[1].equals(\"RED\")){\n this.gameController.defunctCoinMove(playerController, CoinType.RED);\n }\n break;\n case \"STRIKER_STRIKE\":\n this.gameController.strikerStrikeMove(playerController);\n break;\n }\n this.playerControllerList.add(playerController);\n System.out.println(\"After playing move=> Board State:\" + getStateOfBoard());\n System.out.println(\"After playing move=>\" + getStateOfPlayer(playerController) + \"\\n\");\n changeTurn();\n PlayerController winner = calculateWinner();\n if (winner != null) {\n System.out.println(\"Winner is:Player\" + winner.getPlayerId() + \" having points:\" + winner.getPoints());\n return false;\n } else {\n if (this.gameController.isBoardEmpty() == true) {\n System.out.println(\"Match is draw\");\n return false;\n }\n }\n return true;\n }", "private void suarez() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -10;\n\t\tint yInit = 8;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit*selfPerception.getSide().value());\n\t\twhile (commander.isActive()) {\n\t\t\t\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\t//state = State.FOLLOW;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "@Override\r\n public void run() {\r\n move();\r\n }", "public void playGame(Parser p){\n\t\t// until someone wins, loop through turns\n\t\twhile(!Game.gameWon){\n\n\t\t\t// get move from player\n\n\t\t\t// String move = Game.getCurrPlayer().getMove();\n\t\t\tString move = this.network.getMove();\n\t\t\tif(move.length()==2){\n\t\t\t\tmove = p.moveTranslate(move);\n\t\t\t}else{\n\t\t\t\tmove = p.wallTranslate(move);\n\t\t\t}\n\n\t\t\tif(move.isEmpty()){\n\t \tSystem.out.println(\"\\t[Move error]: Move is empty.\");\n\t\t\t\tkickPlayer();\n\t\t\t\tthis.network.kickLastPlayer();\n\t\t\t\tGame.nextTurn();\n\t\t\t\tif(this.checkForWin()){\n\t\t\t\t\tnotifyObservers(ui);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// try to play turn\n\t\t\tif(this.playTurn(move)){\n\t\t\t\tif(this.checkForWin()){\n\t\t\t\t\tplayers.get(curr).clearMoves();\n\t\t\t\t\tnotifyObservers(ui);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tGame.nextTurn();\n\t\t\t}else{\n\t\t\t\tkickPlayer();\n\t\t\t\tthis.network.kickLastPlayer();\n\t\t\t\tGame.nextTurn();\n\t\t\t\tif(this.checkForWin()){\n\t\t\t\t\tplayers.get(curr).clearMoves();\n\t\t\t\t\tnotifyObservers(ui);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tGame.updatePlayer(players.get(curr));\n\t\t\tthis.notifyObservers(this, Game.getBoard());\n\t\t}\n\t}", "boolean doMove();", "public void moveEveryoneExcept(Player player) throws IOException, InterruptedException { }", "@Test\n void moveWithinPLAYING() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().move(getPlayer(), Direction.EAST);\n assertThat(getPlayer().isAlive()).isTrue();\n verifyZeroInteractions(observer);\n assertThat(getGame().isInProgress()).isTrue();\n }", "public boolean movePiece(int player, int from, int to) {\n\n int piece = players.get(player).getPiece(from);\n\n // PIECELISTENER : Throw PieceEvent to PieceListeners\n for (PieceListener listener : pieceListeners) {\n PieceEvent pieceEvent = new PieceEvent(this, player, piece, from, to);\n listener.pieceMoved(pieceEvent);\n }\n\n if (piece != -1) {\n //last throw was a 6, but player is in starting position\n //end of turn\n if (this.lastThrow == 6 && players.get(player).inStartingPosition() && from == 0) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, players.get(player).getColour(), PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n }\n //player didn't throw a 6\n //end of turn\n if (this.lastThrow != 6) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, players.get(player).getColour(), PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n }\n\n //Resets the tower info when a tower is split\n if (players.get(player).getPieces().get(piece).towerPos != -1) {\n players.get(player)\n .getPieces()\n .get(piece)\n .setTower(-1);\n\n for (Piece piece2 : players.get(player).pieces) {\n if (piece2.position == from) {\n piece2.setTower(-1);\n }\n }\n }\n\n //Sets tower info when a tower is made\n for (Piece piece2 : players.get(player).pieces) {\n if (piece2.position == to) {\n //Both pieces become a tower\n piece2.setTower(piece2.position);\n players.get(player)\n .getPieces()\n .get(piece)\n .setTower(to);\n }\n }\n\n //move piece\n players.get(player)\n .getPieces()\n .get(piece)\n .setPosition(to);\n\n //set piece to in play\n if (to > 0 && to < 59) {\n players.get(player)\n .getPieces()\n .get(piece)\n .setInPlay(true);\n }\n\n checkIfAnotherPlayerLiesThere(player, to);\n\n if (to == 59) {\n\n if (players.get(player).pieceFinished()) {\n this.status = \"Finished\";\n getWinner();\n }\n }\n\n return true;\n } else {\n //doesn't work\n return false;\n }\n\n }", "private void playTurn(Player player) {\n\n System.out.println(player.toString() + \"'s turn\");\n\n if (!player.getOccupiedSet().isEmpty())\n while(true) {\n Movement move = player.getMove();\n if (validMove(player, move)) {\n move(player, move);\n break;\n }\n }\n }", "@Test\n @DisplayName(\"After one player makes one move, verify conditions for next player toggle\")\n void doesPlayerContinue() {\n Player player = playerService.getP1();\n Pit pit = boardService.getPitByID(0);\n Move move = new Move(player, pit);\n boardService.updateBoardForMove(move);\n Assert.assertTrue(boardService.doesPlayerContinue());\n\n // For the next move, if player 1 moves from pit 1, player will not continue\n pit = boardService.getPitByID(1);\n move = new Move(player, pit);\n boardService.updateBoardForMove(move);\n Assert.assertFalse(boardService.doesPlayerContinue());\n }", "@Override\r\n\tpublic void run() {\r\n\t\twhile (!player.gameEnd) {\r\n\t\t\tif (fst) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tfst = false ; \r\n\t\t\t\t}catch (Exception e ) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tplayer.moveDownn();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(time_to_sleep);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void movePlayer(String direction) {\n if(playerAlive(curPlayerRow, curPlayerCol)){\n if(direction.equals(\"u\")&&(curPlayerRow-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow-1), curPlayerCol);\n curPlayerRow -= 1;\n }else if(direction.equals(\"d\")&&(curPlayerRow+1)<=7){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow+1), curPlayerCol);\n curPlayerRow += 1;\n }else if(direction.equals(\"l\")&&(curPlayerCol-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol-1));\n curPlayerCol -= 1;\n }else if(direction.equals(\"r\")&&(curPlayerCol+1)<=9){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol+1));\n curPlayerCol += 1;\n }\n }\n if(playerFoundTreasure(curPlayerRow, curPlayerCol)){\n playerWins();\n }\n adjustPlayerLifeLevel(curPlayerRow, curPlayerCol);\n int[] array = calcNewTrollCoordinates(curPlayerRow, curPlayerCol, curTrollRow, curTrollCol);\n if(curPlayerRow == curTrollRow && curPlayerCol == curTrollCol){\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n }else{\n int newTrollRow = array[0];\n int newTrollCol = array[1];\n overwritePosition(curTrollRow, curTrollCol, newTrollRow, newTrollCol);\n curTrollRow = newTrollRow;\n curTrollCol = newTrollCol;\n }\n }", "private void moveGame() {\r\n\t\tmoveFireball1();\r\n\t\tmoveFireball2();\r\n\t\tmoveMehran();\r\n\t\tmoveLaser();\r\n\t\tmoveBullet();\r\n\t\tcheckPlayerCollisions();\r\n\t\tcheckForBulletCollisions();\r\n\t\tpause(DELAY);\r\n\t\tcount++;\r\n\t}", "void playerMove(State state);", "boolean prepareToMove();", "protected void move(Player player, Movement move) {\n if (board.board[move.oldP.x][move.oldP.y] != null) {\n board.board[move.newP.x][move.newP.y] = board.board[move.oldP.x][move.oldP.y];\n board.board[move.oldP.x][move.oldP.y] = null;\n\n if (player.colour == Colour.BLACK) {\n blackPlayer.move(move);\n whitePlayer.removePiece(move.newP);\n } else if (player.colour == Colour.WHITE) {\n whitePlayer.move(move);\n blackPlayer.removePiece(move.newP);\n }\n\n sharedBoard.update(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n\n // Check for promotions...\n for (int x = 0; x < board.board.length; ++x)\n if (board.board[x][0] instanceof Pawn)\n board.board[x][0] = new Queen(Colour.BLACK);\n else if (board.board[x][7] instanceof Pawn)\n board.board[x][7] = new Queen(Colour.WHITE);\n }\n }", "public abstract void playMove(Move move, int indexOfMove);", "void userMoveRequested(int playerIndex);", "public void performCheckAfterPlayerMove() {\n\t\tagentsMoved += 1;\n\t\t\n\t\tif(agentsMoved == agents) {\n\t\t\troundsPlayed += 1;\n\t\t\tmoveRobots();\n\t\t\tagentsMoved = 0;\n\t\t\t\n\t\t\t//restart game at new level after the robots has moved\n\t\t\tif(roundsPlayed > server.getRoundsPerLevel()) {\n\t\t\t\tHandleCommunication.broadcastToClient(null, server.getConnectedClientList(), SendSetting.NextLevel, server, null);\n\t\t\t\troundsPlayed = 0;\n\t\t\t}\n\t\t}\n\t}", "public void play() {\r\n _board = new Board();\r\n _command = new LoaGUI(\"Lines of Action\", this);\r\n\r\n while (true) {\r\n int playerInd = _board.turn().ordinal();\r\n if (_playing) {\r\n if (_board.gameOver()) {\r\n announceWinner();\r\n _playing = false;\r\n continue;\r\n }\r\n Move next = _players[playerInd].makeMove();\r\n System.out.println(\"The move is get\");\r\n if (next != null) {\r\n assert _board.isLegal(next);\r\n _board.makeMove(next);\r\n _command.repaint();\r\n System.out.println(\"Repaint\");\r\n if (_board.gameOver()) {\r\n announceWinner();\r\n _playing = false;\r\n }\r\n }\r\n } else {\r\n try {\r\n Thread.sleep(magic2);\r\n } catch (InterruptedException ex) {\r\n return;\r\n }\r\n }\r\n }\r\n }", "public void move() {\n\t\tdouble xv = 0;\r\n\t\tdouble yv = 0;\r\n\t\t//this method allows the entity to hold both up and down (or left and right) and not move. gives for smooth direction change and movement\r\n\t\tif (moveRight) {\r\n\t\t\txv+=getSpeed();\r\n\t\t\torientation = Orientation.EAST;\r\n\t\t}\r\n\t\tif (moveLeft) {\r\n\t\t\txv-=getSpeed();\r\n\t\t\torientation = Orientation.WEST;\r\n\t\t}\r\n\t\tif (moveUp)\r\n\t\t\tyv-=getSpeed();\r\n\t\tif (moveDown)\r\n\t\t\tyv+=getSpeed();\r\n\t\tif (!doubleEquals(xv,0) || !doubleEquals(yv,0)) {\r\n\t\t\t((Player)this).useMana(0.1);\r\n\t\t\tImageIcon img = new ImageIcon(\"lib/assets/images/fireball.png\");\r\n\t\t\tBufferedImage image = new BufferedImage(32,32,BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = image.getGraphics();\r\n\t\t\tg.drawImage(img.getImage(), 0, 0, image.getWidth(), image.getHeight(), null);\r\n\t\t\tColor n = loop[ind%loop.length];\r\n\t\t\tind++;\r\n\t\t\timage = ImageProcessor.scaleToColor(image, n);\r\n\t\t\t//PopMessage.addPopMessage(new PopMessage(image,getX(),getY()));\r\n\t\t}\r\n\t\telse\r\n\t\t\t((Player)this).useMana(-0.1);\r\n\t\tmove(xv,yv);\r\n\t}", "public boolean requestMove() {\r\n if (game != null) {\r\n player.getMove();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "private void moveOrTurn() {\n\t\t// TEMP: look at center of canvas if out of bounds\n\t\tif (!isInCanvas()) {\n\t\t\tlookAt(sens.getXMax() / 2, sens.getYMax() / 2);\n\t\t}\n\n\t\t// if we're not looking at our desired direction, turn towards. Else, move forward\n\t\tif (needToTurn()) {\n\t\t\tturnToDesiredDirection();\n\t\t} else {\n\t\t\tmoveForward(2.0);\n\t\t}\n\n\t\t// move in a random direction every 50 roaming ticks\n\t\tif (tickCount % 100 == 0) {\n\t\t\tgoRandomDirection();\n\t\t}\n\t\ttickCount++;\n\t}", "public boolean plizMovePlayerForward(Player player)\n {\n\n //check if die was rolled\n if (getValue_from_die() > 0)\n {\n int x_cord = player.getX_cordinate();\n int y_cord = player.getY_cordinate();\n int steps = player.getSteps_moved();\n\n //try to get player from color home\n if (attempt2GetPlayerFromHomeSucceds(player))\n {\n return true;\n }\n\n //if player has already reached home do nothing\n if (player.getSteps_moved() >= 58)\n {\n return false;\n }\n //if player is inside home stretch he has to play exact number to go home\n else if (player.getSteps_moved() >= 52)\n {\n if (59 - player.getSteps_moved() <= value_from_die)\n {\n return false;\n }\n }\n\n //if player isnt at home move him\n if (player.getSteps_moved() > 0)\n {\n for (int i = 1; i <= (value_from_die); i++)\n {\n player.movePlayerForward();\n if (roadBlocked(player))\n {\n road_blocked = true;\n }\n player.setHas_not_been_drawn(true);\n }\n\n //roll back changes\n if (road_blocked)\n {\n player.setX_cordinate(x_cord);\n player.setY_cordinate(y_cord);\n player.setSteps_moved(steps);\n ludo.setDrawRoadBlockedSign(true);\n //println(\"ROAD BLOCKED\");\n road_blocked = false;\n return false;\n }\n playPlayerHasMovedMusic();\n //see if player eats someone\n if (getPerson_to_play() == 1)\n {\n BlueEatsPlayer(player);\n }\n else if (getPerson_to_play() == 2)\n {\n RedEatsPlayer(player);\n }\n else if (getPerson_to_play() == 3)\n {\n GreenEatsPlayer(player);\n }\n else if (getPerson_to_play() == 4)\n {\n YellowEatsPlayer(player);\n }\n if (value_from_die == 6)\n {\n resetDieScore();\n ludo.setDrawScoreAllowed(false);\n return true;\n }\n //reset variables and change person to play\n resetDieScore();\n ludo.setDrawScoreAllowed(false);\n changePersonToPlay();\n return true;\n }\n //occurs rarely at the begining of the game\n else\n {\n //println(\"steps less than 0\");\n return false;\n }\n }\n else\n {\n //println(\"PLIZ ROLL DIE FIRST THEN MOVE BUTTON\");\n return false;\n }\n }", "@Override\n public PlayerMove move() {\n\n return null;\n }", "public int run() {\r\n // Player 1 plays first, and is X.\r\n while (true) {\r\n if (this.board.gameOver()) {\r\n break;\r\n }\r\n Move m1 = p1.makeMove(this.board.clone());\r\n this.board.makeMove(m1, this.p1.getSide());\r\n \r\n if (this.board.gameOver()) {\r\n break;\r\n }\r\n Move m2 = p2.makeMove(this.board.clone());\r\n this.board.makeMove(m2, this.p2.getSide()); \r\n }\r\n // Done with game.\r\n return this.board.winner();\r\n }", "public boolean movePlayer(MazePlayer p, Direction d) {\n//\t System.out.println(\"Player \"+p.name+\" requests to move in direction \"+d);\n// players can move through walls with some small probability!\n\t\t // calculate the new position after the move \n\t\t MazePosition oldPos = playerPosition.get(p.name);\n\t\t MazePosition newPos = theBoard.tryMove(oldPos,d);\n\n\t\t \n\t\t //make sure there is no other player at that position\n\t\t // and if there is someone there then just return without moving\n\t\t if (playerPosition.containsValue(newPos)){\n\t\t\t if (!newPos.equals(oldPos))\n\t\t\t\t if (debugging) System.out.println(\"player \"+p.name+\" tried to move into an occupied space.\");\n\t\t\t else\n\t\t\t\t if (debugging) System.out.println(p.name+\" stays at \"+oldPos);\n\t\t\t return false;\n\t\t }\n\t\t \n\t\t //otherwise, make the move\n\t\t playerPosition.put(p.name,newPos);\n\t\t if (debugging) System.out.println(p.name+\": \"+oldPos+\" -> \"+newPos);\n\t\t \n\t\t //take off points if you moved through a wall\n\t\t if (!theBoard.canMove(oldPos,d)){\n\t\t\t score.put(p.name,score.get(p.name)-2);\n\t\t\t if (debugging) System.out.println(p.name+\" moved through a wall\");\n\t\t }\n\t\t \n\t\t // mark that old space as \"free space\"\n\t\t freeSpace.add(0,oldPos);\n\t\t \n\t\t // check to see if there is a jewel in the new position.\n\t\t int i = jewelPosition.indexOf(newPos);\n\t\t if (i > -1) {\n\t\t\t // add 5 to the score\n\t\t\t score.put(p.name,score.get(p.name)+5);\n\t\t\t // remove the jewel\n\t\t\t jewelPosition.remove(i);\n\t\t\t if (debugging) System.out.println(\"and lands on a jewel!, score is now \" +score.get(p.name));\n\t\t\t // add another jewel\n\t\t\t MazePosition q = getEmptySpace();\n\t\t\t jewelPosition.add(q);\n\t\t\t if (debugging) System.out.println(\"adding a new jewel at \"+q);\n\t\t\t \n\t\t }\n\t\t else {\n\t\t\t // if no jewel, then remove the space from the freeSpace list\n\t\t\t freeSpace.remove(newPos);\n\t\t }\n\t\t return true;\n\n }", "public void run(){\n while(!playersConnected){\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n System.out.println(\"KRECEM DALJE\");\n\n\n try {\n gameEndpointService.setPlayersRoll(room);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (EncodeException e) {\n e.printStackTrace();\n }\n gameEndpointService.setOnMove(room,hashMap);\n try {\n gameEndpointService.sendPlayersWhoIsOnMove(room,hashMap,currentMove);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (EncodeException e) {\n e.printStackTrace();\n }\n\n\n\n while(true){\n\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if(room.IsOnMovePlayer()==true){\n System.out.println(\"Ukinuo sam se \");\n currentMove++;\n System.out.println(\"Trenutni potez je \"+currentMove);\n if(currentMove==room.getNumberOfPlayers()+1){\n System.out.println(\"Opet sam 1\");\n currentMove=1;\n try {\n gameEndpointService.sendPlayersWhoIsOnMove(room,hashMap,currentMove);\n room.setOnMovePlayer(false);\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (EncodeException e) {\n e.printStackTrace();\n }\n\n }else{\n try {\n gameEndpointService.sendPlayersWhoIsOnMove(room,hashMap,currentMove);\n room.setOnMovePlayer(false);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (EncodeException e) {\n e.printStackTrace();\n }\n }\n\n }\n\n }\n\n }", "public Move move() {\n\n byte[] piece;\n int pieceIndex;\n Move.Direction direction = null;\n int counter = 0;\n\n Scanner s = new Scanner(System.in);\n\n\n System.out.println(\"Please select piece to move: \");\n\n\n while (true) {\n try {\n pieceIndex = s.nextInt();\n\n if ((piece = getPiece(pieceIndex)) == null) {\n System.out.println(\"invalid index, try again!\");\n// check if selected piece is stuck\n } else if (\n (((player == Board.V) && (piece[1]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O ) || // UP\n ((player == Board.H) && (piece[1]-1 >=0) && (board.layout[piece[0]][piece[1]-1] == O)) || // DOWN\n ((player == Board.V) && (piece[0]-1 >=0) && (board.layout[piece[0]-1][piece[1]] == O)) || // LEFT\n (((player == Board.H) && (piece[0]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O )) // RIGHT\n {\n break;\n// if all are stuck pass turn\n } else if (counter + 1 < Board.getSize()) {\n counter++;\n System.out.println(\"Piece is stuck, pick another, \" + counter + \" pieces stuck.\");\n } else {\n System.out.println(\"Passing\");\n return null;\n }\n } catch (Exception e){\n System.out.println(\"Piece index expects int, try again\");\n s = new Scanner(System.in);\n }\n }\n System.out.println(\"Please select direction ('w' // 'a' // 's' // 'd'): \");\n\n boolean valid = false;\n while (!valid) {\n\n switch (s.next().charAt(0)) {\n // if the move requested is valid, break the loop, make the move on our record of layout and return the\n // move made\n case 'w':\n direction = Move.Direction.UP;\n valid = (((player == Board.V) && (piece[1]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O );\n break;\n\n case 'a':\n direction = Move.Direction.LEFT;\n valid = ((player == Board.V) && (piece[0]-1 >=0) && (board.layout[piece[0]-1][piece[1]] == O));\n break;\n\n case 's':\n direction = Move.Direction.DOWN;\n valid = ((player == Board.H) && (piece[1]-1 >=0) && (board.layout[piece[0]][piece[1]-1] == O));\n break;\n\n case 'd':\n direction = Move.Direction.RIGHT;\n valid = (((player == Board.H) && (piece[0]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O );\n break;\n default:\n System.out.println(\"Invalid key press, controls are wasd\");\n valid = false;\n }\n }\n Move move = makeMove(direction, pieceIndex);\n board.update(move, player);\n\n return move;\n }", "public abstract boolean doComputerMove(Player player);", "boolean makeMove(int index, Player player);", "@Override\n void movePhase() throws IOException, InterruptedException, IOExceptionFromController {\n boolean godPower = false;\n ArrayList<Cell> possibleMoves = findPossibleMoves(activeWorker.getPosition());\n Cell movePosition = client.chooseMovePosition(possibleMoves);\n CellView startView = new CellView(activeWorker.getPosition());\n CellView endView = new CellView(movePosition);\n CellView startView2 = null;\n CellView endView2 = null;\n // + allow pushing away opponents\n if (movePosition.hasWorker()) {\n godPower = true;\n Worker pushedWorker = movePosition.getWorker();\n Cell nextCell;\n int nextX = movePosition.getPosX() + (movePosition.getPosX() - activeWorker.getPosition().getPosX());\n int nextY = movePosition.getPosY() + (movePosition.getPosY() - activeWorker.getPosition().getPosY());\n nextCell = board.getCell(nextX, nextY);\n startView2 = endView;\n endView2 = new CellView(nextCell);\n try {\n pushedWorker.move(nextCell);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n return;\n }\n //\n }\n try {\n activeWorker.move(movePosition);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n }\n if (godPower) displayMove(startView, endView, startView2, endView2, card);\n else displayMove(startView, endView, null);\n }", "@Override\r\n\tpublic void makeRandonMove() {\r\n\t\tif (randPlayer.getPlayerNumber() == game.getState().getTurn() && !game.getState().isFinished()) game.execute(randPlayer.requestAction(game.getState()));\r\n\t}", "private void play() {\r\n\t\tfor (int i = 0; i < players.length; i++) {\r\n\t\t\tPlayer p = players[i];\r\n\t\t\tif (p instanceof ComputerPlayer) {\r\n\t\t\t\tfirstMove[i] = ((ComputerPlayer) p).makeFirstMove(board);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (firstMove[0] != null && firstMoveScores[0] > 0) {\r\n\t\t\tcalcBestFirstMove();\r\n\t\t}\r\n\r\n\t\twhile (!(board.gameOver())) {\r\n\t\t\t/* \tNIET LANGER NODIG GELOOF IK, DIT KAN DE SERVER (ICM EEN TIMER) DOEN\r\n\r\n\t\t\tplayers[(moveNr + startingPlayer) % players.length].makeMove(board);\r\n\t\t\tserver.updateHand(players[(moveNr + startingPlayer) % players.length],\r\n\t\t\t\t\tplayers[(moveNr + startingPlayer) % players.length].updateHand());\r\n\t\t\tmoveNr++;*/\r\n\t\t}\r\n\t}", "void doMove() {\n\t\t// we saved the moves in a queue to avoid recursing.\n\t\tint[] move;\n\t\twhile(!moveQueue.isEmpty()) {\n\t\t\tmove = moveQueue.remove(); \n\t\t\tif (board[move[0]][move[1]] == 0) {\n\t\t\t\tinsertNumber(move[0], move[1], move[2]);\n\t\t\t}\n\t\t}\n\t\tgoOverLines();\n\t}", "protected boolean move(int m, boolean player)\n { int status = game.move(m, player);\n if ( status == TicGame.NOMOVE )\n return false;\n repaint();\n if ( status == TicGame.WIN_X ||\n status == TicGame.WIN_O )\n winner(); \n return true;\n }", "private boolean moveContinues(Point piece){\r\n boolean result = canEats(piece);\r\n // if move continues, next move has to start with the same piece\r\n model.setCheckPiece((result)?piece:null);\r\n return result;\r\n }", "Move getMove() {\r\n int[] p0 = new int[2];\r\n int[] p1 = new int[3];\r\n\r\n while (_playing) {\r\n while (_playing) {\r\n while (_playing) {\r\n _command.getMouse(p0);\r\n System.out.println(\"_command.getMouse 0\");\r\n if (p0[0] >= 0 && p0[1] >= 0) {\r\n System.out.println(\"We got a mouse move on the board for 0\");\r\n break;\r\n }\r\n try {\r\n Thread.sleep(magic1);\r\n System.out.println(\"This is the thread.sleep.\");\r\n } catch (InterruptedException ex) {\r\n System.out.println(\"This is the interruption.\");\r\n return null;\r\n }\r\n }\r\n if (!_playing) {\r\n return null;\r\n }\r\n if (_board.get(p0[0] + 1, p0[1] + 1) == _board.turn()) {\r\n System.out.print(\"Warning!!!\");\r\n break;\r\n }\r\n }\r\n if (!_playing) {\r\n return null;\r\n }\r\n while (_playing) {\r\n _command.getMouse(p1);\r\n System.out.println(\"_command.getMouse 1\");\r\n if (p1[0] >= 0 && p1[1] >= 0) {\r\n System.out.println(\"We got a mouse move on the board for 1\");\r\n break;\r\n }\r\n try {\r\n Thread.sleep(magic1);\r\n System.out.println(\"This is the thread.sleep.\");\r\n } catch (InterruptedException ex) {\r\n System.out.println(\"This is the interruption.\");\r\n return null;\r\n }\r\n }\r\n if (!_playing) {\r\n return null;\r\n }\r\n if (p0[0] == p1[0] || p0[1] == p1[1]\r\n || Math.abs(p1[0] - p0[0]) == Math.abs(p1[1] - p0[1])) {\r\n Move m = Move.create(p0[0] + 1, p0[1] + 1, p1[0] + 1, p1[1] + 1,\r\n _board);\r\n if (m != null && _board.isLegal(m)) {\r\n return m;\r\n }\r\n }\r\n }\r\n return null;\r\n }", "public void PlayerIO() {\r\n\t\tboolean PLAYERTURN = false;\r\n\t\twhile(running && !engine.gameOver && !interrupted()) {\r\n\t\t\tif (engine.begin) {\r\n\t\t\t\thasInput = false;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tToClient.writeBoolean(running);\r\n\t\t\t\t\tengine.GameOverCheck();\r\n\t\t\t\t\tToClient.writeBoolean(engine.gameOver);\r\n\t\t\t\t\t// Exit the loop if game over\r\n\t\t\t\t\tif(engine.gameOver)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tturnDelta = engine.getActiveTurn();\r\n\t\t\t\t\tisPlayersTurn = turnDelta == PLAYERTURN;\r\n\t\t\t\t\tif (turnDelta != recordedTurn) {\r\n\t\t\t\t\t\t// Set hasInput flag\r\n\t\t\t\t\t\thasInput = true;\r\n\t\t\t\t\t\trecordedTurn = turnDelta;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tToClient.writeBoolean(hasInput);\r\n\t\t\t\t\tToClient.writeBoolean(isPlayersTurn);\r\n\t\t\t\t\t// write the results of opponents turns\r\n\t\t\t\t\tif (hasInput) {\r\n\t\t\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\t\t} else if (isPlayersTurn) {\r\n\t\t\t\t\t\tengine.HandlePlayerCommand(getValidMove());\r\n\t\t\t\t\t\t// After player finishes his turn the spells will cycle\r\n\t\t\t\t\t\tengine.RunSpellCycles();\r\n\t\t\t\t\t\tengine.EndTurn();\r\n\t\t\t\t\t\t// TODO fix to be single turn system\r\n\t\t\t\t\t\tengine.GameOverCheck();\r\n\t\t\t\t\t\tToClient.writeBoolean(engine.gameOver);\r\n\t\t\t\t\t\tif(engine.gameOver)\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tyield();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// Push Kill signal\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSystem.out.println(\"Socket is dead. Triggering kill switch\");\r\n\t\t\t\t\tengine.KillSwitchHost();\r\n\t\t\t\t\tinterrupt();\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\tyield();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(engine.gameOver) {\r\n\t\t\ttry {\r\n\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\tToClient.writeUTF(engine.getGameOverMessage(TYPE));\r\n\t\t\t\tengine.PlayerConnected = false;\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void move() {\r\n\t\ttry {\r\n\t\t\tThread.sleep(timer);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\trunTime += timer;\r\n\t\tif (runTime > stepUp) {\r\n\t\t\ttimer *= 0.9;\r\n\t\t\tstepUp += 5000;\r\n\t\t}\r\n\r\n\t\tupdateSnake(lastMove);\r\n\t\t// updateField();\r\n\r\n\t\tif (score >= 10 && (r.nextInt(40) == 0)) {\r\n\t\t\taddFood(MOUSE);\r\n\t\t}\r\n\t\tif (score >= 30 && (r.nextInt(50) == 0)) {\r\n\t\t\taddFood(POISON);\r\n\t\t}\r\n\t}", "public void play() {\r\n int ii = 0;\r\n\r\n System.out.println(\"****************************************************************\");\r\n System.out.println(\"Play game: a move is expressed as \\\"row#,col#\\\", such as \\\"1,2\\\"\");\r\n System.out.println(\"Computer: X Person: O\");\r\n System.out.println(\"****************************************************************\");\r\n while(!isGameEnded()) {\r\n if (ii >= MAX_MOVE_NUMBER) {\r\n\tbreak;\r\n }\r\n\r\n nextMove();\r\n ii++;\r\n }\r\n\r\n if (isPersonWin()) {\r\n System.out.println(\"Person Wins!\");\r\n saveLoseRecord();\r\n }\r\n else if (isComputerWin()) {\r\n System.out.println(\"Computer Wins!\");\r\n }\r\n else {\r\n System.out.println(\"Tie!\");\r\n }\r\n\r\n }", "public boolean move() {\n\t\tint nextDirection;\n\t\tint pacmanX = parent.getPacManX();\n\t\tint pacmanY = parent.getPacManY();\n\t\t\n\t\tint[] directionPriority = new int[4];\n\t\t/** The direction is added to the priority in order to achieve it once the move is chosen */\n\t\tdirectionPriority[0]=(pacmanX-pixelLocationX)*(10)*state+GameCharacter.RIGHT;\n\t\tdirectionPriority[1]=((pacmanX-pixelLocationX)*(-10)*state+GameCharacter.LEFT);\n\t\tdirectionPriority[2]=(pacmanY-pixelLocationY)*(10)*state+GameCharacter.DOWN;\n\t\tdirectionPriority[3]=((pacmanY-pixelLocationY)*(-10)*state+GameCharacter.UP);\n\t\tArrays.sort(directionPriority);\n\t\t\n\t\tint i=3;\n\t\t\n\t\tdo {\n\t\t\tnextDirection = directionPriority[i]%10;\n\t\t\tif (nextDirection < 0) {\n\t\t\t\tnextDirection += 10;\n\t\t\t}\n\t\t\tif(isLegalMove(nextDirection) && (Math.abs(nextDirection-currentDirection) != 2) || i==0) {\n\t\t\t\tsetDirection(nextDirection);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\twhile (i>=0);\n\t\treturn super.move();\n\t}", "public void moveEverythingALittle(){\n //ponieważ wszystko idealnie jest zsynchronizowane to else nie wykona sie gdy current = getDestination\n if(player.getCurrentX()<player.getDestinationX())\n player.currentX += 1;\n else if(player.getCurrentX()>player.getDestinationX())\n player.currentX -= 1;\n\n if( player.getCurrentY()<player.getDestinationY())\n player.currentY += 1;\n else if( player.getCurrentY()>player.getDestinationY())\n player.currentY -= 1;\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n if(item.getCurrentX()<item.getDestinationX())\n item.currentX += 1;\n else if(item.getCurrentX()>item.getDestinationX())\n item.currentX -= 1;\n\n if( item.getCurrentY()<item.getDestinationY())\n item.currentY += 1;\n else if ( item.getCurrentY()>item.getDestinationY())\n item.currentY -= 1;\n }\n }", "@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}", "public void move() {\r\n\t\tmoveCount++;\r\n\t}", "private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }", "public void move() {\r\n\t\tif(torretas.size() == 0){\r\n\t\t\tagregarExplosiones();\r\n\t\t}\r\n\t\tif(System.currentTimeMillis() - init > delay && !control[0])\r\n\t\t\tif(puedeMoverse()){\r\n\t\t\t\tif(random){\r\n\t\t\t\t\tint select = -1;\r\n\t\t\t\t\tboolean move = false;\r\n\t\t\t\t\twhile(!move){\r\n\t\t\t\t\t\tselect = rn.nextInt(4);\r\n\t\t\t\t\t\tif(select == 0 || select == 3){\r\n\t\t\t\t\t\t\tmove = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(select == 2 && hayTorretas(x + defaultWidth/2 + 190, x+defaultWidth)){\r\n\t\t\t\t\t\t\tmove = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(select == 1 && hayTorretas(x, x+defaultWidth/2 - 190)){\r\n\t\t\t\t\t\t\tmove = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\r\n\t\t\t\t\tint auxX = x;\r\n\t\t\t\t\tint auxY = y;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(select == 0){\r\n\t\t\t\t\t\tmoves[0] = moves[1] = true;\r\n\t\t\t\t\t\tx = -237;\r\n\t\t\t\t\t\ty = -defaultHeight;\r\n\t\t\t\t\t\tvelocidad = 4;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(select == 1){\r\n\t\t\t\t\t\tmoves[2] = moves[3] = true;\r\n\t\t\t\t\t\tx = 800;\r\n\t\t\t\t\t\ty = 0;\r\n\t\t\t\t\t\tvelocidad = 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(select == 2){\r\n\t\t\t\t\t\tmoves[4] = moves[5] = true;\r\n\t\t\t\t\t\tx = - defaultWidth;\r\n\t\t\t\t\t\ty = 0;\r\n\t\t\t\t\t\tvelocidad = 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(select == 3){\r\n\t\t\t\t\t\tmoves[6] = moves[7] = true;\r\n\t\t\t\t\t\tx = -237;\r\n\t\t\t\t\t\ty = 800;\r\n\t\t\t\t\t\tvelocidad = 5;\r\n\t\t\t\t\t\treproductor.addSound(alarm, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tactualizarTorretas(x-auxX, y-auxY);\r\n\t\t\t\t\t\r\n\t\t\t\t\trandom = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//movimiento de arriba a abajo\r\n\t\t\t\tif(!moves[2] && !moves[3] && !moves[4] && !moves[5] && !moves[6] && !moves[7])\r\n\t\t\t\tif(moves[0] && y + defaultHeight < 500){\r\n\t\t\t\t\ty +=velocidad;\r\n\t\t\t\t\tactualizarTorretas(0, +velocidad);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmoves[0] = false;\r\n\t\t\t\t\tif(y + defaultHeight > -100 && moves[1]){\r\n\t\t\t\t\t\ty-=velocidad;\r\n\t\t\t\t\t\tactualizarTorretas(0, -velocidad);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tmoves[1] = false;\r\n\t\t\t\t\t\trandom = true;\r\n\t\t\t\t\t\tinit = System.currentTimeMillis();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//movimiento de derecha a izquierda\r\n\t\t\t\tif(!moves[0] && !moves[1] && !moves[4] && !moves[5] && !moves[6] && !moves[7])\r\n\t\t\t\tif(moves[2] && x > 250){\t\r\n\t\t\t\t\tx-=velocidad;\r\n\t\t\t\t\tactualizarTorretas(-velocidad,0);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmoves[2] = false;\r\n\t\t\t\t\tif(x < 900 && moves[3]){\r\n\t\t\t\t\t\tx+=velocidad;\r\n\t\t\t\t\t\tactualizarTorretas(velocidad,0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tmoves[3] = false;\r\n\t\t\t\t\t\trandom = true;\r\n\t\t\t\t\t\tinit = System.currentTimeMillis();\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//movimiento de izquierda a derecha\r\n\t\t\t\tif(!moves[0] && !moves[1] && !moves[2] && !moves[3] && !moves[6] && !moves[7])\r\n\t\t\t\tif(moves[4] && x + defaultWidth < 550){\r\n\t\t\t\t\t\r\n\t\t\t\t\tx+=velocidad;\r\n\t\t\t\t\tactualizarTorretas(velocidad,0);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmoves[4] = false;\r\n\t\t\t\t\tif(x + defaultWidth > -100 && moves[5]){\r\n\t\t\t\t\t\tx-=velocidad;\r\n\t\t\t\t\t\tactualizarTorretas(-velocidad,0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tmoves[5] = false;\r\n\t\t\t\t\t\trandom = true;\r\n\t\t\t\t\t\tinit = System.currentTimeMillis();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//movimiento de abajo a arriba\r\n\t\t\t\tif(!moves[0] && !moves[1] && !moves[2] && !moves[3] && !moves[4] && !moves[5])\r\n\t\t\t\tif(moves[6] && y > 250){\r\n\t\t\t\t\ty-=velocidad;\r\n\t\t\t\t\tactualizarTorretas(0,-velocidad);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tmoves[6] = false;\r\n\t\t\t\t\tif(y < 700 && moves[7]){\r\n\t\t\t\t\t\ty+=velocidad;\r\n\t\t\t\t\t\tactualizarTorretas(0,velocidad);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tmoves[7] = false;\r\n\t\t\t\t\t\trandom = true;\r\n\t\t\t\t\t\tinit = System.currentTimeMillis();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tsetMove();\r\n\t}", "boolean makeMove();", "private boolean isThereValidMove() {\n\t\treturn true;\n\t}", "boolean isMoveFinished(int tick);", "public boolean playNextStep(Move otherMove) {\n if (isGameFinished()) {\n return false;\n }\n // If we are in move creation state, we add move and move to next player.\n if (isCreateMoveState) {\n if(addMove(otherMove)){\n nextPlayer();\n isCreateMoveState = false;\n return true;\n }\n else{\n return false;\n }\n\n\n } else {\n // If we are in KopyMove state, we compare moves and increment to next move or player.\n boolean succeeded = compareMove(otherMove);\n if (!succeeded) {\n // If we kill the current player, the index will fix automatically.\n killCurrentPlayer();\n } else {\n nextMove();\n }\n return succeeded;\n }\n }", "public void act() \n {\n moveTowardsPlayer(); \n }", "public MoveResult canMovePiece(Alignment player, Coordinate from, Coordinate to);", "private void nextPosition()\n\t{\n\t\tdouble playerX = Game.player.getX();\n\t\tdouble playerY = Game.player.getY();\n\t\tdouble diffX = playerX - x;\n\t\tdouble diffY = playerY - y;\n\t\tif(Math.abs(diffX) < 64 && Math.abs(diffY) < 64)\n\t\t{\n\t\t\tclose = true;\n\t\t} \n\t\telse\n\t\t{\n\t\t\tclose = false;\n\t\t}\n\t\tif(close)\n\t\t{\n\t\t\tattackPlayer();\n\t\t} \n\t\telse if(alarm.done())\n\t\t{\n\t\t\tdirection = Math.abs(random.nextInt() % 360) + 1;\n\t\t\talarm.setTime(50);\n\t\t}\n\t\thspd = MathMethods.lengthDirX(speed, direction);\n\t\tvspd = MathMethods.lengthDirY(speed, direction);\n\t\tif(hspd > 0 && !flippedRight)\n\t\t{\n\t\t\tflippedRight = true;\n\t\t\tsetEnemy();\n\t\t} \n\t\telse if(hspd < 0 && flippedRight)\n\t\t{\n\t\t\tflippedRight = false;\n\t\t\tsetEnemy();\n\t\t}\n\t\tmove();\n\t\talarm.tick();\n\t\tshootTimer.tick();\n\t}", "public void playerMove(char move) {\n\n\t\t//Set every game element to have no movement\n\t\tfor (int i = 0; i < 12; i++)\n\t\t\tfor (int j = 0; j < 12; j++)\n\t\t\t\tmoveList[i][j] = Legend.NO_MOVEMENT;\n\n\t\t//Update map\n\t\tcopyMap();\n\n\t\t//Validate the move\n\t\tvalidPlayerMove(move);\n\n\t\t//Only move the mhos if the move wasn't a jump (in which case the player gets to move again)\n\t\tif(move != Legend.JUMP)\n\t\t\tmoveMhos();\n\n\t\t//If all mhos are removed, the player must have won\n\t\tif(mhoLocations.size() == 0) {\n\t\t\tgameOver();\n\t\t\twin = true;\n\t\t}\n\n\t\t//Signal that the board can be animated\n\t\tboard.toggleAnimating();\n\t}", "public void move() {\n if (!isCollision(xMove, 0))\n moveX();\n //else\n // adjustX(xMove);\n\n if (!isCollision(0, yMove))\n moveY();\n //else\n // adjustY(yMove);\n //check isCollision(gameObject) with calculating the position for next move\n\n }", "public Player nextMove() {\n\t\treturn null;\n\t\t\n\t}", "public void playGame()\n {\n while( !over )\n {\n circle.move();\n player.move();\n Circle.collision();\n points++;\n label.setText(\"Points = \" + points);\n if (projectileInitW)\n {projectileW.moveW();}\n if (projectileInitA)\n {projectileA.moveA();}\n if (projectileInitS)\n {projectileS.moveS();}\n if (projectileInitD)\n {projectileD.moveD();}\n try\n {\n Thread.sleep( 17 );//pause for 17 milliseconds\n }\n catch( InterruptedException ex ){}\n Circle.collision();\n this.repaint();//redraw the screen with the updated locations; calls paintComponent below\n }\n track.stop();\n }", "private void doMoveIfPossible() {\r\n if (selected != null) {\r\n if (picked != null) {\r\n if (picked.doMove(selected.getX(), selected.getY())) {\r\n client1.write(ClientMessages.Move, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n client2.write(ClientMessages.Move, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n }\r\n if (picked.doCapture(selected.getX(), selected.getY())) {\r\n client1.write(ClientMessages.Capture, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n client2.write(ClientMessages.Capture, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n }\r\n CastlingMove castl;\r\n if (picked.getClass() == King.class && ((King) picked).doCastling(castl = getCastlingMove())) {\r\n client1.write(ClientMessages.Castling, castl.getRook().getPositionInArray(), castl.getRookX(), selected.getX());\r\n client2.write(ClientMessages.Castling, castl.getRook().getPositionInArray(), castl.getRookX(), selected.getX());\r\n }\r\n }\r\n }\r\n }", "public void move() {\r\n if(direction == 1) {\r\n if(userRow < grid.getNumRows() - 1) {\r\n userRow++;\r\n handleCollision(userRow, 1);\r\n }\r\n } else if(direction == -1) {\r\n if(userRow > 0) {\r\n userRow--;\r\n handleCollision(userRow, 1);\r\n }\r\n }\r\n }", "public boolean moveable() {\n //check reach border\n if (reachBorder()) {\n return false;\n }\n //get the location of the next spot to move to\n //move up\n Point nextLocation = this.getCenterLocation();\n if (direction == 12) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() - speed);\n }\n //move right\n if (direction == 3) {\n nextLocation = new Point(this.getCenterX() + speed,\n this.getCenterY());\n\n }\n //move down\n if (direction == 6) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() + speed);\n\n }\n //move left\n if (direction == 9) {\n nextLocation = new Point(this.getCenterX() - speed,\n this.getCenterY());\n }\n\n // get all objects in a circle of radius tileSize * 2 around the players\n //these objects are those which can possibly colide with the players\n int checkRadius = GameUtility.GameUtility.TILE_SIZE * 2;\n for (GameObject gameObject : GameManager.getGameObjectList()) {\n if (GameUtility.GameUtility.distance(gameObject.getCenterLocation(),\n this.getCenterLocation()) < checkRadius) {\n if ((GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n nextLocation)) && !(GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n this.getCenterLocation())) && gameObject.getType() != GameObjectType.POWER_UP && gameObject.getType() != GameObjectType.MONSTER && gameObject.getType() != GameObjectType.PLAYER) {\n return false;\n }\n }\n }\n return true;\n\n }", "private void busquets() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -25;\n\t\tint yInit = -10;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit *selfPerception.getSide().value());\n\t\t\n\t\twhile (commander.isActive()) {\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\tstate = State.ATTACKING;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\t//if(closer)\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private static void playersMove() {\r\n\t\tPrint print = new Print(); \r\n\t\tprint.board(game); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Prints the entire gameBoard.\r\n\t\t\r\n\t\tboolean flag = false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//true = Get Gideon's move | false = Get User's move\r\n\t\r\n\t\tArrayList<Integer> moves = MoveGenerator.Gen(flag, gamePieces);\t\t\t\t\t\t\t//returns all the legal moves possible to make by the player.\r\n\t\tPrint.moves(moves);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Prints all the moves returned by the Gen method.\r\n\t\t\r\n\t\tSystem.out.print(\"\\n\\n Enter your move: \");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner kb = new Scanner(System.in);\r\n\t\tString userInput = kb.next();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Captures the players move\r\n\t\t\r\n\t\tboolean moveCheck = CheckUserInput.checkMove(userInput, moves);\t\t\t\t\t\t\t//Checks if the move entered by the player is in the legal move list\r\n\t\t\r\n\t\tString formattedUserInput = null;\r\n\t\t\r\n\t\tif(!moveCheck)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Recall the playersMove() method if the move entered by the user is illegal\r\n\t\t\tplayersMove();\r\n\r\n\t\tformattedUserInput = FormatInput.formatUserMove(userInput);\t\t\t\t\t\t\t//Formatting the user's move to make it as an executable move on the board\r\n\t\t\r\n\t\t//System.out.println(formattedUserInput);\r\n\t\t\r\n\t\tUpdateBoard boardUpdater = new UpdateBoard();\r\n\t\tgame = boardUpdater.playMove(formattedUserInput,game, gamePieces, flag, false, true); //Executing the legal move on the gameBoard\r\n\t\tgamePieces = game.getGamePiecesArray();\t\t\t\t\t\t\t\t\t\t\t\t\t//Getting the updated copy of the Game Pieces Array\r\n\t\tgame.updateGameBoard();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Updating the String copy of the game board (required to print the updated gameBoard)\r\n\t\t\r\n\t\tSystem.out.println(\"\\n ========================\");\r\n\t\tGideonsMove();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Gideon's turn to make a move\r\n\t\r\n\t}", "void move() {\r\n\t\tif (x + xa < 0){\r\n\t\t\txa = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (x + xa > game.getWidth() - diameter){\r\n\t\t\txa = -mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (y + ya < 0){\r\n\t\t\tya = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (y + ya > game.getHeight() - diameter){\r\n\t\t\tgame.gameOver();\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (colisionPalas()){\r\n\t\t\tya = -mov;\r\n\t\t}\r\n\t\telse if(colisionEstorbos()){\r\n\t\t\tgame.puntuacion+=2;\r\n\t\t}\r\n\t\t\r\n\t\tx = x + xa;\r\n\t\ty = y + ya;\r\n\t}", "private void manageKeys() {\n if (!gameOver) {\n if (keyStateManager.isPressed(KeyEvent.VK_UP) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_UP)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_UP);\n if (currentPiece.rotateRight(grid)) {\n effectsReader.play(\"rotate.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_DOWN)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_DOWN);\n if (keyStateManager.canBeUsed(KeyEvent.VK_DOWN)) {\n if (currentPiece.canDown(grid)) {\n currentPiece.down();\n if (!keyStateManager.isAlreadyPressed(KeyEvent.VK_DOWN)) {\n effectsReader.play(\"move.mp3\", 1);\n }\n timeBufer = 0;\n score += 1;\n keyStateManager.setAlreadyPressed(KeyEvent.VK_DOWN);\n } else if (sincePieceDown == null) {\n sincePieceDown = LocalTime.now();\n sinceLastMove = LocalTime.now();\n }\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_LEFT)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_LEFT);\n if (keyStateManager.canBeUsed(KeyEvent.VK_LEFT)) {\n if (currentPiece.setXDirection(-1, grid)) {\n effectsReader.play(\"move.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n keyStateManager.setAlreadyPressed(KeyEvent.VK_LEFT);\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_RIGHT)) {\n keyStateManager.increaseBuffer(KeyEvent.VK_RIGHT);\n if (keyStateManager.canBeUsed(KeyEvent.VK_RIGHT)) {\n if (currentPiece.setXDirection(1, grid)) {\n effectsReader.play(\"move.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n keyStateManager.setAlreadyPressed(KeyEvent.VK_RIGHT);\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_SPACE) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_SPACE)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_SPACE);\n if (currentPiece.canDown(grid)) {\n score += (currentPiece.fix() * 2);\n sincePieceDown = LocalTime.MIN;\n sinceLastMove = LocalTime.MIN;\n }\n }\n if (keyStateManager.isPressed(KeyEvent.VK_C)) {\n if (!hasSwiched && !keyStateManager.isAlreadyPressed(KeyEvent.VK_C)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_C);\n if (holdPiece == null) {\n holdPiece = currentPiece;\n holdPiece.setPointsAsInitial();\n initNextPiece();\n } else {\n Piece tempPiece = holdPiece;\n holdPiece = currentPiece;\n holdPiece.setPointsAsInitial();\n currentPiece = tempPiece;\n currentPiece.initPosition(grid);\n hasSwiched = true;\n sincePieceDown = null;\n sinceLastMove = null;\n }\n effectsReader.play(\"hold.mp3\", 1);\n }\n } \n if (keyStateManager.isPressed(KeyEvent.VK_Z) && \n !keyStateManager.isAlreadyPressed(KeyEvent.VK_Z)) {\n keyStateManager.setAlreadyPressed(KeyEvent.VK_Z);\n if (currentPiece.rotateLeft(grid)) {\n effectsReader.play(\"rotate.mp3\", 1);\n sinceLastMove = LocalTime.now();\n }\n }\n } else {\n if (keyStateManager.isPressed(KeyEvent.VK_R)) {\n initGame();\n }\n }\n }", "public boolean validMove(Player player, Movement move) {\n\n if (!player.hasPieceAt(move.oldP) || player.hasPieceAt(move.newP))\n return false;\n else if (sharedBoard.isBlocked(move) && !board.board[move.oldP.x][move.oldP.y].canJump())\n return false;\n else if (!sharedBoard.isPositionEmpty(move.newP))\n move = new Capture(move);\n\n return board.board[move.oldP.x][move.oldP.y].validMove(move);\n }", "public void advanceGame() {\n\t\tthis.status = Status.Active;\n\t\tthis.currentSuggestion = null;\n\t\tfor(User u : this.players) {\n\t\t\tu.availableActions.remove(ACTION.Wait);\n\t\t\tu.availableActions.remove(ACTION.Disprove);\n\t\t}\n\t\t\n\t\t// Next player can always move\n\t\tUser nextPlayer = null;\n\t\tdo {\n\t\t\tnextPlayer = getFollowingPlayer(this, this.getCurrentPlayer());\n\t\t\tif (nextPlayer.isActive) {\n\t\t\t\tnextPlayer.availableActions.add(ACTION.Move);\n\t\t\t\tif (this.board.getLocation(nextPlayer.character).isRoom) {\n\t\t\t\t\tnextPlayer.availableActions.add(ACTION.Accuse);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentMove++;\n\t\t} while (!nextPlayer.isActive);\n\t\t\n\t\tif (activeUserCount(this) == 1) {\n\t\t\t// Last player remaining is the winner (by default)\n\t\t\tthis.status = Status.Complete;\n\t\t\tmessages.add(String.format(\"[ %s ] has won the game (by default)!\", nextPlayer.name));\n\t\t}\n\t}", "public int move(int player, int p, int x, int y) throws Exception{\n if(player != next || player != p)\n throw new Exception(\"Invalid position.\");\n\n //int x = pos & 255;\n //int y = pos>>8 & 255;\n\n if(board[x][y] == 0){\n board[x][y] = player;\n next = next==1?2:1;\n stonesNum++;\n setWinFlag(x, y);\n }else{\n throw new Exception(\"Invalid move.\");\n }\n return winFlag;\n }", "public void run() {\n if(mPlayerGamePiece == mGame.getmCurrentlyPlaying()){\n mPlayableTiles = mGame.getmBoard().getPlayableTiles(mPlayerGamePiece);\n showGuidelines();\n mIsAllowedToPlay = true;\n }\n // Otherwise, opponent begins:\n else{\n mIsAllowedToPlay = false;\n makeAIMove();\n }\n\n }", "@Override\n public boolean isValidMove(Move move) {\n if (board[move.oldRow][move.oldColumn].isValidMove(move, board))\n return true;\n //player will not be in check\n //move will get player out of check if they are in check\n return false;\n }", "public void Move(){\n for(int i = 0; i < moveList.length; i++){\n playerString = \"\";\n switch(moveList[i]) {\n case 1: {\n //TODO: Visited points to others\n System.out.println(\"Moving up!\");\n //Logic for fitness score might need to be moved\n if(!(game.mazeArray[game.playerPosition.getPlayerY() -1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() - 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 10;\n }\n game.moveUp();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 2: {\n System.out.println(\"Moving left!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() -1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() -1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveLeft();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 3: {\n System.out.println(\"Moving right!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() +1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() +1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveRight();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 4: {\n System.out.println(\"Moving down!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY() +1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n freedomPoints += 1;\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveDown();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n default: {\n System.out.println(\"End of line\");\n break;\n //You shouldn't be here mate.\n }\n }\n }\n\n }", "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }", "public void processMove(MahjongSolitaireMove move)\n {\n // REMOVE THE MOVE TILES FROM THE GRID\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[move.col1][move.row1];\n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[move.col2][move.row2]; \n MahjongSolitaireTile tile1 = stack1.remove(stack1.size()-1);\n MahjongSolitaireTile tile2 = stack2.remove(stack2.size()-1);\n \n // MAKE SURE BOTH ARE UNSELECTED\n tile1.setState(VISIBLE_STATE);\n tile2.setState(VISIBLE_STATE);\n \n // SEND THEM TO THE STACK\n tile1.setTarget(TILE_STACK_X + TILE_STACK_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile1.startMovingToTarget(MAX_TILE_VELOCITY);\n tile2.setTarget(TILE_STACK_X + TILE_STACK_2_OFFSET_X, TILE_STACK_Y + TILE_STACK_OFFSET_Y);\n tile2.startMovingToTarget(MAX_TILE_VELOCITY);\n stackTiles.add(tile1);\n stackTiles.add(tile2); \n \n // MAKE SURE THEY MOVE\n movingTiles.add(tile1);\n movingTiles.add(tile2);\n \n // AND MAKE SURE NEW TILES CAN BE SELECTED\n selectedTile = null;\n \n // PLAY THE AUDIO CUE\n miniGame.getAudio().play(MahjongSolitairePropertyType.MATCH_AUDIO_CUE.toString(), false);\n \n // NOW CHECK TO SEE IF THE GAME HAS EITHER BEEN WON OR LOST\n \n // HAS THE PLAYER WON?\n if (stackTiles.size() == NUM_TILES)\n {\n // YUP UPDATE EVERYTHING ACCORDINGLY\n endGameAsWin();\n }\n else\n {\n // SEE IF THERE ARE ANY MOVES LEFT\n MahjongSolitaireMove possibleMove = this.findMove();\n if (possibleMove == null)\n {\n // NOPE, WITH NO MOVES LEFT BUT TILES LEFT ON\n // THE GRID, THE PLAYER HAS LOST\n endGameAsLoss();\n }\n }\n }", "public boolean playerMove(Character token, int dice){\n\n\t\tPlayers player = searchBox(token, 0, 0, 0).getPlayers().get(0);\n\t\tplayer.setCurrentBox(player.getCurrentBox() + dice);\n\t\t\n\t\tif(player.getCurrentBox() == colums*rows){\n\t\t\tplayer.setMovement(player.getMovement() + 1);\n\t\t\treturn true;\n\n\t\t}else if(player.getCurrentBox() > colums*rows){\n\t\t\tint difference = colums*rows - (player.getCurrentBox() - dice);\n\t\t\tgetBoxs().get(searchPosition(player.getCurrentBox() - dice, 0)).getPlayers().remove(0);\n\t\t\tplayer.setCurrentBox(colums*rows);\n\t\t\tgetBoxs().get(colums*rows - colums).getPlayers().add(player);\n\n\t\t\tif(dice - difference == colums*rows){\n\t\t\t\treturn playerMove(token, (colums*rows - 1) * (-1));\n\n\t\t\t}else{\n\t\t\t\treturn playerMove(token, (dice - difference) * (-1));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\n\t\t\tint index = searchPosition(player.getCurrentBox(), 0);\n\t\t\tsearchBox(token, 0, 0, 0).getPlayers().remove(0);\n\t\t\tplayer.setMovement(player.getMovement() + 1);\n\n\t\t\tif(getBoxs().get(index).getTypeAction()){\n\t\t\t\tplayer.setCurrentBox(getBoxs().get(getBoxs().get(index).getSendTo()).getNumBoxInt());\n\t\t\t\tgetBoxs().get(getBoxs().get(index).getSendTo()).getPlayers().add(player);\n\t\t\t\tSystem.out.println(\"*. El jugador cayo en una casilla especial por ende su ficha queda en: \" + player.getCurrentBox());\n\t\t\t}else{\n\t\t\t\tgetBoxs().get(index).getPlayers().add(player);\n\t\t\t\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t}", "void doneMoving();", "public void AskForMove();", "@Override\n\tpublic void onPlayerMove(PlayerMoveEvent e) {\n\t\t\n\t}", "public int move(int player, int pos) throws Exception{\n if(player != next || player != pos>>16)\n throw new Exception(\"Wrong stone.\");\n\n int x = pos & 255;\n int y = pos>>8 & 255;\n\n if(board[x][y] == 0){\n board[x][y] = player;\n\n next = next==1?2:1;\n\n stonesNum++;\n setWinFlag(x, y);\n }else{\n throw new Exception(\"Invalid move.\");\n }\n return winFlag;\n }", "public void movePlayerOneStep(Step step) {\n SpacePlayer p = null;\n for (Overlay o : step.getOverlays()) {\n if (o instanceof SpacePlayer) {\n p = (SpacePlayer) o;\n }\n }\n\n // if there is no player or it is not ready to move, nothing to do\n if (p == null || !p.isReadyToMove()) {\n return;\n }\n\n // move player in defined direction\n if (p.getDirection().equals(Direction.FORWARD)) {\n if (step.next() != null) {\n if (!isStepBlocked(step.next())){\n step.getOverlays().remove(p);\n step.next().addOverlay(p);\n p.setActiveStep(step.next());\n }\n }\n } else if (p.getDirection().equals(Direction.BACKWARD)) {\n if (step.previous() != null) {\n if (!isStepBlocked(step.previous())) {\n step.getOverlays().remove(p);\n step.previous().addOverlay(p);\n p.setActiveStep(step.previous());\n }\n }\n }\n p.setMoved(true);\n }", "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}", "@Override\r\n\tpublic void makeSmartMove() {\r\n\t\tif (!game.getState().isFinished() && aiPlayer.getPlayerNumber() == game.getState().getTurn()) {\r\n\t\t\tthis.smartThread = new SmartThread<S, A>(this.aiPlayer, this);\r\n\t\t\tthis.smartThread.start();\r\n\t\t}\r\n\t}", "private void manageLoop() {\n if (!gameOver) {\n if (lastLoopTime != null) {\n timeBufer += lastLoopTime\n .until(LocalTime.now(), ChronoUnit.MILLIS);\n }\n lastLoopTime = LocalTime.now();\n\n if (timeBufer > fallingTime) {\n int nbFalling = (int) (timeBufer / fallingTime);\n timeBufer = timeBufer % fallingTime;\n for (int i = 0; i < nbFalling; i++) {\n if (currentPiece.canDown(grid)) {\n currentPiece.down();\n sincePieceDown = null;\n } else if (sincePieceDown == null) {\n sincePieceDown = LocalTime.now();\n sinceLastMove = LocalTime.now();\n }\n }\n }\n\n if (sincePieceDown != null && sinceLastMove != null) {\n long a = sinceLastMove\n .until(LocalTime.now(), ChronoUnit.MILLIS);\n long b = sincePieceDown\n .until(LocalTime.now(), ChronoUnit.MILLIS);\n if (a >= fallingTime || b >= fixTime) {\n effectsReader.play(\"drop.mp3\", 1);\n currentPiece.getPoints().stream().filter((p) -> (p.y >= 0))\n .forEachOrdered((p) -> {\n grid.get(p.y).updatePoint(\n p.x, currentPiece.getColorType()\n );\n });\n int nbRemove = 0;\n boolean newLevel = false;\n for (int j = Settings.getYCases() - 1; j >= 0; j--) {\n if (grid.get(j).isClear()) {\n grid.remove(j);\n nbRemove++;\n nbLines++;\n if (nbLines % 10 == 0) {\n newLevel = true;\n }\n }\n }\n if (nbRemove == 4) {\n effectsReader.play(\"tetris.mp3\", 1);\n } else if (nbRemove > 0) {\n effectsReader.play(\"line.mp3\", 1);\n }\n lineScore(nbRemove);\n if (newLevel) {\n effectsReader.play(\"level-up.mp3\", 1);\n level++;\n fallingTime = (int) (fallingTime * .8d);\n fixTime = fallingTime * 2;\n }\n for (int j = 0; j < nbRemove; j++) {\n grid.add(0, new Line());\n }\n initNextPiece();\n hasSwiched = false;\n }\n }\n }\n }", "void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }", "@Test\n public void onlyStartPlayerMoves() {\n assertTrue(game.move(Location.R1, Location.R3));\n assertEquals(1, game.getCount(Location.R3));\n assertEquals(1, game.getCount(Location.R1));\n }", "void simulateMove(CheckersData cur_board, CheckersMove move, int player) {\n\n cur_board.makeMove(move);\n\n /* If the move was a jump, it's possible that the player has another\n jump. Check for legal jumps starting from the square that the player\n just moved to. If there are any, the player must jump. The same\n player continues moving. That means their could be another choice to make.\n */\n if (move.isJump()) {\n CheckersMove[] newMoves;\n newMoves = cur_board.getLegalJumpsFrom(player, move.toRow, move.toCol);\n if (newMoves != null) {\n simulateMove(cur_board, newMoves[0], player);\n }\n \t // we have to keep jumping until we can't! If there is more than one jump\n // we are just going to have to pick the first one. More logic could go here\n }\n return;\n }", "public boolean updatePlayerMove(GameBoard.GameMove move) {\n\t\t\n\t\t\n\t\t/*\n\t\t * move is illegal,return false.\n\t\t */\n\t\tif(move.getRow()>2||move.getRow()<0||move.getColumn()>2||move.getColumn()<0||this.board[move.getRow()][move.getColumn()]!=TicTacTow.BoardSigns.BLANK.getSign()) {\n\t\t\treturn false; \n\t\t}\n\t\telse {\n\t\t/*\n\t\t * legal move,return true.\n\t\t */\n\t\tsetLastMove(move);\n\t\tthis.board[move.getRow()][move.getColumn()]=TicTacTow.BoardSigns.PLAYER.getSign();\n\t\treturn true;\n\t\t}\n\t}" ]
[ "0.7475185", "0.72883606", "0.72828734", "0.727936", "0.71408945", "0.7138821", "0.7009966", "0.69420576", "0.69230866", "0.68721914", "0.685612", "0.68225664", "0.6817991", "0.6809481", "0.67953986", "0.67931914", "0.6747055", "0.6744402", "0.67352206", "0.6734553", "0.6705211", "0.67001176", "0.6676838", "0.6665297", "0.6654601", "0.66503686", "0.66321266", "0.6599752", "0.65849525", "0.65751874", "0.65727174", "0.6546308", "0.6543583", "0.6517212", "0.6516655", "0.6512279", "0.65102077", "0.65079576", "0.65036786", "0.6495578", "0.6493629", "0.64886904", "0.6486378", "0.6476422", "0.64735985", "0.64628947", "0.64604014", "0.64521646", "0.64370275", "0.6427833", "0.6426674", "0.64263195", "0.6422345", "0.64201033", "0.64149827", "0.6413929", "0.6411771", "0.64116377", "0.64115185", "0.6399978", "0.6399962", "0.6399097", "0.63951504", "0.6394954", "0.63911164", "0.6388057", "0.6375692", "0.6364508", "0.63623154", "0.6359679", "0.6358341", "0.63564336", "0.6356177", "0.6353122", "0.635297", "0.6349649", "0.6340632", "0.6339302", "0.6333703", "0.6332777", "0.63319755", "0.6331179", "0.6326849", "0.6325182", "0.6323769", "0.6318967", "0.6318755", "0.63125545", "0.63059187", "0.6304699", "0.63024807", "0.63010263", "0.6295387", "0.62930125", "0.62909997", "0.6287481", "0.6286495", "0.6280791", "0.62773806", "0.6276264" ]
0.749998
0
Actual Command executed by this method
private boolean makeMove(Move move) { // Moving piece from Cell Piece sourcePiece = move.getStart().getCurrentPiece(); // Valid Move? Calling Piece actual implementation if (!sourcePiece.canMove(board, move.getStart(), move.getEnd())) { System.out.println("Invalid Move, sourcePiece is " + sourcePiece); } // Killed other player Piece? Piece destPiece = move.getEnd().getCurrentPiece(); if (destPiece != null) { destPiece.setKilled(true); move.setPieceKilled(destPiece); } // castling? if (sourcePiece instanceof King && sourcePiece.isCastlingMove()) { move.setCastlingMove(true); } // Store the Move movesPlayed.add(move); // If move is VALID, set piece=null at start cell and new piece at dest cell move.getEnd().setCurrentPiece(sourcePiece); move.getStart().setCurrentPiece(null); // Game Win or not if (destPiece instanceof King) { if (move.getPlayedBy().isWhiteSide()) { this.setStatus(GameStatus.WHITE_WIN); } else { this.setStatus(GameStatus.BLACK_WIN); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void execute(Command command) {\n\r\n }", "@Override\n public void Execute() {\n\n }", "protected void executeVmCommand() {\n }", "public abstract String getCommand();", "@Override\r\n protected void executeCommand(MyRobot robot) {\n }", "@Override\n protected void execute() {\n \n }", "private Command() {\n initFields();\n }", "@Override\r\n\tpublic void command() {\n\t\tSystem.out.println(\"CommandAttack Process\");\r\n\t}", "public abstract void execute(CommandSender sender, String[] args);", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }", "@Override\n\tpublic void setCommand(String cmd) {\n\t\t\n\t}", "protected void execute() {\n\n\t}", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "@Override\n protected void execute() {\n }", "public abstract void doCommand(String command);", "protected void execute() {\r\n }", "@Override\n\t\tvoid runCommand() {\n\t\t\ttrigger.execute();\n\t\t}", "protected abstract DispatchOutcome dispatchCommand(CommandEnvelope cmd);", "@Override\r\n\tprotected void execute() {\r\n\t}", "@Override\n public void initDefaultCommand() {\n\n }", "protected void execute() {\n\t\t\n\t}", "protected void execute() {\n \t\n }", "protected void execute() {\n \t\n }", "java.lang.String getCommand();", "public abstract void onCommand(MessageEvent context) throws Exception;", "protected void execute() {}", "public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);", "@Override\n public void initDefaultCommand() \n {\n }", "@Override\n protected void execute() {\n\n }", "@Override\r\n\tprotected void initDefaultCommand() {\n\t\t\r\n\t}", "protected void execute()\n {\n }", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "protected void execute() {\n }", "public void Execute() {\n\n }", "void legalCommand();", "protected void execute() {\n\t}", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "protected void execute() {\n\n\n \n }", "protected void execute()\n\t{\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\n\t}", "public abstract boolean commandExecution(CommandSender sender, String label, String[] args);", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "public abstract void setCommand(String cmd);", "@Override\n public Answer executeRequest(Command cmd) {\n return null;\n }", "String getCommand();", "@Override\n public void execute() {\n \n \n }", "@Override\n protected void execute() {\n \n }", "Command handleExecute(CommandExecute commandExecute);", "public Command() {\n this.executed = false;\n }", "@Override\n public void initDefaultCommand() {\n }", "private void executeCommand() {\n Command command = null;\n\n switch (commandType) {\n case LIST:\n command = new ListCommand(taskManager, parameterData.getDescription());\n break;\n case DONE:\n command = new DoneCommand(taskManager, parameterData.getTaskNumber());\n break;\n case TODO:\n command = new AddCommand(taskManager, TaskType.TODO, parameterData.getDescription());\n break;\n case DEADLINE:\n command = new AddCommand(taskManager,\n TaskType.DEADLINE, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case EVENT:\n command = new AddCommand(taskManager,\n TaskType.EVENT, parameterData.getDescription(),\n parameterData.getDateTime());\n break;\n case DELETE:\n command = new DeleteCommand(taskManager, parameterData.getTaskNumber());\n break;\n case BYE:\n command = new ByeCommand(taskManager);\n break;\n case FIND:\n command = new FindCommand(taskManager,\n parameterData.getFilterString(),\n parameterData.getMatchDate(),\n parameterData.getTimeSearch());\n break;\n case HELP:\n command = new HelpCommand(taskManager);\n break;\n default:\n commandUi.printNoCommandRan();\n }\n\n try {\n command.execute();\n } catch (IndexOutOfBoundsException e) {\n commandUi.printTaskDoneNotInRange();\n } catch (IllegalStateException e) {\n commandUi.printInvalidParameters();\n }\n }", "public String getCommand() { return command; }", "@Override\n public void execute() {\n }", "public void handleCommand(String command);", "public void execute() {\n\n\t}", "@Override\n\tpublic String getCommand() {\n\t\treturn model.getCommand();\n\t}", "public void execute() {\n if (valid()) {\n // behavior of the concrete command\n this.target_territory numArmies += to_deploy;\n }\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void initDefaultCommand() {\n }", "@Override\n public void execute() {}", "@Override\n public void execute() {\n this.context.setToken(new Token(context.getLexemeType(), context.getLexemeBuffer().toString()));\n this.context.getLexemeBuffer().setLength(0);\n if (command != null) {\n command.execute();\n }\n }", "CommandHandler() {\n registerArgument(new ChallengeCmd());\n registerArgument(new CreateCmd());\n }", "void execute() throws CommandExecutionException;", "public abstract String getCommandName();", "public abstract String getCommandName();", "public void getCommandsUpdate() {\n\t\t\r\n\t}", "private interface Command {\n public void execute();\n }", "public String \n getCommand() \n {\n return pCommand;\n }", "public void initDefaultCommand() {\n \n }", "public void setCommand(String command) {\n this.command = command;\n }", "@Test\n\tpublic void execute() {\n\t\tcommand.execute(request);\n\t}", "public String getCommand(){\n return command;\n }", "public void run() {\n\t\texecuteCommand( client, false );\n\t}" ]
[ "0.75810504", "0.7149151", "0.69093335", "0.6889422", "0.68735385", "0.68330485", "0.679391", "0.67624766", "0.67618775", "0.6748681", "0.6739473", "0.6738197", "0.6735732", "0.67096657", "0.67096657", "0.67096657", "0.66914517", "0.66811895", "0.66808766", "0.66742504", "0.66565543", "0.6642815", "0.6641114", "0.66293436", "0.66293436", "0.6628588", "0.66151226", "0.66097355", "0.66068584", "0.6603783", "0.65949583", "0.65937257", "0.6587893", "0.65785885", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.65716714", "0.6569755", "0.65679514", "0.6565403", "0.65594196", "0.65594196", "0.6555358", "0.65413994", "0.652733", "0.652733", "0.65268505", "0.65044737", "0.65044737", "0.65044737", "0.65007955", "0.65007955", "0.65007955", "0.65007955", "0.65007955", "0.65007955", "0.65007955", "0.6495435", "0.6486904", "0.6484251", "0.6483317", "0.6482477", "0.6475961", "0.64661086", "0.6460326", "0.6419687", "0.64195704", "0.6405945", "0.6400836", "0.63901424", "0.6388974", "0.6367762", "0.63634473", "0.63634473", "0.63634473", "0.63634473", "0.63634473", "0.63634473", "0.6360076", "0.63580257", "0.634957", "0.6341521", "0.63360107", "0.63360107", "0.633491", "0.633081", "0.6327587", "0.63224393", "0.6318623", "0.631512", "0.63119185", "0.63109225" ]
0.0
-1
TODO Autogenerated method stub
private void drawTile(int i, int j, Tile tile) { Rectangle rect = new Rectangle(175*i+50,j*175+25,175, 175); tilesDrawn.add(rect); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseEntered(MouseEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseReleased(MouseEvent arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Creates new form CustomerViewDetails
public CustomerViewDetails() { initComponents(); Toolkit tk = Toolkit.getDefaultToolkit(); int x = (int) tk.getScreenSize().getWidth(); int y = (int) tk.getScreenSize().getHeight(); this.setSize(x, y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value=\"/pizza/custCreate.html\", method = RequestMethod.POST)\r\n public ModelAndView custCreate(\r\n @ModelAttribute(\"customer\")Customer customer,\r\n @CookieValue(value = \"v\", defaultValue = \"\") String visitorId,\r\n HttpServletResponse response) throws Exception {\n visitorManager.setCookieValue(visitorId);\r\n \r\n // Get the current order\r\n Order order = shoppingCart.getOrder();\r\n ModelAndView result = new ModelAndView(\"/pizza/cardEntry\");\r\n result.addObject(\"order\", order);\r\n \r\n // TODO: Is the customer valid?\r\n \r\n // Add the customer to the order\r\n order.setCustomer(customer);\r\n shoppingCart.assignCustomer(customer);\r\n\r\n // Remember the visitor\r\n response.addCookie(new Cookie(\"v\", visitorManager.getCookieValue()));\r\n return result;\r\n }", "@GetMapping(\"/new\")\n public String newCustomer(Model model) {\n Customer customer = new Customer();\n Address actualAddress = new Address();\n Address registeredAddress = new Address();\n customer.setActualAddress(actualAddress);\n customer.setRegisteredAddress(registeredAddress);\n model.addAttribute(CUSTOMER, customer);\n return NEW_VIEW;\n }", "private Customer createCustomerData() {\n int id = -1;\n Timestamp createDate = DateTime.getUTCTimestampNow();\n String createdBy = session.getUsername();\n\n if (action.equals(Constants.UPDATE)) {\n id = existingCustomer.getCustomerID();\n createDate = existingCustomer.getCreateDate();\n createdBy = existingCustomer.getCreatedBy();\n }\n\n String name = nameField.getText();\n String address = addressField.getText() + \", \" + cityField.getText();\n System.out.println(address);\n String postal = postalField.getText();\n String phone = phoneField.getText();\n Timestamp lastUpdate = DateTime.getUTCTimestampNow();\n String lastUpdatedBy = session.getUsername();\n\n FirstLevelDivision division = divisionComboBox.getSelectionModel().getSelectedItem();\n int divisionID = division.getDivisionID();\n\n return new Customer(id, name, address, postal, phone, createDate, createdBy, lastUpdate, lastUpdatedBy, divisionID);\n }", "private PersonCtr createCustomer()\n {\n\n // String name, String addres, int phone, int customerID\n PersonCtr c = new PersonCtr();\n String name = jTextField3.getText();\n String address = jTextPane1.getText();\n int phone = Integer.parseInt(jTextField2.getText());\n int customerID = phone;\n Customer cu = new Customer();\n cu = c.addCustomer(name, address, phone, customerID);\n JOptionPane.showMessageDialog(null, cu.getName() + \", \" + cu.getAddress()\n + \", tlf.nr.: \" + cu.getPhone() + \" er oprettet med ID nummer: \" + cu.getCustomerID()\n , \"Kunde opretttet\", JOptionPane.INFORMATION_MESSAGE);\n return c;\n\n\n }", "@GetMapping(\"/showFormForAdd\")\r\n\tpublic String showFormForAdd(Model theModel){\n\t\tCustomer theCustomer = new Customer();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"customer\",theCustomer);\r\n\t\t\r\n\t\treturn \"customer-form\";\r\n\t}", "@GetMapping(\"/showForm\")\n public String showFormForAdd(Model theModel) {\n Customer theCustomer = new Customer();\n theModel.addAttribute(\"customer\", theCustomer);\n return \"customer-form\";\n }", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "@RequestMapping(\"/showForm\")\n\tpublic String showForm(Model theModel) {\n\t\tCustomer customer = new Customer();\n\n\t\t// add Customer object to the model\n\t\ttheModel.addAttribute(\"customer\", customer);\n\t\t\n\t\treturn \"customer-form\";\n\t}", "public CustomerNew () {\n\t\tsuper();\n\t}", "public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }", "public CreateCustomer() {\n initComponents();\n }", "public CustomerDetailsView displayDetailsView(char mode, Customer customer) { \r\n\r\n\t\tif(customerDetailsView == null) {\r\n\t\t\tcustomerDetailsView = new CustomerDetailsView() {\r\n\t\t\t\tpublic void cancelAction() {\r\n\t\t\t\t\tif(validateScreenBeforeClose()) {\r\n\t\t\t\t\t\tdisposeDetailsView();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tApplicationMaster.addScreen(customerDetailsView);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setTitle(getValue(\"TTLscrxxxxx001CustomerDetailsScreen\"));\r\n\t\tcustomerDetailsView.setScreenMode(mode);\r\n\t\tcustomerDetailsView.setController(this);\r\n\r\n\t\tif(mode != CustomerDetailsView.ADD && customer != null) {\r\n\t\t\tcustomerDetailsView.populateScreen(customer);\r\n\t\t}\r\n\r\n\t\tif(customerSearchView != null && customerSearchView.isVisible()) {\r\n\t\t\tcustomerSearchView.setVisible(false);\r\n\t\t}\r\n\r\n\t\tcustomerDetailsView.setVisible(true);\r\n\t\treturn customerDetailsView;\r\n\t}", "@PostMapping()\n public String createCustomer(\n @ModelAttribute(CUSTOMER) CustomerDTO customerDTO) {\n customerDTO.getActualAddress().setCreated(LocalDateTime.now());\n customerDTO.getRegisteredAddress().setCreated(LocalDateTime.now());\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n customerService.saveCustomer(customer);\n return REDIRECT_CLIENTS;\n }", "public PnNewCustomer() {\n initComponents();\n }", "@Override\n\tpublic void create(Customer t) {\n\n\t}", "private void showCreateCustomer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n request.setAttribute(\"customerTypes\",customerTypeService.findAll());\n RequestDispatcher dispatcher= request.getRequestDispatcher(\"/customer/create.jsp\");\n dispatcher.forward(request,response);\n System.out.println(\"customerTypes\" + customerTypeService.findAll());\n }", "private void createCustomer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n String customerName = request.getParameter(\"CustomerName\");\n System.out.println(\"them mới id\"+ customerName);\n String customerBir = request.getParameter(\"CustomerBir\");\n String gender = request.getParameter(\"Gender\");\n int cusIdNum =Integer.parseInt(request.getParameter(\"CusIdNum\"));\n int cusTelNum = Integer.parseInt(request.getParameter(\"CusTelNum\"));\n String cusEmail = request.getParameter(\"CusEmail\");\n String address = request.getParameter(\"Address\");\n String customerTypeId = request.getParameter(\"CustomerTypeId\");\n System.out.println(\"them mới id\"+ customerName);\n Customer customer = new Customer(customerName,customerBir,gender,cusIdNum,cusTelNum,cusEmail,address, new CustomerType(customerTypeId));\n customerService.save(customer);\n showCustomerList(request,response);\n System.out.println(\"them mới\"+ customer);\n }", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "@PostMapping(value=\"/createCustomer\")\n\tpublic String createCustomer()\n\t{\n\t\t//return customer\n\t\treturn \"Created Customer\";\n\t}", "@RequestMapping(\"/addCustomers/{id}\")\n\tpublic String customerForm(@PathVariable(\"id\") int id,Model m, Principal princpl) {\n\t\tAgentModel agentById = this.servimple.getAgentModelById(id);\n\t\tif(agentById.getPosition().equals(\"Active\")) {\n\t//\tAgentModel[] allAgent = this.servimple.getAllAgent();\n\t\t\n\t\t\tm.addAttribute(\"allagntid\", agentById.getId());\n\t\t\treturn \"Customer/customerForm\";\n\t\t\t\n\t\t}\n\t\telse {\n\t\t\tm.addAttribute(\"sorry\", \"Sorry! Your Id is Deactivated. To activate your id Plz Contact to admin.\");\n\t\t\treturn \"Agent/agentPanel\";\n\t\t}\n\t\t\n\t}", "@GetMapping(\"/showFormForAdd\") // @RequestMapping(path = \"/showFormForAdd\", method = RequestMethod.GET)\r\n\tpublic String showFormForAdd(Model theModel) {\n\t\tCustomer theCustomer = new Customer();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"customer\", theCustomer);\r\n\t\t\r\n\t\treturn \"customer-form\";\r\n\t}", "@GetMapping(value = \"/addCustomer\")\n\tpublic String getCustomer(Model model) {\n\t\t// Create object and add to model for form\n\t\tCustomer customer = new Customer();\n\t\tmodel.addAttribute(\"Customer\", customer);\n\t\t// Returns showCustomers.jsp (see webapp/jsp folder)\n\t\treturn \"addCustomer\";\n\t}", "@RequestMapping(value = \"/add\")\n public String addForm(Model model) {\n model.addAttribute(\"service\",fservice.findAllServices());\n model.addAttribute(\"customer\", mservice.findAllCustomer());\n model.addAttribute(\"customer\", new Customer());\n return \"customer-form\";\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "public CekCustomer() {\n initComponents();\n serviceCekCustomer = new CekCustomerServiceImp();\n setLocationRelativeTo(null);\n this.view();\n }", "@Test\n public void testCustomerFactoryCreate() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(1, customerController.getCustomerList().size());\n }", "public void goToCreate(View view) {\n Intent intent = new Intent(this, CreateAccountActivity.class);\n startActivity(intent);\n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@RequestMapping(method=RequestMethod.GET,value=\"/form_modelandview\")\n\tpublic ModelAndView getcustomerform_modelandview()\n\t{\n\t\t ModelAndView modelAndView = new ModelAndView(\"form\");\n\t\t modelAndView.addObject(\"message\", \"Model and View\");\t \n\t\t\t\t \n\t\tSystem.out.println(\"============Customer form called============\");\n\t\treturn modelAndView;\n\t}", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "public ViewCustomerKamera() {\n initComponents();\n connectDatabase();\n //updateTable();\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public void showCreateActivtiy(View v){\n Intent intent = new Intent(this, CreateActivity.class);\n startActivity(intent);\n }", "public TCDetailsView2() {\n initComponents();\n }", "public ViewDeliveryDetailManagedBean() {\n deliveryDetailToView = new DeliveryDetail();\n }", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "@RequestMapping(method=RequestMethod.GET,value=\"/customerform\")\n\tpublic String getcustomerform(Model model)\n\t{\n\t\tmodel.addAttribute(\"message\", \"Using model\");\n\t\tmodel.addAttribute(\"customer\", new CustomerDTO());\n\t\t\n\t\t\n\t\tSystem.out.println(\"============Customer form called============\");\n\t\treturn \"customer_registrationform\";\n\t}", "@PostMapping(\"/checkCustomerID\")\n public ModelAndView checkCustomerID(@ModelAttribute(\"customerCheck\") Customer customer,\n Model model){\n ModelAndView modelAndView = new ModelAndView();\n\n int customer_id = customer.getCustomerID();\n if (customerServiceImpl.getCustomer(customer_id)!=null){\n model.addAttribute(\"customerInfo\", customerServiceImpl.getCustomer(customer_id));\n modelAndView.setViewName(\"/content/openNewCurrentAccount\");\n return modelAndView;\n }\n model.addAttribute(\"invalid_user_error\", true);\n modelAndView.setViewName(\"/content/checkCustomer\");\n return modelAndView;\n }", "private void createCustomer(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n Customer checkCustomer = CustomerDao.getCustomer(id);\n if (checkCustomer == null) {\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer newCustomer = new Customer(id, name, phone, email);\n CustomerDao.addCustomer(newCustomer);\n response.sendRedirect(\"/\");\n }\n else {\n String message = \"This ID already exist\";\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer ExitCustomer = new Customer(id, name, phone, email);\n request.setAttribute(\"message\", message);\n request.setAttribute(\"customer\", ExitCustomer);\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"customer/newCustomer.jsp\");\n dispatcher.forward(request, response);\n }\n }", "public void view() {\n\t\t\t\n\t\t\tSystem.out.println(\"Poping up window to show each order of customer @ AdminSaleController\");\n\t\t\tCustomerOrderMain vo = new CustomerOrderMain();\n\t\t vo.start(ps);\n\t\t\t\n\t\t}", "@PostMapping(value = \"/customers\", consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic void createCustomer(@RequestBody CustomerDTO custDTO) {\n\t\tlogger.info(\"Creation request for customer {}\", custDTO);\n\t\tcustService.createCustomer(custDTO);\n\t}", "@Override\n\tpublic Customers create(Customers newcust) {\n\t\tif (newcust.getId()!=null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers savecust = CustRepo.save(newcust);\n\t\treturn savecust;\n\t}", "public CustomerListForm() {\n initComponents();\n findAllData();\n }", "Customers createCustomers();", "public void AddCustomer(View v) {\r\n try {\r\n if (edtCustName.getText().toString().equalsIgnoreCase(\"\") || edtCustPhoneNo.getText().toString().equalsIgnoreCase(\"\") || edtCustAddress.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please fill all details before adding customer\");\r\n } else if (edtCustPhoneNo.getText().toString().length()!= 10)\r\n {\r\n MsgBox.Show(\"Warning\", \"Please fill 10 digit customer phone number\");\r\n return;\r\n } else{\r\n Cursor crsrCust = dbBillScreen.getCustomer(edtCustPhoneNo.getText().toString());\r\n if (crsrCust.moveToFirst()) {\r\n MsgBox.Show(\"Note\", \"Customer Already Exists\");\r\n } else {\r\n String gstin = etCustGSTIN.getText().toString().trim().toUpperCase();\r\n if (gstin == null) {\r\n gstin = \"\";\r\n }\r\n boolean mFlag = GSTINValidation.checkGSTINValidation(gstin);\r\n if(mFlag)\r\n {\r\n if( !GSTINValidation.checkValidStateCode(gstin,this))\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please Enter Valid StateCode for GSTIN\");\r\n }\r\n else {\r\n InsertCustomer(edtCustAddress.getText().toString(), edtCustPhoneNo.getText().toString(),\r\n edtCustName.getText().toString(), 0, 0, 0, gstin);\r\n //ResetCustomer();\r\n //MsgBox.Show(\"\", \"Customer Added Successfully\");\r\n Toast.makeText(myContext, \"Customer Added Successfully\", Toast.LENGTH_SHORT).show();\r\n ControlsSetEnabled();\r\n checkForInterStateTax();\r\n }\r\n }else\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please enter valid GSTIN for customer\");\r\n }\r\n\r\n }\r\n }\r\n } catch (Exception ex) {\r\n MsgBox.Show(\"Error\", ex.getMessage());\r\n }\r\n }", "public AddCustomer() {\n initComponents();\n }", "@FXML\n void addNewCustomer(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/AddCustomer.fxml\"));\n loader.load();\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n }", "CreateCustomer(JFrame master, Connection conn) {\n\t\tsuper(\"Create New Customer\");\n\t\tthis.conn = conn;\n\t\tgetContentPane().setLayout(new FormLayout(new ColumnSpec[] {\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),\n\t\t\t\tFormFactory.RELATED_GAP_COLSPEC,\n\t\t\t\tColumnSpec.decode(\"default:grow\"),},\n\t\t\tnew RowSpec[] {\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\n\t\t\t\tFormFactory.RELATED_GAP_ROWSPEC,\n\t\t\t\tFormFactory.DEFAULT_ROWSPEC,}));\n\t\t\n\t\tJLabel lblGender = new JLabel(\"Gender\");\n\t\tgetContentPane().add(lblGender, \"2, 2\");\n\t\t\n\t\tJLabel lblTitle = new JLabel(\"Title\");\n\t\tgetContentPane().add(lblTitle, \"4, 2\");\n\t\t\n\t\tgenderBox = new JComboBox(genders);\n\t\tgenderBox.setAutoscrolls(true);\n\t\tgetContentPane().add(genderBox, \"2, 4, fill, default\");\n\t\t\n\t\ttitleBox = new JComboBox(titles);\n\t\tgetContentPane().add(titleBox, \"4, 4\");\n\t\t\n\t\tJLabel lblMi = new JLabel(\"M.I.\");\n\t\tgetContentPane().add(lblMi, \"6, 4, right, default\");\n\t\t\n\t\tfieldMidName = new JTextField();\n\t\tgetContentPane().add(fieldMidName, \"8, 4, left, default\");\n\t\tfieldMidName.setColumns(10);\n\t\t\n\t\tJLabel lblFirstName = new JLabel(\"First Name*\");\n\t\tgetContentPane().add(lblFirstName, \"2, 6, right, default\");\n\t\t\n\t\t\n\t\tfieldFirstName = new JTextField();\n\t\tgetContentPane().add(fieldFirstName, \"4, 6, fill, default\");\n\t\tfieldFirstName.setColumns(10);\n\t\t\n\t\tnew HighlightListener(fieldFirstName);\n\t\t\n\t\tJLabel lblLastName = new JLabel(\"Last Name*\");\n\t\tgetContentPane().add(lblLastName, \"6, 6, right, default\");\n\t\t\n\t\tfieldLastName = new JTextField();\n\t\tgetContentPane().add(fieldLastName, \"8, 6, fill, default\");\n\t\tfieldLastName.setColumns(10);\n\t\tnew HighlightListener(fieldLastName);\n\t\t\n\t\tJLabel lblUserName = new JLabel(\"User Name*\");\n\t\tgetContentPane().add(lblUserName, \"2, 8, right, default\");\n\t\t\n\t\t\n\t\tfieldUsername = new JTextField();\n\t\tgetContentPane().add(fieldUsername, \"4, 8, fill, default\");\n\t\tfieldUsername.setColumns(10);\n\t\tnew HighlightListener(fieldUsername);\n\t\t\n\t\tJLabel lblPassword = new JLabel(\"Password*\");\n\t\tgetContentPane().add(lblPassword, \"6, 8, right, default\");\n\t\t\n\t\tfieldPassword = new JTextField();\n\t\tgetContentPane().add(fieldPassword, \"8, 8, fill, default\");\n\t\tfieldPassword.setColumns(10);\n\t\tnew HighlightListener(fieldPassword);\n\t\t\n\t\tJLabel lblAddress = new JLabel(\"Address\");\n\t\tgetContentPane().add(lblAddress, \"2, 10, right, default\");\n\t\t\n\t\tfieldAddress = new JTextField();\n\t\tgetContentPane().add(fieldAddress, \"4, 10, fill, default\");\n\t\tfieldAddress.setColumns(10);\n\t\t\n\t\tJLabel lblCity = new JLabel(\"City\");\n\t\tgetContentPane().add(lblCity, \"6, 10, right, default\");\n\t\t\n\t\tfieldCity = new JTextField();\n\t\tgetContentPane().add(fieldCity, \"8, 10, fill, default\");\n\t\tfieldCity.setColumns(10);\n\t\t\n\t\tJLabel lblState = new JLabel(\"State\");\n\t\tgetContentPane().add(lblState, \"2, 12, right, default\");\n\t\t\n\t\tfieldState = new JTextField();\n\t\tgetContentPane().add(fieldState, \"4, 12, fill, default\");\n\t\tfieldState.setColumns(10);\n\t\t\n\t\tJLabel lblZipCode = new JLabel(\"Zip Code\");\n\t\tgetContentPane().add(lblZipCode, \"6, 12, right, default\");\n\t\t\n\t\tfieldZipcode = new JTextField();\n\t\tgetContentPane().add(fieldZipcode, \"8, 12, fill, default\");\n\t\tfieldZipcode.setColumns(10);\n\t\t\n\t\tJLabel lblEmail = new JLabel(\"Email\");\n\t\tgetContentPane().add(lblEmail, \"2, 14, right, default\");\n\t\t\n\t\tfieldEmail = new JTextField();\n\t\tgetContentPane().add(fieldEmail, \"4, 14, fill, default\");\n\t\tfieldEmail.setColumns(10);\n\t\t\n\t\tJLabel lblTelephone = new JLabel(\"Telephone\");\n\t\tgetContentPane().add(lblTelephone, \"6, 14, right, default\");\n\t\t\n\t\tfieldTelephone = new JTextField();\n\t\tgetContentPane().add(fieldTelephone, \"8, 14, fill, default\");\n\t\tfieldTelephone.setColumns(10);\n\t\t\n\t\tJLabel lblBirthday = new JLabel(\"Birthday\");\n\t\tgetContentPane().add(lblBirthday, \"2, 16, right, default\");\n\t\t\n\t\tfieldBirthday = new JTextField();\n\t\tgetContentPane().add(fieldBirthday, \"4, 16, fill, default\");\n\t\tfieldBirthday.setColumns(10);\n\t\t\n\t\tJLabel lblMaidenName = new JLabel(\"Maiden Name\");\n\t\tgetContentPane().add(lblMaidenName, \"2, 20, right, default\");\n\t\t\n\t\tfieldMaidenName = new JTextField();\n\t\tgetContentPane().add(fieldMaidenName, \"4, 20, fill, default\");\n\t\tfieldMaidenName.setColumns(10);\n\t\t\n\t\tJLabel lblSocialSecurity = new JLabel(\"Social Security\");\n\t\tgetContentPane().add(lblSocialSecurity, \"6, 20, right, default\");\n\t\t\n\t\tfieldSocialSecurity = new JTextField();\n\t\tgetContentPane().add(fieldSocialSecurity, \"8, 20, fill, default\");\n\t\tfieldSocialSecurity.setColumns(10);\n\t\t\n\t\tJLabel lblCreditCardType = new JLabel(\"Credit Card Type\");\n\t\tgetContentPane().add(lblCreditCardType, \"2, 24, right, default\");\n\t\t\n\t\tcctypeBox = new JComboBox(cctypes);\n\t\tgetContentPane().add(cctypeBox, \"4, 24, fill, default\");\n\t\t\n\t\tJLabel lblCreditCard = new JLabel(\"Credit Card #\");\n\t\tgetContentPane().add(lblCreditCard, \"6, 24, right, default\");\n\t\t\n\t\tfieldCCnumber = new JTextField();\n\t\tgetContentPane().add(fieldCCnumber, \"8, 24, fill, default\");\n\t\tfieldCCnumber.setColumns(10);\n\t\t\n\t\tJLabel lblCcv = new JLabel(\"CCV\");\n\t\tgetContentPane().add(lblCcv, \"2, 26, right, default\");\n\t\t\n\t\tfieldCCV = new JTextField();\n\t\tgetContentPane().add(fieldCCV, \"4, 26, fill, default\");\n\t\tfieldCCV.setColumns(10);\n\t\t\n\t\tJLabel lblExpirDate = new JLabel(\"Expir. Date\");\n\t\tgetContentPane().add(lblExpirDate, \"6, 26, right, default\");\n\t\t\n\t\tfieldExpirDate = new JTextField();\n\t\tgetContentPane().add(fieldExpirDate, \"8, 26, fill, default\");\n\t\tfieldExpirDate.setColumns(10);\n\t\t\n\t\tJButton btnSubmit = new JButton(\"Submit\");\n\t\tgetContentPane().add(btnSubmit, \"4, 32\");\n\t\t\n\t\t\n\t\tbtnSubmit.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ee) {\n\t\t\t\tif (CreateCustomer.this.fieldFirstName.getText().trim().length() == 0\n\t\t\t\t\t|| CreateCustomer.this.fieldLastName.getText().trim().length() == 0\n\t\t\t\t\t|| CreateCustomer.this.fieldUsername.getText().trim().length() == 0\n\t\t\t\t\t|| CreateCustomer.this.fieldPassword.getText().trim().length() == 0\n\t\t\t\t\t\t) {\n\t\t\t\t\tJOptionPane.showMessageDialog(CreateCustomer.this, \"Please fill highlighted fields.\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinsertCustomer();\n\t\t\t\t\tJOptionPane.showMessageDialog(CreateCustomer.this, \"Created new user '\" + \n\t\t\t\t\t\t\t\tCreateCustomer.this.fieldUsername.getText() + \"'\");\n\t\t\t\t\tCreateCustomer.this.setVisible(false);\n\t\t\t\t\t\n\t\t\t\t\tCreateCustomer.this.dispose();\n\t\t\t\t\tCreateCustomer.this.parent.setVisible(true);\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tparent = master;\n\t\tJButton btnCancel = new JButton(\"Cancel\");\n\t\tgetContentPane().add(btnCancel, \"6, 32\");\n\t\tbtnCancel.addActionListener(new ActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent ee) {\n\t\t\t\tCreateCustomer.this.setVisible(false);\n\t\t\t\tCreateCustomer.this.dispose();\n\t\t\t\tCreateCustomer.this.parent.setVisible(true);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t\n\t\tthis.setSize(new Dimension (500, 500));\n\t\t\n\t\tthis.addWindowListener(this);\n\t\tthis.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\t\t\n\t\tthis.pack();\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setVisible(true);\n\t}", "public static void createCustomer() throws IOException\r\n\t{\r\n\t\tclearScreen();\r\n\t\t\r\n\t\tSystem.out.println(\"[CUSTOMER CREATOR]\\n\");\r\n\t\tSystem.out.println(\"Enter the name of the customer you would like to create:\");\r\n\t\t\r\n\t\t// create a new customer with a user-defined name\r\n\t\tCustomer c = new Customer(inputString(false));\r\n\t\t// add the customer to the ArrayList\r\n\t\tcustomers.add(c);\r\n\t\t// display the edit screen for the customer\r\n\t\teditCustomer(c);\r\n\t}", "Customer(){}", "@FXML\n void onActionAddCustomer(ActionEvent event) throws IOException {\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(Objects.requireNonNull(getClass().getResource(\"/Views/AddCustomer.fxml\")));\n stage.setScene(new Scene(scene));\n stage.show();\n }", "@PostMapping(\"/createAccount\")\n public ModelAndView createNewAccount(AccountCreateDTO createDTO){\n ModelAndView modelAndView = new ModelAndView();\n\n accountService.createAccount(createDTO);\n modelAndView.addObject(\"successMessage\", \"Account has been created\");\n modelAndView.setViewName(\"accountPage\");\n\n return modelAndView;\n }", "@RequestMapping(\"/new\")\n public String newStudent(ModelMap view) {\n Student student = new Student();\n view.addAttribute(\"student\", student);\n view.addAttribute(\"listurl\", listurl);\n return(\"newstudent\");\n }", "public CustomerNew (\n\t\t Long in_id\n ) {\n\t\tthis.setId(in_id);\n }", "public void create(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"INSERT INTO customer (name, id, phone) VALUES (?, ?, ?)\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.executeUpdate();\n System.out.println(\"Customer created.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Creation error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}", "@FXML\n private void addCustomerButton(ActionEvent event)\n {\n bankLogic.addCustomer(textFieldName.getText(),Long.parseLong(textFieldPnr.getText()));\n for (int i = 0; i < bankLogic.getCustomers().size(); i++)\n {\n System.out.println(bankLogic.getCustomers().get(i).toString());\n }\n \n }", "private Customer parseNewCustomer(HttpServletRequest request, int cust_id){\n\t\t//parse new customer from request\n\t\tCustomer cust = new Customer();\n\t\tcust.setID(cust_id);\n\t\tcust.setFirstName(request.getParameter(\"first_name\"));\n\t\tcust.setLastName(request.getParameter(\"last_name\"));\n\t\tcust.setAddress(request.getParameter(\"address\"));\n\t\tcust.setCity(request.getParameter(\"city\"));\n\t\tcust.setState(request.getParameter(\"state\"));\n\t\tcust.setPhoneNumber(request.getParameter(\"phone\"));\n\t\treturn cust;\n\t}", "public Customer() {\r\n\t\tthis.name = \"\";\r\n\t\tthis.parcelID = \"\";\r\n\t\tthis.seqNo = 0;\r\n\t}", "@RequestMapping(value = \"/register\", method = RequestMethod.GET)\n public ModelAndView displayRegisterForm() {\n return new ModelAndView(\"registerForm\", \"customer\", new Customer());\n }", "public ResponseEntity<?> createCustomer(customer.controller.Customer customer);", "@Override\n public void Create() {\n\n initView();\n }", "@Test\n\tpublic void create() {\n\t\t// Given\n\t\tString name = \"Mark\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"0211616447\";\n\n\t\t// When\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertNotNull(customer);\n\t}", "private CustomerDetails initCustomerDetails() {\n CustomerDetails mCustomerDetails = new CustomerDetails();\n mCustomerDetails.setPhone(\"085310102020\");\n mCustomerDetails.setFirstName(\"user fullname\");\n mCustomerDetails.setEmail(\"[email protected]\");\n return mCustomerDetails;\n }", "public void createAccount(View view) {\n Intent intent = new Intent(this, UserAccountCreateActivity.class);\n startActivity(intent);\n }", "@DOpt(type = DOpt.Type.ObjectFormConstructor)\n\t@DOpt(type = DOpt.Type.RequiredConstructor)\n\tpublic Customer( @AttrRef(\"name\") String name,\n\t\t\t@AttrRef(\"gender\") Gender gender,\n\t\t\t@AttrRef(\"dob\") Date dob, \n\t\t\t@AttrRef(\"address\") Address address, \n\t\t\t@AttrRef(\"email\") String email,\n\t\t\t@AttrRef(\"phone\") String phone) {\n\t\tthis(null, name, gender,dob, address, email, phone, null);\n\t}", "private void showCustomerInfoDialog(Customer customer) {\n\t\ttry {\n\t\t\t// set up the root for the customer information dialog\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(C195Application.class.getResource(\"view/AddCustomer.fxml\"));\n\t\t\tloader.setResources(lang);\n\t\t\tAnchorPane customerInfoRoot = (AnchorPane) loader.load();\n\n\t\t\t// set up the stage for the customer information dialog\n\t\t\tStage customerInfoStage = new Stage();\n\t\t\tcustomerInfoStage.setTitle(\"\");\n\t\t\tcustomerInfoStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tcustomerInfoStage.initOwner(stage);\n\n\t\t\t// add a new scene with the root to the stage\n\t\t\tScene scene = new Scene(customerInfoRoot);\n\t\t\tcustomerInfoStage.setScene(scene);\n\n\t\t\t// get the controller for the dialog and pass a reference \n\t\t\t// the customer info dialog stage, and a customer, if one was selected\n\t\t\tAddCustomerController controller = loader.getController();\n\t\t\tcontroller.setupDialog(customerInfoStage, customer);\n\n\t\t\t// show the customer information dialog\n\t\t\tcustomerInfoStage.showAndWait();\n\n\t\t\t// refresh the customer list after an update\n\t\t\tCustomer newCustomer = controller.getNewCustomer();\n\t\t\tif (newCustomer == null) return;\n\n\t\t\tif(customer == null) {\n\t\t\t\tcustomers.add(newCustomer);\n\t\t\t} else {\n\t\t\t\tcustomers.set(customers.indexOf(customer), newCustomer);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "void createCustomers() {\r\n\t\tSystem.out.println(\"\\nCreating 5 customers:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\tCustomer2 c2 = new Customer2(\"Serap\", \"Atik\");\r\n\t\tCustomer2 c3 = new Customer2(\"Kemal\", \"Tanir\");\r\n\t\tCustomer2 c4 = new Customer2(\"Betul\", \"Kara\");\r\n\t\tCustomer2 c5 = new Customer2(\"Selman\", \"Saki\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\tem.persist(c2);\r\n\t\tem.persist(c3);\r\n\t\tem.persist(c4);\r\n\t\tem.persist(c5);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "SerialResponse createCustomer(PinCustomerPost pinCustomerPost);", "@RequestMapping(\"/cabaretier/toevoegen\")\n public String showNewProductPage(Model model) {\n Cabaretier cabaretier = new Cabaretier();\n model.addAttribute(\"cabaretier\", cabaretier);\n\n return \"CabaretierToevoegen\";\n }", "private String renderCreatePage(Model model) {\n\t\tmodel.addAttribute(\"availableProviders\", providerService.getAllProviders());\n\t\treturn \"vm/create\";\n\t}", "@Then(\"^user clicks on new customer tab$\")\n\tpublic void user_clicks_on_new_customer_tab() {\n\t driver.findElement(By.xpath(\"//a[@href='addcustomerpage.php']\")).click();\n\t \n\t}", "@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }", "@FXML\n void OnActionShowAddCustomerScreen(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/AddCustomer.fxml\"));\n stage.setTitle(\"Add Customer\");\n stage.setScene(new Scene(scene));\n stage.show();\n }", "public CustomerFragment() {\n }", "@FXML\r\n void onActionAddCustomer(ActionEvent event) throws IOException {\r\n\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/AddCustomer.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n\r\n\r\n }", "public Customermodel addCustomer(Customermodel customermodel) {\n\t\t return customerdb.save(customermodel);\n\t }", "public Customer_Edit() {\n initComponents();\n getMenu_Catagory();\n getMenu();\n showmenu_table();\n getPromotion();\n getPromotion_Menu();\n showpromotion_table();\n getIngredient();\n getStock();\n if(c.getmaintenance()==true){\n t.setid(\"01\");\n }else{\n }\n getorder();\n getorder_menu();\n table_number_txt.setText(t.getid());\n showorder_table();\n }", "public void createOrderInDB() {\n if (newCustomer.isSelected()) {\n\n if(customerPhone.getText().isEmpty() ) {\n customerPhone.setStyle(\"-fx-focus-color: RED\");\n customerPhone.requestFocus();\n } else if(customerName.getText().isEmpty()) {\n customerName.setStyle(\"-fx-focus-color: RED\");\n customerName.requestFocus();\n } else {\n ControllerPartner controller = new ControllerPartner();\n controller.createOrderNewCustomer(customerPhone.getText(), customerName.getText(), totalPrice.getText());\n Label successMessage = new Label(\"Order is created, an sms with invoice is sent to the customer\");\n successMessage.setLayoutX(305);\n successMessage.setLayoutY(800);\n successMessage.setTextFill(Color.CORAL);\n root.getChildren().add(successMessage);\n content();\n\n customerName.clear();\n customerPhone.clear();\n\n }\n\n\n\n\n } else if (existingCustomer.isSelected()) {\n }\n }", "public CustomerListFragment() {\n }", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public void addCustomer(CustomerSignup p)\n {\n Session session = this.sessionFactory.getCurrentSession();\n \n session.persist(p);\n \n CustomerLogin cl=new CustomerLogin();\n cl.setUsername(p.getUsername());\n cl.setPassword(p.getPassword());\n cl.setId(p.getId());\n session.persist(cl);\n \n Authorities a = new Authorities();\n a.setUsername(p.getUsername());\n a.setAuthority(\"ROLE_USER\");\n a.setId(p.getId());\n session.saveOrUpdate(a);\n\n session.flush();\n \n logger.info(\"Customer saved successfully, Customer Details=\"+p);\n }", "@FXML\n public void saveCust(ActionEvent event) throws SQLException {\n\n if (completionCheck() < 0)\n return;\n\n int id = Integer.parseInt(idTB.getText().trim());\n\n CustomerDAOImpl.updateCustomer(id , nameTB.getText().trim(), addressTB.getText().trim(), postCodeTB.getText().trim(), stateProvinceCB.getSelectionModel().getSelectedItem().toString(), phone.getText());\n\n AlertMessage.addCustomerInfo();\n\n stage = (Stage)((Button) event.getSource()).getScene().getWindow();\n try {\n scene = FXMLLoader.load(getClass().getResource(\"../View_Controller/MainScreen.fxml\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n stage.setScene(new Scene(scene));\n stage.show();\n }", "private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public Customer (String customerName, String address,\n String telephoneNumber){\n this.customerName = customerName;\n this.address = address;\n this.telephoneNumber = telephoneNumber;\n }", "Customer() \n\t{\n\t}", "private void updateScreenCustomerDetails(Customer c) {\n // - update main title with customers full name\n tvCustomerMainTitle.setText(customer.toString());\n\n // - update screen with customer ID\n textViewID.setText(customer.getCustomerID());\n\n // - update screen with customer email\n tvCustomerEmail.setText(customer.getEmail());\n\n // - update screen with customer VIP status\n tvCustomerVipStatus.setText(customer.vipStatusToString());\n\n // - update avctive game and lane fields\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "public Customer(String name) {\n this.name=name;\n }", "@RequestMapping(value = \"/createCustomer\", method = RequestMethod.POST)\n\tpublic String createCustomer(@RequestBody Customer customer) throws Exception {\n\n\t\tlog.log(Level.INFO, \"Customer zawiera\", customer.toString());\n\t\tcustomerRepository.save(customer); // Zapis do bazy\n\t\tSystem.out.println(\"##################### Utworzono klienta: \" + customer);\n\t\treturn \"Klient zostal stworzony\" + customer;\n\t}", "@PostMapping(\"/addcustomer\")\n\tpublic String save(@ModelAttribute(\"customer\") Customer theCustomer) {\n\t\tcustomerServices.save(theCustomer);\n\t\treturn \"redirect:/dairymilk/customers\";\n\t}", "@RequestMapping(value=\"/insertCust\",method=RequestMethod.POST)\r\n\tpublic String saveCust(@ModelAttribute(\"customer\")Customer cust,ModelMap map){\r\n\t\t//generating pwd,token using codeUtil\r\n\t\tString token=codeUtil.genToken();\r\n\t\tString pwd=codeUtil.getPwd();\r\n\t\t//encoding using codec util\r\n\t\tString encToken=codecUtil.doEncode(token);\r\n\t\tString encPwd=codecUtil.doEncode(pwd);\r\n\t\t//set encoded values to customer (model attribute)\r\n\t\tcust.setPassword(encPwd);\r\n\t\tcust.setAccTock(encToken);\r\n\t\t//save object using SL.\r\n\t\tint custId=service.saveCustomer(cust);\r\n\r\n\t\t//send email\r\n\t\tString text=\"welcome to Customer :\"+cust.getCustName()+\r\n\t\t\t\t\"(\"+cust.getCustType()+\"),Your user name is:\"+cust.getCustEmail()\r\n\t\t\t\t+\",password is:\"+pwd+\",token is:\"+token;\r\n\t\tcommonUtil.sendEmail(cust.getCustEmail(), \"welcome to Customer\", text);\r\n\t\t//send success msg\r\n\t\tmap.addAttribute(\"msg\",\"Customer added with Id:\"+custId);\r\n\t\treturn \"CustomerReg\";\r\n\t}", "public CustomerView(JPanel topPanel, JPanel mainPanel, JPanel bottomPane) {\n super(topPanel, mainPanel, bottomPane);\n inventory = new ProductInventory();\n myShoppingCart = new ShoppingCart();\n addToCartBtn = new JButton[MAX_NUMB_PRODUCTS];\n }", "private void loadCustomerData() {\n\t\tCustomerDTO cust1 = new CustomerDTO();\n\t\tcust1.setId(null);\n\t\tcust1.setFirstName(\"Steven\");\n\t\tcust1.setLastName(\"King\");\n\t\tcust1.setEmail(\"[email protected]\");\n\t\tcust1.setCity(\"Hyderabad\");\n\t\tcustomerService.createCustomer(cust1);\n\n\t\tCustomerDTO cust2 = new CustomerDTO();\n\t\tcust2.setId(null);\n\t\tcust2.setFirstName(\"Neena\");\n\t\tcust2.setLastName(\"Kochhar\");\n\t\tcust2.setEmail(\"[email protected]\");\n\t\tcust2.setCity(\"Pune\");\n\t\tcustomerService.createCustomer(cust2);\n\n\t\tCustomerDTO cust3 = new CustomerDTO();\n\t\tcust3.setId(null);\n\t\tcust3.setFirstName(\"John\");\n\t\tcust3.setLastName(\"Chen\");\n\t\tcust3.setEmail(\"[email protected]\");\n\t\tcust3.setCity(\"Bangalore\");\n\t\tcustomerService.createCustomer(cust3);\n\n\t\tCustomerDTO cust4 = new CustomerDTO();\n\t\tcust4.setId(null);\n\t\tcust4.setFirstName(\"Nancy\");\n\t\tcust4.setLastName(\"Greenberg\");\n\t\tcust4.setEmail(\"[email protected]\");\n\t\tcust4.setCity(\"Mumbai\");\n\t\tcustomerService.createCustomer(cust4);\n\n\t\tCustomerDTO cust5 = new CustomerDTO();\n\t\tcust5.setId(5L);\n\t\tcust5.setFirstName(\"Luis\");\n\t\tcust5.setLastName(\"Popp\");\n\t\tcust5.setEmail(\"[email protected]\");\n\t\tcust5.setCity(\"Delhi\");\n\t\tcustomerService.createCustomer(cust5);\n\n\t}", "public void setCustomerId(int customerId) \n {\n this.customerId = customerId;\n }" ]
[ "0.6954732", "0.6895723", "0.65097797", "0.647448", "0.6357762", "0.63163406", "0.6258497", "0.6225981", "0.62087035", "0.61897653", "0.6174532", "0.6143224", "0.6126569", "0.6052671", "0.6048801", "0.6024589", "0.6016942", "0.6002363", "0.59492004", "0.59019524", "0.58617043", "0.5856139", "0.5832294", "0.57892364", "0.5776307", "0.57665145", "0.57654184", "0.5763325", "0.5761269", "0.57596594", "0.57222193", "0.5690438", "0.56743205", "0.566126", "0.5643842", "0.5639317", "0.5639317", "0.5639317", "0.5639317", "0.5623584", "0.5612388", "0.56031406", "0.55999684", "0.55812114", "0.5576389", "0.5575862", "0.5564072", "0.55481523", "0.5524006", "0.55171543", "0.55076885", "0.5494488", "0.54942936", "0.5490707", "0.5490276", "0.5482294", "0.5480767", "0.54804325", "0.54732996", "0.5468297", "0.54653263", "0.54409945", "0.54359937", "0.54315895", "0.54282117", "0.5426711", "0.5416263", "0.5414397", "0.54131746", "0.5406586", "0.5397862", "0.5378846", "0.53720164", "0.53668785", "0.53630304", "0.5361244", "0.5360511", "0.53557456", "0.5353787", "0.53530747", "0.53529596", "0.53443897", "0.5341563", "0.53369063", "0.53357154", "0.53304064", "0.5327584", "0.5324203", "0.53234273", "0.5322608", "0.53218395", "0.53179854", "0.5315704", "0.53011036", "0.529575", "0.5294279", "0.52902794", "0.5287034", "0.52865845", "0.528571" ]
0.5990033
18
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); txtName = new javax.swing.JTextField(); txtSurname = new javax.swing.JTextField(); txtcustid = new javax.swing.JTextField(); txtnic = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); btnPersonalDetails = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); tblupdatetour = new javax.swing.JTable(); jLabel5 = new javax.swing.JLabel(); txtpending = new javax.swing.JTextField(); btnDiscountDetails = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel2.setBackground(new java.awt.Color(255, 255, 255)); jPanel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, null, new java.awt.Color(255, 255, 153), null, null)); jLabel2.setText("Name"); jLabel3.setText("Customer Id"); jLabel4.setText("Surname"); txtName.setEditable(false); txtName.setBackground(new java.awt.Color(255, 255, 255)); txtName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtNameActionPerformed(evt); } }); txtSurname.setEditable(false); txtSurname.setBackground(new java.awt.Color(255, 255, 255)); txtcustid.setEditable(false); txtcustid.setBackground(new java.awt.Color(255, 255, 255)); txtnic.setEditable(false); txtnic.setBackground(new java.awt.Color(255, 255, 255)); jLabel6.setText("NIC"); btnPersonalDetails.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N btnPersonalDetails.setText("View Personal Details"); btnPersonalDetails.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnPersonalDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnPersonalDetailsActionPerformed(evt); } }); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel1.setText("Personal Details"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(37, 37, 37) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(1027, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtcustid, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtSurname, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtnic, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnPersonalDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(87, 87, 87)))) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtSurname, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtnic, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(btnPersonalDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtcustid, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(56, Short.MAX_VALUE)) ); tblupdatetour.setBackground(new java.awt.Color(204, 255, 255)); tblupdatetour.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED)); tblupdatetour.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N tblupdatetour.setForeground(new java.awt.Color(255, 0, 0)); tblupdatetour.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(tblupdatetour); jLabel5.setFont(new java.awt.Font("Adobe Caslon Pro Bold", 1, 14)); // NOI18N jLabel5.setText("Pending Tours"); txtpending.setEditable(false); txtpending.setBackground(new java.awt.Color(204, 204, 255)); txtpending.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N txtpending.setForeground(new java.awt.Color(0, 0, 204)); txtpending.setBorder(null); txtpending.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtpendingActionPerformed(evt); } }); btnDiscountDetails.setFont(new java.awt.Font("Verdana", 1, 14)); // NOI18N btnDiscountDetails.setText("View Document Details"); btnDiscountDetails.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnDiscountDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDiscountDetailsActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32) .addComponent(txtpending, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 926, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 100, Short.MAX_VALUE) .addComponent(btnDiscountDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(78, 78, 78)))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(308, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(txtpending, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(103, 103, 103)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(btnDiscountDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(174, 174, 174)))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(16, 16, 16) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(382, Short.MAX_VALUE))) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
End of variables declaration//GENEND:variables
public customerdetails getCsd() { return cd; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo21779D() {\n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21780E() {\n }", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6944a() {\n }", "public static void listing5_14() {\n }", "public void mo1405e() {\n }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "void mo57277b();", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo21784I() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private void yy() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "static void feladat4() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.58814824", "0.5854075", "0.5851759", "0.58514243", "0.58418584", "0.58395296", "0.5835063", "0.582234", "0.58090156", "0.5802706", "0.5793836", "0.57862717", "0.5784062", "0.5783567", "0.5782131", "0.57758564", "0.5762871", "0.5759349", "0.5745087", "0.57427835", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.573309", "0.57326084", "0.57301426", "0.57266665", "0.57229686", "0.57175463", "0.5705802", "0.5698347", "0.5697827", "0.569054", "0.5689405", "0.5686434", "0.56738997", "0.5662217", "0.56531453", "0.5645255", "0.5644223", "0.5642628", "0.5642476", "0.5640595", "0.56317437", "0.56294966", "0.56289655", "0.56220204", "0.56180173", "0.56134313", "0.5611337", "0.56112075", "0.56058615", "0.5604383", "0.5602629", "0.56002104", "0.5591573", "0.55856615", "0.5576992", "0.55707216", "0.5569681", "0.55570376", "0.55531484", "0.5551123", "0.5550893", "0.55482954", "0.5547471", "0.55469507", "0.5545719", "0.5543553", "0.55424106", "0.5542057", "0.55410767", "0.5537739", "0.55269134", "0.55236584", "0.55170715", "0.55035424", "0.55020875" ]
0.0
-1
Date of the next notification or null, if notification can't be sent more
static Date calculateNextNotificationDate(Date now, Date sentDate, List<Integer> remindSteps) { Calendar sentCal = Calendar.getInstance(); sentCal.setTime(sentDate); for (int dayOffset : remindSteps) { sentCal.add(Calendar.DAY_OF_YEAR, dayOffset); if (sentCal.getTime().compareTo(now) > 0) { return sentCal.getTime(); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRebillNextDate()\n\t{\n\t\tif(response.containsKey(\"next_date\")) {\n\t\t\treturn response.get(\"next_date\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public abstract Date getNextFireTime();", "public Date getNextNotification(List<NotificationOccurrence> notificationOccurrenceHistory) {\n\t\tif(interval == NotificationRule.INTERVAL_DATE) {\n\t\t\tif(notificationOccurrenceHistory == null || notificationOccurrenceHistory.size() == 0) {\n\t\t\t\treturn startDate;\n\t\t\t} else {\n\t\t\t\tNotificationOccurrence lastOccurrence = getMostRecentNotificationOccurrence(notificationOccurrenceHistory);\n\t\t\t\tif(lastOccurrence.getAction() == NotificationOccurrence.ACTION_COMPLETED) {\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\t\t\tcalendar.setTime(lastOccurrence.getDate());\n\t\t\t\t\tcalendar.add(Calendar.DATE, 1);\n\t\t\t\t\treturn calendar.getTime();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tNotificationOccurrence lastOccurrence = getMostRecentNotificationOccurrence(notificationOccurrenceHistory); \n\t\t\tDate lastOccurrenceDate;\n\t\t\tif(lastOccurrence != null) {\n\t\t\t\tlastOccurrenceDate = lastOccurrence.getDate();\n\t\t\t} else {\n\t\t\t\tlastOccurrenceDate = startDate;\n\t\t\t}\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(lastOccurrenceDate);\n\t\t\tif(lastOccurrence != null && lastOccurrence.getAction() == NotificationOccurrence.ACTION_IGNORED) {\n\t\t\t\tcalendar.add(Calendar.DATE, 1);\n\t\t\t} else {\n\t\t\t\tswitch(interval) {\n\t\t\t\t\tcase NotificationRule.INTERVAL_HOURS:\n\t\t\t\t\t\tcalendar.add(Calendar.HOUR, intervalIncrement);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase NotificationRule.INTERVAL_DAYS:\n\t\t\t\t\t\tcalendar.add(Calendar.DATE, intervalIncrement);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase NotificationRule.INTERVAL_WEEKS:\n\t\t\t\t\t\tcalendar.add(Calendar.DATE, intervalIncrement*7);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase NotificationRule.INTERVAL_MONTHS:\n\t\t\t\t\t\tcalendar.add(Calendar.MONTH, intervalIncrement);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase NotificationRule.INTERVAL_YEARS:\n\t\t\t\t\t\tcalendar.add(Calendar.YEAR, intervalIncrement);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn calendar.getTime();\n\t\t}\n\t}", "Date getNextTodo();", "public Date getNextPublished() {\n return nextPublished;\n }", "public java.util.Date getNextAppointmentDate () {\n\t\treturn nextAppointmentDate;\n\t}", "com.google.protobuf.Int64Value getDeliveryDateAfter();", "@Override\n protected LocalDateTime CalculateNextFeedTime() {\n return LocalDateTime.now();\n }", "public Date getNextChargeTime() {\n return nextChargeTime;\n }", "com.google.protobuf.Int64ValueOrBuilder getDeliveryDateAfterOrBuilder();", "com.google.protobuf.Int64Value getDeliveryDateBefore();", "Date NextEvent(Date d);", "public String getNextDate()\n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() + 1);\n\t\treturn getTodayDate ();\n\n\t}", "public Date getNextNotification(List<NotificationOccurrence> notificationOccurrenceHistory, long contactId) {\n\t\tArrayList<NotificationOccurrence> contactNotificationOccurrenceHistory = new ArrayList<NotificationOccurrence>();\n\t\tfor(NotificationOccurrence no : notificationOccurrenceHistory) {\n\t\t\tif(no.getContactId() == contactId) {\n\t\t\t\tcontactNotificationOccurrenceHistory.add(no);\n\t\t\t}\n\t\t}\n\t\treturn getNextNotification(contactNotificationOccurrenceHistory);\n\t}", "public Date getMessageDate();", "public static long getNewestMeetingDate() {\n return SP_UTILS.getLong(SPDataConstant.KEY_LAST_MEETING_PUBLISH_DATE, SPDataConstant.VALUE_LAST_MEETING_HOST_ID_DEFAULT);\n }", "long getNextCollectTimestampMs();", "protected abstract void calcNextDate();", "@DISPID(13)\r\n\t// = 0xd. The runtime will prefer the VTID if present\r\n\t@VTID(19)\r\n\tjava.util.Date nextScheduledExecutionDateTime();", "public TestNotification sendNow(TestNotification notif) {\n\t\treturn null;\n\t}", "com.google.protobuf.Int64ValueOrBuilder getDeliveryDateBeforeOrBuilder();", "public Date getNextExecutionTime() {\n\t\treturn SchedulerUtil.getNextExecution(this);\n\t}", "public Timestamp getDatePromised() {\n\t\treturn (Timestamp) get_Value(\"DatePromised\");\n\t}", "public Timestamp getDatePromised() {\n\t\treturn (Timestamp) get_Value(\"DatePromised\");\n\t}", "Optional<ZonedDateTime> nextExecution(final ZonedDateTime date);", "public Date getRealDeadline() {\r\n return realDeadline;\r\n }", "public Date getNextScheduledRun() {\n\t\tfinal Calendar cal = Calendar.getInstance();\n\t\tcal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 1);\n\t\tcal.set(Calendar.MINUTE, 0);\n\n\t\tif ( cal.before(Calendar.getInstance()) ){\n\t\t\tcal.add(Calendar.DATE, 7);\n\t\t}\n\t\treturn cal.getTime();\n\t\n\t}", "public abstract Date getPreviousFireTime();", "Date getEventFiredAt();", "public Date getFirst_seen() {\n return first_seen;\n }", "public Date getEarliestFinishingDate();", "public Notification(String message, Long date) {\n this.message = message;\n this.date = date;\n }", "@Override\n\tpublic Date getQueuedDate() {\n\t\treturn model.getQueuedDate();\n\t}", "Date getRequestedAt();", "void createDailyMessageRaport(String stringCurrentDate);", "public String getIncomingPaymentDate() {\n return incomingPaymentDate;\n }", "public java.util.Date getExpectedDateOfDelivery() {\r\n return expectedDateOfDelivery;\r\n }", "public Date getMessageLastPost() {\n return messageLastPost;\n }", "Optional<GitHubInstant> date();", "private void nextDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tlong hourMills = this.nextHourMills;\r\n\t\tint day;\r\n\t\t\r\n\t\tcalendar.setTimeInMillis(this.nextHourMills);\r\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\r\n\t\tthis.nextHourMills = calendar.getTimeInMillis();\r\n\t\t\r\n\t\tday = calendar.get(Calendar.DATE);\r\n\t\tif (day != this.day) {\r\n\t\t\t// 날짜가 바뀌었으면 calendar.set(Calendar.HOUR_OF_DAY, 0) 는 불필요. 단지 최종 날짜만 바꾸어준다.\r\n\t\t\tthis.day = day;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// 바뀌지 않았으면\r\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFile dir = new File(this.root, Long.toString(calendar.getTimeInMillis()));\r\n\t\t\tFile file = new File(dir, Long.toString(hourMills));\r\n\t\t\t\r\n\t\t\tthis.data = JSONFile.getJSONObject(file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthis.data = null;\r\n\t\t\t\r\n\t\t\tthis.date.setTimeInMillis(this.nextHourMills);\r\n\t\t}\r\n\t}", "public Date getLastReceiveSuccessRequestTime()\r\n {\r\n return lastReceiveSuccessRequestTime;\r\n }", "public Date getNextCheckDate(Date now)\r\n\t{\r\n\t\tsetTime(now);\r\n\r\n\t\tswitch (type)\r\n\t\t{\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MINUTE:\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MINUTE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_HOUR:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.HOUR_OF_DAY, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.HALF_DAY:\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tint hour = get(Calendar.HOUR_OF_DAY);\r\n\t\t\tif (hour < 12)\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 12);\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\t\tadd(Calendar.DAY_OF_MONTH, 1);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_DAY:\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.DATE, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_WEEK:\r\n\t\t\tset(Calendar.DAY_OF_WEEK, getFirstDayOfWeek());\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.WEEK_OF_YEAR, 1);\r\n\t\t\tbreak;\r\n\t\tcase DailyRollingFileAndSizeAppender.TOP_OF_MONTH:\r\n\t\t\tset(Calendar.DATE, 1);\r\n\t\t\tset(Calendar.HOUR_OF_DAY, 0);\r\n\t\t\tset(Calendar.MINUTE, 0);\r\n\t\t\tset(Calendar.SECOND, 0);\r\n\t\t\tset(Calendar.MILLISECOND, 0);\r\n\t\t\tadd(Calendar.MONTH, 1);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalStateException(\"Unknown periodicity type.\");\r\n\t\t}\r\n\t\treturn getTime();\r\n\t}", "private void refreshLastSeenDate() {\r\n\r\n if (friendFeed == null)\r\n return;\r\n\r\n Date lastMessageDate = friendFeed.getLastMessageTime();\r\n lastMessageSentDateTextView.setText(StringUtils\r\n .normalizeDifferenceDate(lastMessageDate));\r\n }", "public Date getDateofLaunch() {\n\treturn null;\n}", "public Date getFechaNacimiento()\r\n/* 133: */ {\r\n/* 134:242 */ return this.fechaNacimiento;\r\n/* 135: */ }", "public Date getDate() {\n/* 150 */ Date[] dates = getDates();\n/* 151 */ if (dates != null) {\n/* 152 */ Date latest = null;\n/* 153 */ for (int i = 0, c = dates.length; i < c; i++) {\n/* 154 */ if (latest == null || dates[i].getTime() > latest.getTime()) {\n/* 155 */ latest = dates[i];\n/* */ }\n/* */ } \n/* 158 */ return latest;\n/* */ } \n/* 160 */ return null;\n/* */ }", "long getFetchedDate();", "public Date getLastEmailedDate() {\r\n if (StringUtils.isBlank(this.lastEmailedDateString)) {\r\n return null;\r\n }\r\n try {\r\n return new SimpleDateFormat(\"yyyy/MM/dd\").parse(this.lastEmailedDateString);\r\n } catch (ParseException e) {\r\n LOG.error(\"Could not convert '\"+this.lastEmailedDateString+\"' to date. \" + this, e);\r\n \r\n //uh... just ignore\r\n return null;\r\n }\r\n\r\n }", "public Date getMlSreplydate() {\n return mlSreplydate;\n }", "Date apply(String retryAfter) {\n if (retryAfter == null) {\n return null;\n }\n if (retryAfter.matches(\"^[0-9]+$\")) {\n long deltaMillis = SECONDS.toMillis(Long.parseLong(retryAfter));\n return new Date(currentTimeMillis() + deltaMillis);\n }\n synchronized (rfc822Format) {\n try {\n return rfc822Format.parse(retryAfter);\n } catch (ParseException ignored) {\n return null;\n }\n }\n }", "@Scheduled(fixedDelay=DateUtils.MILLIS_PER_HOUR)\n \tprotected void checkLastPublicationDate(){\n \t\ttry {\n \t\t\tString lpd = FileUtils.readFileToString(new File(vascanConfig.getLastPublicationDateFilePath()));\n \t\t\ttry {\n \t\t\t\tfreemarkerConfig.getConfiguration().setSharedVariable(\"lastPublicationDate\", lpd);\n \t\t\t} catch (TemplateModelException e) {\n \t\t\t\tLOGGER.fatal(\"Could not set Vascan lastPublicationDate\", e);\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\tLOGGER.fatal(\"Could not read Vascan lastPublicationDate\", e);\n \t\t}\n \t}", "public Timestamp getDateConfirm() {\n\t\treturn (Timestamp) get_Value(\"DateConfirm\");\n\t}", "@java.lang.Override\n public long getNextCollectTimestampMs() {\n return nextCollectTimestampMs_;\n }", "public Date getDeliveryDate() {\n return deliveryDate;\n }", "@Test\n public void constructorNullNextNotificationLogId() {\n new NotificationLog(currentNotificationLogId, null, previousNotificationLogId, notifications, true);\n }", "@Override\r\n\tpublic long getPaidDateTime() {\n\t\treturn 0;\r\n\t}", "public Date getNoticeEnd() {\n return noticeEnd;\n }", "@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGtStatus.getRequestedDate();\n\t}", "@java.lang.Override\n public long getNextCollectTimestampMs() {\n return nextCollectTimestampMs_;\n }", "public Date getDate() {\n if ( expiryDate.isSIPDate() ) {\n Calendar c=( (SIPDate)expiryDate ).getJavaCal();\n return c.getTime();\n }\n else return null; \n }", "public Date getExpectedDeliveryDate() {\n return expectedDeliveryDate;\n }", "@Override\n public int getDate() {\n return this.deadline.getDay();\n }", "Date getDueDate();", "Date getDueDate();", "@Override\n public long getDeviceDate() throws DeviceNotAvailableException {\n return 1476958891L;\n }", "public Optional<QueuedEvent> getNextEvent() {\n if (events.size() == 0) {\n return Optional.empty();\n }\n QueuedEvent nextEvent = events.get(0);\n for (QueuedEvent e : this.events) {\n if (e.getMsLeft() < nextEvent.getMsLeft()) {\n nextEvent = e;\n }\n }\n return Optional.of(nextEvent);\n }", "Message getNextMessage();", "@Override\n public Date getExpiration()\n {\n return null;\n }", "public int getDeadline(){return deadline;}", "long getDate() { return (act != null ? act.getDate() : 0); }", "public abstract Date getFinalFireTime();", "public void setNextAppointmentDate (java.util.Date nextAppointmentDate) {\n\t\tthis.nextAppointmentDate = nextAppointmentDate;\n\t}", "protected void notificationOnExpiration() {\n }", "public Date getPublish_tm() {\n return publish_tm;\n }", "public Date getDeadlineDate() {\r\n return deadlineDate;\r\n }", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "public NPTRate getNPTRate() throws MPEGDeliveryException { return null; }", "public Date getActualRepayDate() {\n return actualRepayDate;\n }", "public Date getDealingTime()\n/* */ {\n/* 159 */ return this.dealingTime;\n/* */ }", "@Override\n public void setNotification() {\n if (getTense() == Tense.FUTURE) {\n //Context ctx = SHiTApplication.getContext();\n //SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n int leadTimeEventMinutes = SHiTApplication.getPreferenceInt(Constants.Setting.ALERT_LEAD_TIME_EVENT, LEAD_TIME_MISSING);\n\n if (leadTimeEventMinutes != LEAD_TIME_MISSING) {\n if (travelTime > 0) {\n leadTimeEventMinutes += travelTime;\n }\n\n setNotification(Constants.Setting.ALERT_LEAD_TIME_EVENT\n , leadTimeEventMinutes\n , R.string.alert_msg_event\n , getNotificationClickAction()\n , null);\n }\n }\n }", "public String getNotification() {\n return notification;\n }", "private static int meetRecentDeadline(LocalDate startdate, LocalDate deadlineDate, String repetition){\n\n LocalDate today = LocalDate.now();\n\n if(deadlineDate.isEqual(today)){\n return MEET_FINAL_DEADLINE;\n }\n switch (repetition){\n case \"{Daily}\":\n if(today.isEqual(startdate.plusDays(1))){\n return MEET_RECENT_DEADLINE;\n }\n case \"{Weekly}\":\n if(today.isEqual(startdate.plusDays(7))){\n return MEET_RECENT_DEADLINE;\n }\n case \"{Monthly}\":\n if(today.isEqual(startdate.plusMonths(1))){\n return MEET_RECENT_DEADLINE;\n }\n }\n return NO_RECENT_DEADLINE;\n }", "public Date getLastReceiveSuccessResponseTime()\r\n {\r\n return lastReceiveSuccessResponseTime;\r\n }", "public java.lang.String getNotification()\r\n\t{\r\n\t\tString results = \"\";\r\n\t\tif (!locked)\r\n\t\t{\r\n\t\t\tif (notification == null)\r\n\t\t\t\tresults = \"No notification\";\r\n\t\t\tif (notification != null)\r\n\t\t\t\tresults = notification;\t\r\n\t\t}\r\n\t\tif (locked == true && notification != null)\r\n\t\t\tresults = \"You have a notification\";\r\n\t\treturn results;\r\n\t}", "@Override\n\tpublic String getNotification() {\n\t\treturn null;\n\t}", "private void getDate() {\t// use the date service to get the date\r\n String currentDateTimeText = theDateService.getDateAndTime();\r\n this.send(currentDateTimeText);\r\n }", "public Date getDefaultTrialExpirationDate(){\n if(AccountType.STANDARD.equals(accountType)){\n Calendar cal = Calendar.getInstance();\n\n //setting the free trial up for standard users\n cal.add(Calendar.DATE, Company.FREE_TRIAL_LENGTH_DAYS);\n return cal.getTime();\n }\n\n return null;\n }", "static String getRefreshDate(){\n if (updateTime == null){\n updateTime = \"ERROR RETRIEVING CURRENT RATES\";\n }\n return conversionRates.get(\"date\").getAsString() + \" \" + updateTime;\n\n }", "long getExpirationDate();", "@java.lang.Override\n public long getNextDefenderBonusCollectTimestampMs() {\n return nextDefenderBonusCollectTimestampMs_;\n }", "public String getDueDate()\r\n {\r\n return dueDate;\r\n }", "@ApiModelProperty(value = \"The next time that the auto order will be attempted for processing\")\r\n public String getNextAttempt() {\r\n return nextAttempt;\r\n }", "public Timestamp getNextVisibleTime() {\n\t\treturn m_NextVisibleTime;\n\t}", "@java.lang.Override\n public long getNextDefenderBonusCollectTimestampMs() {\n return nextDefenderBonusCollectTimestampMs_;\n }", "public void setNextChargeTime(Date nextChargeTime) {\n this.nextChargeTime = nextChargeTime;\n }", "protected NotificationInfo getNotificationInfo() {\n List<NotificationInfo> list = notificationService.storeDigestJCR();\n assertTrue(list.size() > 0);\n return list.get(0);\n }", "public Date getSentDate() {\n return sentDate;\n }", "public Date getRecvdatetime() {\n\t\treturn recvdatetime;\n\t}", "public String getLastEmailedDateString() {\r\n return this.lastEmailedDateString;\r\n }", "ZonedDateTime lastRefTimestamp() {\n ArticleRef last = buffer.peekLast();\n if(last == null) {\n return null;\n }\n return last.getTimestamp();\n }" ]
[ "0.64389074", "0.63956463", "0.6256565", "0.62216985", "0.6199913", "0.616196", "0.60558146", "0.6026902", "0.5860115", "0.5786209", "0.5782198", "0.5740701", "0.57105416", "0.57051986", "0.55719596", "0.55622953", "0.5554319", "0.55409455", "0.5515254", "0.5509926", "0.5508609", "0.54944897", "0.54900986", "0.54900986", "0.54850256", "0.54230344", "0.5407996", "0.5403639", "0.5321499", "0.53174984", "0.5317148", "0.52889895", "0.5253865", "0.5250594", "0.52448905", "0.52425724", "0.5231457", "0.52297616", "0.5227918", "0.5224855", "0.52195096", "0.5219159", "0.5192909", "0.5186391", "0.51833504", "0.51810664", "0.5159717", "0.51586455", "0.51518905", "0.5150995", "0.5146255", "0.51407146", "0.51247984", "0.51234835", "0.5118437", "0.5116774", "0.51153475", "0.51103276", "0.5107972", "0.51077586", "0.5107692", "0.51038194", "0.50950694", "0.50950694", "0.50895727", "0.50867105", "0.50849295", "0.50844705", "0.50829494", "0.5077549", "0.5076605", "0.5075856", "0.5069887", "0.5065245", "0.5062075", "0.50618887", "0.50588346", "0.50486064", "0.50429", "0.5037229", "0.5035468", "0.5031462", "0.5028268", "0.50232494", "0.50187004", "0.50071144", "0.49953115", "0.4994843", "0.49864247", "0.4983753", "0.49833632", "0.49827245", "0.49780816", "0.49739578", "0.49727085", "0.49649346", "0.49642947", "0.49617842", "0.4961003", "0.49583024" ]
0.72907054
0
This is a constructor transfer student
public Student(String name, int studentId) { this.name = name; this.studentId = studentId; this.numberOfCredits = 0; this.gpa = 0.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}", "public Student(){}", "public Student() {\n \n }", "public Student() {\r\n }", "public Student( String name ) {\n sname=name;\n }", "public Student() {\n }", "public Student() {\n }", "public Student() {\n }", "public Student() {\r\n\t\timePrezime = \"Petar Petrovic\";\r\n\t\tfakultet = \"Matematicki\";\r\n\t\tgodina = 1;\r\n\t}", "public Student(String requiredStudentName)\n {\n studentName = requiredStudentName;\n }", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "Student(String name){\n this.name = name;\n }", "Student4(int i, String n, int t) {\n id = i;\n name = n;\n age = t;\n\n }", "public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }", "public Student(int studentId) \r\n {\r\n\r\n this.studentId = studentId;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "public Student() \r\n {\r\n studentId = 0;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLoginID() ;\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public Student(String name) { // constructor\n\t\tthis.name = name; \n\t}", "Student4(int i, String n) {\n id = i;\n name = n;\n\n }", "public Student(int num) {\n//\t\tstuNum = num;\n//\t\tgpa = 0.0;\n\t\tthis(num, 0.0);\n\t}", "public StudentDemo(){\r\n \r\n \r\n \r\n }", "Student(String name, double cgpa, int token){\n this.name=name;\n this.cgpa=cgpa;\n this.token=token;\n }", "public Student(String name) {\n this.name = name;\n }", "public Student() { //Default Constructor\n\t\tthis.roll_no=0;\n\t\tthis.full_name=\"\";\n\t\tthis.grade=\"\";\n\t}", "public Student(int level, String first, String last, long gnum, String major, \n String degree) {\n // TODO initialize the instance variables\n // Also use the parameter variable \"level\" as follows\n // 1) use its value to initialized the PROGRAM constant\n // 2) create the transcripts array to be of size [50] if is level 0, \n // or to be of size [15] if level is 1. \n // note that level refers to the student type and we use a value of 0 for \n // an undergrad and a value of 1 for a grad\n PROGRAM = level;\n this.first = first;\n this.last = last;\n this.gnum = gnum;\n this.major = major;\n this.degree = degree;\n if (PROGRAM == 0){\n transcripts = new TranscriptEntry[50];\n }\n else{\n transcripts = new TranscriptEntry[15];\n }\n }", "public student1(int r)\n {\n this();//calling default constructor\n System.out.println(\"rno = \" + r);\n }", "public Student(String name) {\n\n this.name = name;\n }", "public Student()\r\n {\r\n //This is intended to be empty\r\n }", "public Student(){//default constructor \r\n ID_COUNTER++;\r\n studentNum = ID_COUNTER;\r\n firstName = \"\";\r\n lastName = \"\";\r\n address = \"\";\r\n loginID = \"\";\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public Student(String nume, int varsta) {\n\t\tthis.nume = nume;\n\t\tthis.varsta = varsta;\n\t}", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}", "Student(int i, String n) {\n id = i;\n name = n;\n }", "public Student(String studentId){\n id = studentId;\n }", "public StudentRecord() {}", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "public StudentAthlete() {\n }", "public StudentRecord(Student s, Department dep, Degree deg, Term tb, List<Professor> a, List<Professor> c,\r\n List<CourseTaken> ct, List<String> n){\r\n student = s;\r\n department = dep;\r\n degreeSought = deg;\r\n termBegan = tb;\r\n advisors = a;\r\n committee = c;\r\n coursesTaken = ct;\r\n notes = n;\r\n }", "public StudentFee() {\n }", "public TeamStudent() {\r\n\t\t// Default constructor\r\n\t}", "public Student(String name, String address, String facNumber) {\r\n super(name, address);\r\n this.facultyNumber = facNumber;\r\n courses = new HashMap<String, Double>();\r\n }", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}", "student(){\r\n \r\n //constructor\r\n //always same as class name\r\n //we can also have code here\r\n //this will be the first method to be intialised\r\n //can never return a value\r\n number++;// default initialisation\r\n }", "public Student(String name, String gender, String email){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = new Course();\n this.course2 = new Course();\n this.course3 = new Course();\n }", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "Constructor() {\r\n\t\t \r\n\t }", "public LearnConstructor(int age,String name,String address){\n this.age=age;\n this.address=address;\n this.name=name;\n System.out.println(this.name+\" \"+this.address+\" \"+this.age);\n }", "StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\n }", "public Student(int sem, double gpa, String firstName, String lastName) {\n super(firstName, lastName);\n this.sem = sem;\n this.gpa = gpa;\n }", "public CSSTidier() {\n\t}", "public Constructor(){\n\t\t\n\t}", "public Student(String name, String gender, String email, Course course1, \n Course course2, Course course3){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = course1;\n this.course2 = course2;\n this.course3 = course3;\n }", "public Student(String studentID) {\r\n\t\tthis.studentID = studentID;\r\n\t}", "public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}", "public Student(Integer age) {\n\n this.age = age;\n }", "public Student (String first, String last, String id)\r\n\t{\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.studentId = id;\r\n\t}", "public StudentChoresAMImpl() {\n }", "public Student(String name, String SSN) {\n this.name = name;\n this.SSN = SSN;\n System.out.println(\"Student: \" + name + \", email: \" + generateEmail(name) + \", ID: \" + generateID(SSN));\n }", "public StudentPlayer() {\n super(\"260719721\");\n }", "public StudentPlayer() {\n super(\"260740998\");\n }", "public StudentCourse() {\n this(\"student_course\", null);\n }", "public Student(double avg) {\n//\t\tstuNum = 0;\n//\t\tgpa = avg;\n\t\tthis(999, avg);\n\t}", "public StudentPlayer() {\n super(\"260622641\");\n }", "public StudentPlayer() {\r\n super(\"260767897\");\r\n }", "public Student(String name, String gender,String rollNumber,String mobileNumber){\n this.name = name;\n this.gender = gender;\n this.rollNumber = rollNumber;\n this.mobileNumber = mobileNumber;\n }", "public Student(String firstName, String lastName, int age, double gpa, String major, String department, List<Course> courses) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.gpa = gpa;\n this.major = major;\n this.department = department;\n this.courses = courses;\n }", "public Estudiante(String nom) // Constructor 1: Se le asigna un valor al atributo nombre cuando se cree el objeto.\r\n {\r\n this.nombre = nom;\r\n }", "public CyanSus() {\n\n }", "private TMCourse() {\n\t}", "public Student(String name, char gender, int age) {\r\n super(name, gender, age);\r\n }", "public Individual()\r\n\t{\r\n\t}", "public Student(String fullName,Student_Status stStatus)\n {\n this.fullName = fullName;\n this.stStatus = stStatus;\n }", "public StudentInteraction() {\n//\t\tsuper();\n\t\tsfCon = new StudentFunctionalityController();\n\t}", "public AntrianPasien() {\r\n\r\n }", "public Student(int userId, String firstName, String lastName, String email, String password, int schoolId)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n }", "public Node(Student stu) {\n\t\t\tstudent = stu;\n\t\t\tnext = null;\n\t\t}", "public Student(String name, Integer age) {\n\n this.name = name;\n this.age = age;\n }", "public Student()\r\n {\r\n // initialise variables with defult values\r\n ID=-1;\r\n Name=null;\r\n University=null;\r\n Department=null;\r\n term=0;\r\n cgpa=0.0;\r\n Gpa=new double[10];\r\n Creditsandgrades=new double[10][10][10];\r\n }", "public GradeBook2( String name )\n {\n courseName = name; // initializes courseName\n }", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public Student(String firstName, String lastName, int age, int number) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.studentNumber = number;\n this.grades = new int[0];\n }", "public Student(\n int userId, String firstName, String lastName, String email, String password, int\n schoolId,\n double gpa)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n this.setGpa(gpa);\n }", "public Pasien() {\r\n }", "public SchoolPerson() {\n }", "public Student() {\n\t\tthis.firstName = \"no name entered\";\n\t\tthis.lastName = \"no name entered\";\n\t\tthis.wId = \"no WID\";\n\t\tthis.labScore = 0;\n\t\tthis.projScore = 0;\n\t\tthis.examScore = 0;\n\t\tthis.codeLabScore = 0;\n\t\tthis.finalExamScore = 0;\n\t\tthis.scorePercent = 0;\n\t}", "public Login(Student s) \n\t\t{ \n\t\t\t\tthis.s = s;\n\t\t}", "public Student(int studentID, String firstName, String lastName) {\n this.studentID = studentID;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "Student createStudent();", "public Student ( int rollno, String name, String course ) {\n\t\tthis.rollno = rollno;\n\t\tthis.name = name;\n\t\tthis.course = course;\n\t}", "public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++;\r\n\t}", "Student() {\n // Set all to \"undefined\"/0, but assign unique student ID\n this.firstName = \"Undefined\";\n this.lastName = \"Undefined\";\n this.grade = 0;\n\n // Unique student IDs - increment lastStudentID and set it as this student's student ID\n lastStudentID++;\n this.studentID = lastStudentID;\n }", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "public Student(String imePrezime, String fakultet, int godina) {\r\n\t\tthis.imePrezime = imePrezime;\r\n\t\tthis.fakultet = fakultet;\r\n\t\tthis.godina = godina;\r\n\t}", "public Student(String id, String fname, String lname, String email, String phone, String dob) {\r\n\t\tsuper(fname, lname, email, phone);\r\n\t\t//id++;\r\n\t\tthis.dob = dob;\r\n\t\tmgList = new ModuleGradeList();\r\n\t\tthis.studentId = id;\r\n\t}", "@Override\n\t\t\tpublic void init(Student student) {\n\t\t\t\tSystem.out.println(\"Called\");\n\t\t\t}", "public Student(String registrationNumber, int[] marks){\n this.registrationNumber = registrationNumber;\n this.marks = marks;\n \n }", "public UserImplPart1(int studentId, String yourName, int yourAge,int yourSchoolYear, String yourNationality){\n this.studentId = studentId;\n this.name= yourName;\n this.age = yourAge; \n this.schoolYear= yourSchoolYear;\n this.nationality= yourNationality;\n}", "Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }", "public Student(String fname, String lname, int age, String coll, String maj, double grade) {\n super(fname, lname, age);\n college = coll;\n major = maj;\n gpa = grade;\n }", "public School() {\r\n }", "public GradeBook (String name){ //Constructor\n\t\tcourseName=name;\n//\t\tstudents = studentNum;\n\t}" ]
[ "0.7843402", "0.7805272", "0.7699747", "0.76504135", "0.7613292", "0.76058435", "0.7498639", "0.7498639", "0.7498639", "0.7491702", "0.7440226", "0.7439704", "0.7360832", "0.731903", "0.72942275", "0.7278356", "0.72626984", "0.72622645", "0.72555965", "0.725017", "0.7206323", "0.7168034", "0.7142161", "0.71417403", "0.71388066", "0.7070807", "0.7068249", "0.70648706", "0.7034107", "0.7029162", "0.6977658", "0.6964668", "0.69553965", "0.6933971", "0.6932763", "0.6918727", "0.691738", "0.69076663", "0.6894911", "0.6888794", "0.6886904", "0.6874635", "0.68433857", "0.68407726", "0.6817755", "0.6817049", "0.6811753", "0.68077904", "0.6801924", "0.6792226", "0.6775411", "0.67734283", "0.6766441", "0.67538273", "0.67534184", "0.67522305", "0.67521864", "0.6735699", "0.66970897", "0.6690763", "0.66768116", "0.66747457", "0.66734284", "0.66668427", "0.6647019", "0.6635649", "0.66233814", "0.6620418", "0.65991443", "0.65931827", "0.65567964", "0.6554104", "0.6553256", "0.65513515", "0.6542889", "0.65383476", "0.65361017", "0.6527347", "0.6524924", "0.65154237", "0.6514577", "0.6506432", "0.6506356", "0.6497457", "0.64943993", "0.6485253", "0.64850277", "0.648373", "0.6471722", "0.6468587", "0.6463767", "0.6450731", "0.64478046", "0.64467824", "0.64381325", "0.6436625", "0.6428112", "0.642522", "0.64191175", "0.6418947", "0.641548" ]
0.0
-1
This is a constructor new student
public String getName() { return this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public Student(){}", "public Student() {\n \n }", "public Student() {\r\n }", "public Student() {\n }", "public Student() {\n }", "public Student() {\n }", "public Student(int studentId) \r\n {\r\n\r\n this.studentId = studentId;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }", "public Student() \r\n {\r\n studentId = 0;\r\n studentName = \"\";\r\n studentMajor = \"\";\r\n }", "public Student( String name ) {\n sname=name;\n }", "Student4(int i, String n) {\n id = i;\n name = n;\n\n }", "public Student(String requiredStudentName)\n {\n studentName = requiredStudentName;\n }", "public Student() {\r\n\t\timePrezime = \"Petar Petrovic\";\r\n\t\tfakultet = \"Matematicki\";\r\n\t\tgodina = 1;\r\n\t}", "Student(String name){\n this.name = name;\n }", "public Student(Person person) {\r\n\t\tsuper(person);\r\n\t}", "public Student() {\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter Student first name: \");\r\n\t\tthis.firstName=in.nextLine();\r\n\t\tSystem.out.print(\"Enter Student last name: \");\r\n\t\tthis.lastName=in.nextLine();\r\n\t\tSystem.out.print(\"1.Infant\\n2.child\\n3.junior\\n4.senior\\nEnter student class level: \");\r\n\t\tthis.gradeYear=in.nextInt();\r\n\t\r\n\t\tsetStudentId();\r\n\t\t\r\n\t\t\r\n\t}", "Student(int i, String n) {\n id = i;\n name = n;\n }", "public Student(String studentId){\n id = studentId;\n }", "public Student() { //Default Constructor\n\t\tthis.roll_no=0;\n\t\tthis.full_name=\"\";\n\t\tthis.grade=\"\";\n\t}", "Student4(int i, String n, int t) {\n id = i;\n name = n;\n age = t;\n\n }", "public Student(String name) { // constructor\n\t\tthis.name = name; \n\t}", "public Student(String name) {\n this.name = name;\n }", "public Student(String name) {\n\n this.name = name;\n }", "public StudentDemo(){\r\n \r\n \r\n \r\n }", "public Student(){//default constructor \r\n ID_COUNTER++;\r\n studentNum = ID_COUNTER;\r\n firstName = \"\";\r\n lastName = \"\";\r\n address = \"\";\r\n loginID = \"\";\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public StudentRecord() {}", "public Student(String studentID) {\r\n\t\tthis.studentID = studentID;\r\n\t}", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public Student()\r\n {\r\n //This is intended to be empty\r\n }", "Student(String name, double cgpa, int token){\n this.name=name;\n this.cgpa=cgpa;\n this.token=token;\n }", "public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLoginID() ;\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "public Student(int num) {\n//\t\tstuNum = num;\n//\t\tgpa = 0.0;\n\t\tthis(num, 0.0);\n\t}", "public Student(String myname, int myid){ \r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades[0]= -1;\r\n\t\tgrades[1]= -1;\r\n\t\tgrades[2]= -1;\r\n\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++; \r\n\t}", "public student1(int r)\n {\n this();//calling default constructor\n System.out.println(\"rno = \" + r);\n }", "public Student(String name, String gender, String email){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = new Course();\n this.course2 = new Course();\n this.course3 = new Course();\n }", "public Student (String first, String last, String id)\r\n\t{\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.studentId = id;\r\n\t}", "public Student(String firstName, String lastName, int age, double gpa, String major, String department, List<Course> courses) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.gpa = gpa;\n this.major = major;\n this.department = department;\n this.courses = courses;\n }", "Student createStudent();", "public Student(String name, String gender,String rollNumber,String mobileNumber){\n this.name = name;\n this.gender = gender;\n this.rollNumber = rollNumber;\n this.mobileNumber = mobileNumber;\n }", "public Student(String name, String address, String facNumber) {\r\n super(name, address);\r\n this.facultyNumber = facNumber;\r\n courses = new HashMap<String, Double>();\r\n }", "public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}", "public Student (String first, String last)\n {\n firstName = first;\n lastName = last;\n testScore1 = 0;\n testScore2 = 0;\n testScore3 = 0;\n }", "public Student(String nume, int varsta) {\n\t\tthis.nume = nume;\n\t\tthis.varsta = varsta;\n\t}", "public Student(String firstName, String lastName, int grade) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade; \n studentNumber = totalStudents++; // the new student's number is equal the total number of students, therefore, each student number will be unique\n }", "public StudentCourse() {\n this(\"student_course\", null);\n }", "student(){\r\n \r\n //constructor\r\n //always same as class name\r\n //we can also have code here\r\n //this will be the first method to be intialised\r\n //can never return a value\r\n number++;// default initialisation\r\n }", "public Student(String firstName, String lastName, int age, int number) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.age = age;\n this.studentNumber = number;\n this.grades = new int[0];\n }", "public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++;\r\n\t}", "public Student() {\n\t\tthis.firstName = \"no name entered\";\n\t\tthis.lastName = \"no name entered\";\n\t\tthis.wId = \"no WID\";\n\t\tthis.labScore = 0;\n\t\tthis.projScore = 0;\n\t\tthis.examScore = 0;\n\t\tthis.codeLabScore = 0;\n\t\tthis.finalExamScore = 0;\n\t\tthis.scorePercent = 0;\n\t}", "Student() {\n // Set all to \"undefined\"/0, but assign unique student ID\n this.firstName = \"Undefined\";\n this.lastName = \"Undefined\";\n this.grade = 0;\n\n // Unique student IDs - increment lastStudentID and set it as this student's student ID\n lastStudentID++;\n this.studentID = lastStudentID;\n }", "public Student(int studentID, String firstName, String lastName) {\n this.studentID = studentID;\n this.firstName = firstName;\n this.lastName = lastName;\n }", "public Student(int userId, String firstName, String lastName, String email, String password, int schoolId)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n }", "public Student ( int rollno, String name, String course ) {\n\t\tthis.rollno = rollno;\n\t\tthis.name = name;\n\t\tthis.course = course;\n\t}", "public Student(String name, String SSN) {\n this.name = name;\n this.SSN = SSN;\n System.out.println(\"Student: \" + name + \", email: \" + generateEmail(name) + \", ID: \" + generateID(SSN));\n }", "public Student(String name, String gender, String email, Course course1, \n Course course2, Course course3){\n this.name = name;\n this.gender = gender;\n this.email = email;\n this.course1 = course1;\n this.course2 = course2;\n this.course3 = course3;\n }", "public Student(String studentID, String passwordHash, String name, String matricNum, String nationality,\r\n\t\t\tchar gender, ArrayList<String> school, ArrayList<String> courseList, ArrayList<Integer> indexGroupList,\r\n\t\t\tArrayList<String> exemptionCoursesList, ArrayList<String> completedCoursesList,\r\n\t\t\tArrayList<Integer> waitListIDList, Schedule schedule, Calendar startTime, Calendar endTime, String email,\r\n\t\t\tString mobileNum, String notifMode) {\r\n\t\tthis.studentID = studentID;\r\n\t\tthis.passwordHash = passwordHash;\r\n\t\tthis.name = name;\r\n\t\tthis.matricNum = matricNum;\r\n\t\tthis.nationality = nationality;\r\n\t\tthis.gender = gender;\r\n\t\tthis.school = school;\r\n\t\tthis.courseList = courseList;\r\n\t\tthis.indexGroupList = indexGroupList;\r\n\t\tthis.exemptionCoursesList = exemptionCoursesList;\r\n\t\tthis.completedCoursesList = completedCoursesList;\r\n\t\tthis.waitListIDList = waitListIDList;\r\n\t\tthis.schedule = schedule;\r\n\t\tthis.startTime = startTime;\r\n\t\tthis.endTime = endTime;\r\n\t\tthis.email = email;\r\n\t\tthis.mobileNum = mobileNum;\r\n\t\tthis.notifMode = notifMode;\r\n\t}", "public Student(String name, int studentId) {\n this.name = name;\n this.studentId = studentId;\n this.numberOfCredits = 0;\n this.gpa = 0.0;\n }", "public StudentAthlete() {\n }", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}", "public Student(int id) {\n\t\tthis.id = id;\n\t}", "public Student(Integer age) {\n\n this.age = age;\n }", "public Student(double avg) {\n//\t\tstuNum = 0;\n//\t\tgpa = avg;\n\t\tthis(999, avg);\n\t}", "public TeamStudent() {\r\n\t\t// Default constructor\r\n\t}", "Student(String firstName, String lastName, int grade) {\n // Standard constructor assignments\n this.firstName = firstName;\n this.lastName = lastName;\n this.grade = grade;\n\n // Unique student IDs - increment lastStudentID and set it as this student's student ID\n lastStudentID++;\n this.studentID = lastStudentID;\n }", "public Student(String registrationNumber, int[] marks){\n this.registrationNumber = registrationNumber;\n this.marks = marks;\n \n }", "Student(String name) {\n\t\tthis.name = name;\n\t\tregisteredCourses = new Course[30];\n\t}", "public Student(String in_name, double in_gpa)\n {\n name = in_name;\n gpa = in_gpa;\n getQuizzes();\n }", "public StudentRecord(Student s, Department dep, Degree deg, Term tb, List<Professor> a, List<Professor> c,\r\n List<CourseTaken> ct, List<String> n){\r\n student = s;\r\n department = dep;\r\n degreeSought = deg;\r\n termBegan = tb;\r\n advisors = a;\r\n committee = c;\r\n coursesTaken = ct;\r\n notes = n;\r\n }", "StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\n }", "public Student(String name, Integer age) {\n\n this.name = name;\n this.age = age;\n }", "public Student(int studentId, String studentName, String studentMajor) \r\n {\r\n\r\n setId(studentId);\r\n setName(studentName);\r\n setMajor(studentMajor);\r\n\r\n }", "public Student(\n int userId, String firstName, String lastName, String email, String password, int\n schoolId,\n double gpa)\n {\n super(firstName, lastName, email, password, schoolId);\n this.setUserId(userId);\n this.setFirstName(firstName);\n this.setLastName(lastName);\n this.setEmail(email);\n this.setPassword(password);\n this.setSchoolId(schoolId);\n this.setGpa(gpa);\n }", "public Student(String fname, String lname, int age, String coll, String maj, double grade) {\n super(fname, lname, age);\n college = coll;\n major = maj;\n gpa = grade;\n }", "public Student(String id, String fname, String lname, String email, String phone, String dob) {\r\n\t\tsuper(fname, lname, email, phone);\r\n\t\t//id++;\r\n\t\tthis.dob = dob;\r\n\t\tmgList = new ModuleGradeList();\r\n\t\tthis.studentId = id;\r\n\t}", "public Student(int id, String name, String course) {\n this.id = id;\n this.name = name;\n this.course = course;\n }", "public Student(String nm, int day, int month, int year){\r\n\t\tthis.name = nm;\r\n//\t\tthis.username = createUsername(nm); //creates unique username from Student's name\r\n\r\n\t dateofbirth = LocalDate.of(year, month, day);\r\n\t\tthis.age = getAge();\r\n\t\tStudent.userID = userID++; //ID increments for each new User\r\n\t\t\r\n\t\tthis.username = getUsername();\r\n\t}", "public Student(String id, String fname, String mname, String lname, String email, String phone, String dob) {\r\n\t\tsuper(fname, mname, lname, email, phone);\r\n\t\t//id++;\r\n\t\tthis.dob = dob;\r\n\t\tmgList = new ModuleGradeList();\r\n\t\tthis.studentId = id;\r\n\t}", "public Student(int sem, double gpa, String firstName, String lastName) {\n super(firstName, lastName);\n this.sem = sem;\n this.gpa = gpa;\n }", "public Student(String name, int age, char gender, int year, String course) {\r\n\t\tthis.name = name;\r\n\t\tthis.age = age;\r\n\t\tthis.gender = gender;\r\n\t\tthis.year = year;\r\n\t\tthis.course = course;\r\n\t}", "public Student(String name, char gender, int age) {\r\n super(name, gender, age);\r\n }", "public GradeBook (String name){ //Constructor\n\t\tcourseName=name;\n//\t\tstudents = studentNum;\n\t}", "public Student(int level, String first, String last, long gnum, String major, \n String degree) {\n // TODO initialize the instance variables\n // Also use the parameter variable \"level\" as follows\n // 1) use its value to initialized the PROGRAM constant\n // 2) create the transcripts array to be of size [50] if is level 0, \n // or to be of size [15] if level is 1. \n // note that level refers to the student type and we use a value of 0 for \n // an undergrad and a value of 1 for a grad\n PROGRAM = level;\n this.first = first;\n this.last = last;\n this.gnum = gnum;\n this.major = major;\n this.degree = degree;\n if (PROGRAM == 0){\n transcripts = new TranscriptEntry[50];\n }\n else{\n transcripts = new TranscriptEntry[15];\n }\n }", "public Course(String n, String i, int m, String in, int s, String l) {\n\t\tname = n;\n\t\tid = i;\n\t\tmaxstudents = m;\n\t\tinstructor = in;\n\t\tsection = s;\n\t\tlocation = l;\n\t}", "public Student()\r\n {\r\n // initialise variables with defult values\r\n ID=-1;\r\n Name=null;\r\n University=null;\r\n Department=null;\r\n term=0;\r\n cgpa=0.0;\r\n Gpa=new double[10];\r\n Creditsandgrades=new double[10][10][10];\r\n }", "public Student(String name, String emailAddress, String matriculationNumber) {\n this.name = name;\n this.emailAddress = emailAddress;\n this.matriculationNumber = matriculationNumber;\n }", "public Student(String id, String firstName, String lastName, String email, String username, String password) {\n super(id, firstName, lastName, email, username, password, \"student\");\n }", "public College()\r\n {\r\n students = new ArrayList<Student>();\r\n }", "public Student(String firstName, String familyName, int identityNumber) {\r\n this.Student = new StudentInfo (firstName, familyName, identityNumber, 120);\r\n }", "public Student insertStudent() {\n\t\tSystem.out.print(\"\\n--- 학생 정보 등록 ---\\n\");\n\t\tSystem.out.print(\"학생 이름 입력 \");\n\t\tString name = sc.next();\n\t\tSystem.out.print(\"학생 나이 입력 \");\n\t\tint age = sc.nextInt();\n\t\tSystem.out.print(\"학생 주소 입력 \");\n\t\tString addr= sc.next();\n\t\tStudent st = new Student(name, age, addr);\n\t\treturn st;\n\t}", "Student(String n, int age, String i,Student ref)\n\t{\n\t\tthis.name=n;\n\t\tthis.age=age;\n\t\tthis.id=i;\n\t\tthis.next=ref;\n\t}", "public Student(String fullName,Student_Status stStatus)\n {\n this.fullName = fullName;\n this.stStatus = stStatus;\n }", "public Student(String name) {\n this.nameProp.set(name);\n }", "public Student(int num, double avg) {\n\t\tstuNum = num;\n\t\tgpa = avg;\n\t}", "public Q1PrivateStudent() {\n\t\tthis(\"No Name\", 000, \"Not Set\");\n\t}", "public School() {\r\n }", "public student(String n, char l, int g) {\n\t\t\t\n\t\t\tname = n;\n\t\t\tletter = l;\n\t\t\tgpa = g;\n\t\t\t\n\t\t}", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "public GradeBook2( String name )\n {\n courseName = name; // initializes courseName\n }", "public Student(int id, String firstName, String middleName, String lastName, String email, String ssn, int age,\n\t\t\tString major) {\n\n\t\tsuper(id, firstName, middleName, lastName, email, ssn, age);\n\t\tthis.major = major;\n\t}", "public Student build() { \n\t return new Student(this); \n\t }" ]
[ "0.8644932", "0.8472109", "0.84720606", "0.84222615", "0.8314859", "0.8314859", "0.8314859", "0.82172924", "0.82122624", "0.82037157", "0.8171012", "0.8137546", "0.81291634", "0.8037541", "0.8036051", "0.80041754", "0.8001907", "0.79957414", "0.7975951", "0.7967052", "0.79626083", "0.7936181", "0.7913861", "0.78450793", "0.78289205", "0.7814922", "0.7808175", "0.78060293", "0.77957493", "0.77332485", "0.77235866", "0.7695274", "0.76799613", "0.7610543", "0.7608769", "0.7599751", "0.7597569", "0.7576271", "0.7563886", "0.7532077", "0.75299096", "0.7495305", "0.74902624", "0.7449827", "0.7439793", "0.74191016", "0.7419041", "0.74179244", "0.74178094", "0.7407779", "0.7407567", "0.73978865", "0.7396905", "0.73761994", "0.7374966", "0.73629284", "0.7360503", "0.73495847", "0.7348912", "0.7340747", "0.7336658", "0.733524", "0.73219496", "0.73152214", "0.7305734", "0.7288858", "0.7269338", "0.7267212", "0.72641647", "0.7262312", "0.7254532", "0.7250628", "0.7236418", "0.72345304", "0.7229895", "0.7229443", "0.71969247", "0.7179068", "0.7175772", "0.7142529", "0.71401715", "0.7136857", "0.7102936", "0.71005505", "0.70761096", "0.7069764", "0.7067604", "0.70638233", "0.7034451", "0.7033903", "0.70141", "0.70107394", "0.69821227", "0.6974225", "0.697394", "0.69461507", "0.6944149", "0.69317734", "0.6927157", "0.6919965", "0.6897939" ]
0.0
-1
Private getter is redundant because field is private use this. because it signifies it is a field (instead of global variable)
public int getStudentId() { return studentId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Get() {}", "private Get() {}", "public void get() {\n }", "public class_1048 method_2258() {\r\n return this.field_1859;\r\n }", "public class_1660 method_2257() {\r\n return this.field_1852;\r\n }", "@Override\n public void get() {}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "protected Field getField()\n {\n return field;\n }", "protected Field getField()\n {\n return field;\n }", "public class_34 method_627() {\n return this.field_394;\n }", "public class_1657 method_2256() {\r\n return this.field_1851;\r\n }", "public int getf(){\r\n return f;\r\n}", "private int getMY() {\n\t\treturn 0;\r\n\t}", "protected class_496 method_1608() {\n return this.field_936;\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public int func_176881_a() {\n/* */ return this.field_176893_h;\n/* */ }", "public int somemethod(){\n return this.data;\n }", "public int geti(){\r\n return i;\r\n}", "protected int somemethod2(){\n return this.data;\n }", "private int somemethod3(){\n return this.data;\n }", "private stendhal() {\n\t}", "public double getLoY() {\r\n\treturn fieldLoY;\r\n}", "public int getProF() {\n/* 42 */ return this.proF;\n/* */ }", "public double getHiY() {\r\n\treturn fieldHiY;\r\n}", "public Empresa getEmpresa()\r\n/* 84: */ {\r\n/* 85:131 */ return this.empresa;\r\n/* 86: */ }", "private Helper getHelper() {\r\n return this.helper;\r\n }", "public double getHiX() {\r\n\treturn fieldHiX;\r\n}", "public int getProT() {\n/* 78 */ return this.proT;\n/* */ }", "public String getNombre()\r\n/* 113: */ {\r\n/* 114:204 */ return this.nombre;\r\n/* 115: */ }", "public CuentaContable getCuentaContable()\r\n/* 78: */ {\r\n/* 79: 99 */ return this.cuentaContable;\r\n/* 80: */ }", "private ReadProperty()\r\n {\r\n\r\n }", "public Empleado getEmpleado()\r\n/* 183: */ {\r\n/* 184:337 */ return this.empleado;\r\n/* 185: */ }", "public String func_176882_c() {\n/* */ return this.field_176891_j;\n/* */ }", "public String getNombre()\r\n/* 60: */ {\r\n/* 61: 67 */ return this.nombre;\r\n/* 62: */ }", "public int getx(){\r\n return z;\r\n}", "public Object get()\n {\n return m_internalValue;\n }", "public int getThirdR() {\n/* 66 */ return this.thirdR;\n/* */ }", "public T getField()\r\n {\r\n return this.field;\r\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public Method getGetter() {\n return this.getter;\n }", "private String getSomePrivateInfo() {\r\n \treturn \"private information of MySubject\";\r\n }", "public double getLoX() {\r\n\treturn fieldLoX;\r\n}", "public int getX(){return this.x;}", "public String getNombre()\r\n/* 17: */ {\r\n/* 18:41 */ return this.nombre;\r\n/* 19: */ }", "public double getA(){\n return a;\n }", "public CuentaContable getCuentaContableCierre()\r\n/* 98: */ {\r\n/* 99:115 */ return this.cuentaContableCierre;\r\n/* 100: */ }", "int getNumber () { return number; }", "public double getLoZ() {\r\n\treturn fieldLoZ;\r\n}", "public String getValor()\n/* 17: */ {\n/* 18:27 */ return this.valor;\n/* 19: */ }", "public int getThirdL() {\n/* 72 */ return this.thirdL;\n/* */ }", "int getBlue(){\n\n return this.blue;\n }", "public double method_886() {\n return this.field_666;\n }", "public\n Account\n getAccount()\n {\n return itsAccount;\n }", "public Enqueteur getEnqueteur()\r\n/* */ {\r\n/* 57 */ return this.enqueteur;\r\n/* */ }", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public Book getBook() \t\t{ return this.myBook; }", "protected class_25 method_2044() {\r\n class_26 var1 = this.field_1823.method_127(this.field_1820);\r\n class_1665 var10001 = new class_1665;\r\n var10001.method_9187(this, var1, this.field_1820.method_6164());\r\n this.field_1855 = var10001;\r\n return this.field_1855;\r\n }", "@Override\n public boolean isPrivate() {\n return true;\n }", "public class_904 method_219() {\r\n return class_904.field_4440;\r\n }", "public String getGetter() {\n return \"get\" + getCapName();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public Genero getGenero()\r\n/* 143: */ {\r\n/* 144:261 */ return this.genero;\r\n/* 145: */ }", "public String getPhone()\r\n/* 41: */ {\r\n/* 42:54 */ return this.phone;\r\n/* 43: */ }", "public int getAge(){\n return age;\n }", "public int getAge() {return age;}", "public abstract String get();", "public int getNumber()\n {\n return number;\n}", "public java.lang.String getCodigo(){\n return localCodigo;\n }", "public int getSecondL() {\n/* 54 */ return this.secondL;\n/* */ }", "public int method_1549() {\r\n return this.field_1434;\r\n }", "protected Player getPlayer() { return player; }", "public int getValue()\r\n/* 21: */ {\r\n/* 22: 71 */ return this.value;\r\n/* 23: */ }", "Object mo6080c() {\n return this.f2347q;\n }", "protected abstract T getThis();", "public MotivoLlamadoAtencion getMotivoLlamadoAtencion()\r\n/* 114: */ {\r\n/* 115:123 */ return this.motivoLlamadoAtencion;\r\n/* 116: */ }", "public static boolean canAccessFieldsDirectly(){\n return false; //TODO codavaj!!\n }", "@Override\n Derived get();", "@Override\n\tpublic void get() {\n\t\tSystem.out.println(\"this is get\");\n\t}", "public int getID()\r\n/* 65: */ {\r\n/* 66: 67 */ return this.id;\r\n/* 67: */ }", "public int getAge()\r\n {\r\n return age;\r\n }", "public int getlife(){\r\n return life;\r\n}", "public Ejercicio getEjercicio()\r\n/* 145: */ {\r\n/* 146:183 */ return this.ejercicio;\r\n/* 147: */ }", "public int getNumber(){return number;}", "public int getValue() {\n/* 450 */ return this.value;\n/* */ }", "public int getx() {\n return x;\n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public a get() {\n return c();\n }", "@Override\n public GameField getField(){\n return this.gameField;\n }", "public Member getMember() {\n\t\treturn member; ////changed 'MeMbEr' to 'member'\r\n\t}", "public T get() {\n return value;\n }", "public T get() {\n return value;\n }", "public int getX()\n {\n \t return _x;\n }", "public int getNumber(){\r\n return num;\r\n }", "float getX() {\n return _x;\n }", "protected final Reader getReader()\n {\n return _reader;\n }", "public String getMensaje()\r\n/* 633: */ {\r\n/* 634:710 */ return this.mensaje;\r\n/* 635: */ }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public static String getFoo() {\n return \"foo\";\n }", "public int getCounter() {\nreturn this.counter;\n}", "public static void thisMethod() {\n }" ]
[ "0.6763179", "0.6763179", "0.6606712", "0.6601479", "0.6523437", "0.63966674", "0.6378219", "0.63655096", "0.63655096", "0.63532126", "0.630784", "0.6301744", "0.63003474", "0.62842155", "0.6220312", "0.62037104", "0.6180734", "0.6158803", "0.61490035", "0.61442715", "0.6136628", "0.61264503", "0.61239606", "0.6006658", "0.6005492", "0.59975684", "0.599608", "0.5990058", "0.59801835", "0.5978538", "0.59784466", "0.5966853", "0.596407", "0.59640527", "0.59594136", "0.59555084", "0.59450334", "0.5934727", "0.5924441", "0.59244305", "0.5917452", "0.5911634", "0.58984435", "0.5882642", "0.5857155", "0.5857001", "0.5856991", "0.5853863", "0.5845887", "0.5838601", "0.5836842", "0.58358747", "0.5833792", "0.58251524", "0.5821391", "0.5820876", "0.58009046", "0.57968426", "0.5784556", "0.5775404", "0.57626665", "0.5754098", "0.57524", "0.57522", "0.5732919", "0.57322884", "0.5731773", "0.5728367", "0.572325", "0.5717698", "0.57105935", "0.5704671", "0.57034993", "0.5703465", "0.57003206", "0.56940925", "0.56937236", "0.56918347", "0.5690419", "0.5689623", "0.5686214", "0.5685386", "0.5669885", "0.56681496", "0.56671935", "0.56664425", "0.56664425", "0.56604135", "0.56580365", "0.56568587", "0.5655165", "0.5655165", "0.565131", "0.5650404", "0.56442434", "0.564325", "0.56423813", "0.56420106", "0.5636738", "0.5634906", "0.5631761" ]
0.0
-1
no setter because we do not need to provide a way to change an ID
public int getNumberOfCredits() { return numberOfCredits; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "public void setId(int id){ this.id = id; }", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public abstract void setId(int id);", "public void setId(long id) {\n id_ = id;\n }", "void setId(int id) {\n this.id = id;\n }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(int id){\n this.id=id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setID(int id);", "public void setID(long id);", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "private Integer getId() { return this.id; }", "public void setID(String newID)\r\n {\r\n id=newID;\r\n }", "public void setId(String id)\r\n/* 19: */ {\r\n/* 20:17 */ this.id = id;\r\n/* 21: */ }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "public void setId(ID id)\n {\n this.id = id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "@Override\n\tpublic void setId(Long id) {\n\t}", "@Override public String getID() { return id;}", "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "@Override\n public long getId() {\n return id;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setID(int id){\n this.ID = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "@Override\r\n\tpublic void setId(String id) {\n\t\t\r\n\t}", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "@Override\n public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n\tthis.id = id;\n}", "public void setId(int i) { id = i; }", "@Override\n\tpublic void setId(String id)\n\t{\n\t\t\n\t}", "public void setId(int id)\n {\n this.id=id;\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "public int getId(){ return id; }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "@Override\r\n\t\tpublic void setId(String id)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public int getId() {return id;}", "@Override\n public void setId(final long id) {\n super.setId(id);\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "void setId(ID id);", "public void setID(int id)\r\n {\r\n\tthis.id = id;\r\n }", "@Override\n public Long getId () {\n return id;\n }", "void setId(int val);", "public void setId (String id)\n {\n _id = id;\n }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@Override\n public Integer getId() {\n return id;\n }", "public void setId(Long id) \n {\n this.id = id;\n }", "public void setId( Integer id )\n {\n this.id = id ;\n }", "@Override\r\n\tpublic void setId(final K id) {\n\t\tsuper.setId(id);\r\n\t}", "public void setID(int id) {\n this.id = id;\n }", "public void setId(long id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\n this.id = id;\n\t}", "public int getId() {return Id;}", "public void setID(String id){\n this.id = id;\n }", "public void setId(String id)\n {\n this.id = id;\n }", "public void setId (String id);", "public void setID(int value) {\n this.id = value;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "void setId(final Integer id);", "@SuppressWarnings(\"unused\")\n private void setId(Integer id) {\n this.id = id;\n }", "@Override\n public void setId(Integer id) {\n this.id = id;\n }" ]
[ "0.83461595", "0.81792754", "0.81291825", "0.80995464", "0.80995464", "0.8057102", "0.8057102", "0.7866329", "0.7835593", "0.7829836", "0.78238595", "0.78238595", "0.7805394", "0.7777516", "0.7754562", "0.7747857", "0.7741773", "0.7728316", "0.77238244", "0.7721475", "0.77188945", "0.77168924", "0.7715828", "0.7711244", "0.7711244", "0.7711244", "0.7711244", "0.7711244", "0.7711244", "0.7702339", "0.7701046", "0.7666956", "0.76537013", "0.7651571", "0.76423943", "0.7638502", "0.76305467", "0.7629959", "0.7622568", "0.7622568", "0.76103896", "0.7606913", "0.76053286", "0.76053286", "0.75987166", "0.7597505", "0.75939345", "0.75939345", "0.7589802", "0.7587868", "0.7586094", "0.75844276", "0.75797385", "0.7575267", "0.7574996", "0.7573536", "0.7573536", "0.7573536", "0.7573536", "0.7569653", "0.7567182", "0.75560397", "0.7550876", "0.7550876", "0.7550876", "0.7550876", "0.7550876", "0.7550876", "0.7544905", "0.75410056", "0.7536395", "0.7533797", "0.7533421", "0.7526185", "0.7524733", "0.7524733", "0.7524733", "0.75245625", "0.75245625", "0.75223583", "0.75192", "0.7517249", "0.7515402", "0.7515402", "0.7514204", "0.7512025", "0.75118494", "0.74982476", "0.7497259", "0.7493555", "0.7483802", "0.7482924", "0.74796575", "0.7479107", "0.7475581", "0.7471224", "0.74670565", "0.74670565", "0.7464614", "0.74634796", "0.74622345" ]
0.0
-1
Constructor: Initializes the counter.
public QuestionQueue () { count = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Counter() {\r\n this.count = 0;\r\n }", "public Counter()\n {\n this(0);\n }", "public Counter() {\r\n value = 0;\r\n }", "public BasicCounter() {\n count = 0;\n }", "public myCounter() {\n\t\tcounter = 1;\n\t}", "public Counter(int init){\n \tvalue = init;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "public Counter() {\n //this.max = max;\n }", "public Counter(int count)\n {\n this.setCount(count);\n }", "public Counter(int val) {\r\n value = val;\r\n }", "public Counter(Counter count) {\r\n value = count.value;\r\n }", "public Counter(int initial, String name, String comment, String date){\n value = initial;\n this.name = name;\n this.comment = comment;\n this.date = date;\n this.inital_value=initial;\n\n }", "public Counter (int modulus) {\n count = 0;\n this.modulus = modulus;\n }", "public myCounter(int startValue) {\n\t\tcounter = startValue;\n\t}", "public Counter(int m) {\n this(DEFAULT_MIN_VALUE, m);\n }", "public HitCounter() {\n q = new ArrayDeque();\n PERIOD = 300;\n }", "public WordCount()\n {\n //initializes common variables.\n lineNums = new CircularList();\n count = 1;\n }", "public HitCounter() {\n q = new ArrayDeque();\n map = new HashMap();\n PERIOD = 300;\n hits = 0;\n }", "public HitCounter() {\n q = new LinkedList<>();\n }", "public HitCounter() {\n map = new HashMap<Integer, Integer>();\n }", "public ClickCounter() {\n System.out.println(\"Click constructor: \" + count);\n \n }", "private Count() {}", "private Count() {}", "private SchedulerThreadCounter()\n\t{\n\t\tii_counter = 100;\n\t}", "public ConnectionCount() {\nthis(0);\n}", "public BasicCalculator() {\n // Initialization here.\n // this.count = 0;\n\n }", "public MyCounter()\n {\n counter = 0;\n \n this.setSize(100, 200);\n this.setTitle(\"My Counter\");\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n Container contentPane = getContentPane(); \n contentPane.setLayout(new BorderLayout());\n\n label = new JLabel(\"0\", SwingConstants.CENTER);\n label.setFont(new Font(\"serif\", Font.PLAIN, 24));\n add(label, BorderLayout.CENTER);\n\n button = new JButton(\"Click\");\n contentPane.add(button, BorderLayout.SOUTH);\n button.addActionListener(this);\n }", "public ConnectionCount(int counter) {\nthis.counter = counter;\n}", "public void createCounters() {\n // COUNTERS CREATION //\n //create a new counter for the blocks.\n this.blockCounter = new Counter();\n //create a new counter for the blocks.\n this.ballCounter = new Counter();\n }", "public HitCounter() {\n hits = new int[300];\n times = new int[300];\n }", "public HitCounter() {\n hits = new int[300];\n times = new int[300];\n }", "public HitCounter() {\n map = new TreeMap<>();\n }", "public CalcCountRecord(int cnt)\r\n/* 14: */ {\r\n/* 15:48 */ super(Type.CALCCOUNT);\r\n/* 16:49 */ this.calcCount = cnt;\r\n/* 17: */ }", "public SynchronizedCounter(int count) {\n\t\tthis.count = count;\n\t}", "public TDCounter ()\r\n\t{\r\n\t\tsuper ();\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}", "ThreadCounterRunner() {}", "private WordCounting() {\r\n }", "public Countable(){\n counter++;\n objectName = \"Countable \" + counter;\n// System.out.println(objectName);\n }", "public Counter(int min, int max) {\n this.min = min;\n this.max = max;\n value = min;\n }", "public MoleculeCounter() {\r\n\t\tsetMolecule(\"\");\r\n\t\tsetComponent(\"\");\r\n\t\tsetState(\"\");\r\n\t\tsetCount(0);\r\n\t}", "public CountingMap() {\n this( new HashMap<K, Integer>() );\n }", "public void setCounter(int number){\n this.counter = number;\n }", "public void setCounter(int counter) {\n this.counter = counter;\n }", "public ZeroCountDataWriter() {\n\t\tsuper(DataWriterType.ZEROCNTType);\n\t}", "public PrimeCounter() {\n\t\t}", "public Timer()\n {\n // initialise instance variables\n startTime = 0;\n bonusTime = 0;\n }", "private static void setCounter() {++counter;}", "public AllWordsCounter() {\n counters = new SingleWordCounter[MAX_WORDS];\n // TODO: initialize instance variable to hold MAX_WORDS objects\n\n }", "public WordCount() {\n }", "public IntHolder() {\r\n\t}", "public void setCounter(int value) { \n\t\tthis.count = value;\n\t}", "public Stats() {\n numIn = 0;\n numOut = 0;\n totTimeWait = 0;\n totTime = 0;\n }", "public Score()\n {\n // initialize instance variables\n score = 0;\n }", "public CounterListModel() {\n\t\tsuper();\n\t\tlist = new ArrayList<CounterModel>();\n\t}", "public Int() {\n this(0);\n }", "public CountInfo() {\n\t\tthis.rank = 0;\n\t\tthis.number = 0;\n\t}", "public static int getCounter() {return counter;}", "private void initCounts() {\n this.angry_count = findViewById(R.id.anger_count);\n this.fear_count = findViewById(R.id.fear_count);\n this.joyful_count = findViewById(R.id.joy_count);\n this.love_count = findViewById(R.id.love_count);\n this.sad_count = findViewById(R.id.sad_count);\n this.suprise_count = findViewById(R.id.suprise_count);\n\n this.updateCounts();\n }", "public MyInteger( )\n {\n this( 0 );\n }", "public CountBasedScannableCode() {}", "public TestMe()\r\n/* 11: */ {\r\n/* 12:10 */ this.myNumber = (instanceCounter++);\r\n/* 13: */ }", "public NumberedList()\n {\n _init=1;\n }", "public Timer() {\n\t\tthis.start = 0L;\n\t\tthis.end = 0L;\n\t}", "@Override\n public void initialize(CounterInitializationContext context) {\n assertThat(context.getLeaf().getChildren()).isEmpty();\n\n Optional<Measure> measureOptional = context.getMeasure(NEW_LINES_TO_COVER_KEY);\n if (!measureOptional.isPresent()) {\n return;\n }\n this.values.increment((int) measureOptional.get().getVariation());\n }", "public Averager()\r\n\t{\r\n\t\tcount = 0;\r\n\t\tsum = 0;\r\n\t}", "public ScoreIndicator(Counter score) {\r\n this.score = score;\r\n }", "public void setCountToZero() {\r\n \r\n // set count to 0\r\n count = 0;\r\n }", "private Numbers() {\n\t}", "public Counter(String name, Ref ref, int value) {\r\n\t\tthis.name = name;\r\n\t\tthis.value = value;\r\n\r\n\t\tsetRef(ref);\r\n\t\tbasis = ref.getTarget();\r\n\t}", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public Jumble() {\n jumble = new HashMap<>();\n total = 0;\n }", "public DDCountInversion(){\n\t\tnumeros = new ArrayList<Integer>();\n\t}", "static IterV<String, Integer> counter() {\n return cont(count.f(0));\n }", "public int getCounter(){\n return counter;\n }", "private final int initializeInt() {\n\t\treturn 0;\r\n\t}", "@Override\n public void initialize() {\n conveyor.setBallCount(0);\n conveyor.startTime(); \n }", "public void setCount(final int c) {\n\t\tcount = c;\n\t}", "public AccumulatorNumber ()\n\t{ total = 0.0; }", "public int getCounter() {\nreturn this.counter;\n}", "public void initializeCounters() {\n resetCounters();\n lastAd = tozAdCampaign.size() - 1;\n if (baseAd > lastAd) baseAd = lastAd;\n if (baseViewIndex > lastAd) baseViewIndex = lastAd;\n if (baseViewIndex < 0) baseViewIndex = 0;\n alignRefreshInterval();\n reInitializeCampaign = false;\n }", "public StartCount() {\n\tint pass = 4;\n\tboolean heard = false;\n\tIterator iter;\n\n\ttry {\n\t \n\t \n\t aif.open();\n\t aif.registerHandler(this, kCOUNT_MESSAGE);\n\t \n\t while (true) {\n\t\tSystem.out.println(\"Start of Epoch\");\n\t\tif (pass++ > 2) {\n\n\t\t countMessage[LEVEL_BYTE] = 0;\n\t\t countMessage[COUNT_BYTE] = 0;\n\t\t countMessage[REMAINING_TIME_LO_BYTE] = 64;\n\t\t aif.sendAM(countMessage, kCOUNT_MESSAGE, (short)0xFFFF);\n\t\t pass = 0;\n\t\t}\n\t\tThread.currentThread().sleep(2000);\n\t\titeration++;\n\t\t//if (epochCount > 0) heard = true;\n\t\titer = counts.values().iterator();\n\t\tepochCount = 0;\n\t\twhile (iter.hasNext()) {\n\t\t CountReport cr = (CountReport)iter.next();\n\t\t if (iteration - cr.iteration > 8) iter.remove();\n\t\t else epochCount += cr.count;\n\t\t}\n\t\tSystem.out.println(\"End of Epoch, Count = \" + epochCount);\n\n\n\n\t }\n\n\t \n\t} catch (Exception e) {\n\t e.printStackTrace();\n\t}\n }", "public int getCounter() {\r\n return counter;\r\n }", "studentCounter(){ \n\t\tnumStudentInRoom = 0 ;\n\t}", "public Builder setCounter(io.dstore.values.IntegerValue value) {\n if (counterBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n counter_ = value;\n onChanged();\n } else {\n counterBuilder_.setMessage(value);\n }\n\n return this;\n }", "public int getCounter()\n {\n return counter;\n }", "public Frequency() {\n\n }", "public void setinitialcounter() {\n\t\tmPref.edit().putInt(PREF_CONVERTED, 0).commit();\r\n\t}", "@Override\n\tpublic int getCounter() {\n\t\treturn counter;\n\t}", "private void initCounter(){\n\t\t//Set the font.\n\t\ttry {\n\t\t\tcounterFont = FontMaker.getFont(PREFERRED_FONT, 18);\n\t\t} catch (IndexOutOfBoundsException | IOException | FontFormatException e) {\n\t\t\tcounterFont = FontMaker.getDefaultFont(18);\n\t\t}\n\t\t//Get the width of the largest possible String width.\n\t\tString biggestString = \" Question: \" + maxNumQuestions + \" / \" + maxNumQuestions + \" \";\n\t\tint stringWidth = FontMaker.getStringWidth(counterFont, mainWindow.getGraphics(), biggestString);\n\t\tint padding = 20;\n\t\t\n\t\t//Make and display the questionCounter.\n\t\tquestionCounter = new ContentPane(stringWidth,\n\t\t\t\t(FontMaker.getFontHeight(counterFont, mainWindow.getGraphics()) + padding), false, false){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void paintComponent(Graphics g) {\n\t\t\t\t\t\tsuper.paintComponent(g);\n\t\t\t\t\n\t\t\t\t\t\tColor oldColor = g.getColor();\n\t\t\t\t\t\tg.setColor(Color.GRAY);\n\t\t\t\t\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\t\t\t\tg.setColor(oldColor);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\tquestionCounter.setBackground(Color.BLUE);\n\t\tquestionCounter.setOpaque(true);\n\t\tquestionCounter.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\tint xOrigin = mainWindow.getPreferredSize().width - (stringWidth + padding);\n\t\tint yOrigin = mainWindow.getPreferredSize().height - (questionCounter.getPreferredSize().height + 50);\n\t\tmainWindow.addLayer(questionCounter, TEXT_LAYER, xOrigin, yOrigin);\n\t}", "public Tester()\n {\n // initialise instance variables\n x = 0;\n }", "public TDCounter (String oVariable)\r\n\t{\r\n\t\tsuper (oVariable);\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}", "public IntArrays()\n\t{\n\t\tthis(10);\n\t}", "public int getCounter() {\n return counter;\n }", "public TestClass(int num) {\r\n accounts = new HashSet<String>();\r\n // connecting to twitter\r\n // creating object to work with\r\n twitter = TwitterFactory.getSingleton();\r\n this.num = num;\r\n count = 0;\r\n }", "public Happy_Number()\r\n\t{\r\n\t\tnumberHolder = new int[20];\r\n\t\tfor(int ii = 0; ii < numberHolder.length; ii++)\r\n\t\t{\r\n\t\t\tnumberHolder[ii] = 0;\r\n\t\t}\r\n\t}", "public Person(){\n instanceCounter++;\n localCounter++;\n }", "private ColorWheel() {\n pCount = 0;\n sCount = 0;\n }", "public Statistics() {\r\n\t\tcurrentGameTime = 0;\r\n\t\ttotalTime = 0;\r\n\t\tminTime = Integer.MAX_VALUE;\r\n\t\tmaxTime = 0;\r\n\t\tscores = new int[2];\r\n\t\twinnerId = 0;\r\n\t\tvictories = new int[2];\r\n\t\tgameCount = 0;\r\n\t}", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}" ]
[ "0.8734411", "0.86726403", "0.83885634", "0.8326315", "0.82428634", "0.80448943", "0.787879", "0.787879", "0.78468883", "0.7823079", "0.75960433", "0.7438475", "0.7420069", "0.7409347", "0.7354195", "0.7305425", "0.7283489", "0.7265121", "0.7233332", "0.7225763", "0.7178038", "0.7162254", "0.71449226", "0.71449226", "0.7131938", "0.7082357", "0.70706874", "0.7051791", "0.7035896", "0.69661283", "0.69544333", "0.69544333", "0.6936041", "0.687884", "0.67634094", "0.6667489", "0.66460216", "0.66063166", "0.6559086", "0.6540361", "0.6522261", "0.6491232", "0.64582646", "0.6437054", "0.64361656", "0.6434327", "0.6423313", "0.6411381", "0.6410379", "0.6407492", "0.6387768", "0.6376493", "0.6364629", "0.6359992", "0.6347321", "0.6343042", "0.63337266", "0.6323795", "0.630184", "0.621262", "0.6211876", "0.62109256", "0.6181976", "0.6180844", "0.61744106", "0.61666036", "0.61635697", "0.6144813", "0.6082129", "0.6072604", "0.60634035", "0.60634035", "0.60620934", "0.60512066", "0.60363996", "0.60298926", "0.602149", "0.6018349", "0.60149616", "0.6014219", "0.6012306", "0.6008193", "0.60028005", "0.60005885", "0.60003275", "0.5998713", "0.5993292", "0.59888834", "0.5975374", "0.59712946", "0.59687793", "0.5945631", "0.59341055", "0.5930943", "0.59291464", "0.5927724", "0.5926149", "0.5925599", "0.5920501", "0.5909517", "0.59092015" ]
0.0
-1
Puts a question in the rear of the queue.
public void enqueue () { count++; questionList.add(newQuestion); //System.out.println("Question #"+ totNumQ + " is added to the queue."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addQ (Question Q)\n {\n newQuestion = Q;\n \n enqueue();\n }", "@Override\n\tpublic void execute() {\n\t\tthis.receiver.add(this.question, 42);\n\t}", "public void addQuestion(Question question);", "public void queue(Object newItem){\n if(isFull()){\n System.out.println(\"queue is full\");\n return;\n }\n ArrayQueue[++rear] = newItem;\n if(front == -1)\n front = 0;\n \n }", "@Override\n public void edit(Question q) {\n delete(q);\n add(q);\n }", "void addQuest(Question quest){\r\n\t\t//if the test bank does not contain this topic, create a new one and add question\r\n\t\tif(!bank.containsKey(quest.getTopic())){\r\n\t\t\tquest.setID(0);\r\n\t\t\tbank.put(quest.getTopic(), new ArrayList<Question>());\r\n\t\t\tbank.get(quest.getTopic()).add(quest);\r\n\t\t}else{\r\n\t\t\tquest.setID(bank.get(quest.getTopic()).size());\r\n\t\t\tbank.get(quest.getTopic()).add(quest);\r\n\t\t}\r\n\t}", "public void addQuestion(Question question) {\n\t\tquestions.add(question);\n\t}", "void addQuestionAnswer(Answer answer);", "void enqueue(E newEntry);", "static void insert(Queue<Integer> q, int k){\n \n q.add(k);\n \n }", "@Override\n public void enqueue(T value) {\n myQ[myLength] = value;\n myLength++;\n }", "void enqueue(E item);", "public void enqueue (E element);", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "public void enqueue(E e) {\n\t\t\tsynchronized (this.pq) {\n\t\t\t\tthis.pq.add(e);\n//\t\t\t\tSystem.out.println(\"insert \" + e);\n\t\t\t}\n\t\t\tthis.sem.release();\n\t}", "public void dequeue()\n {\n System.out.println(\"Question #\"+ questionList.get(0).getQNum()\n + \" is removed from the queue.\");\n questionList.remove(0);\n count--;\n }", "void add(String question, long time, boolean correct);", "public void enqueue(T element);", "public void addQuestion(Question question) {\n \t\tquestion.setId(questionIdCounter);\n \t\tquestions.add(question);\n \t\tquestionIdCounter++;\n \t}", "public void add(IQuestion question) throws IllegalArgumentException {\n\t\tgetQuestions().add(question);\n\t}", "@Override\n\tpublic void addToQueue() {\n\t}", "private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }", "@Override\n\tpublic void QuestionDone() {\n\t\t\n\t}", "public DnsMessage addQuestion(DnsQuestion question) {\n if (questions == null) {\n questions = new LinkedList<DnsQuestion>();\n }\n questions.add(question);\n return this;\n }", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "void enqueue(int idNumber, int arrival_time) \r\n\t { \r\n\t \r\n\t // Create a new LL node \r\n\t QNode temp = new QNode(idNumber, arrival_time); \r\n\t \r\n\t // If queue is empty, then new node is front and rear both \r\n\t if (this.rear == null) \r\n\t { \r\n\t this.front = this.rear = temp; \r\n\t size++;\r\n\t maxSize++;\r\n\t return; \r\n\t } \r\n\t \r\n\t // Add the new node at the end of queue and change rear \r\n\t else {\r\n\t \tthis.rear.next = temp;\r\n\t \tthis.rear = temp; \r\n\t \tsize++;\r\n\t \tmaxSize++;\r\n\t }\r\n\t \r\n\t }", "@Override\r\n\tpublic void enqueueRear(E element) {\n\t\tif(sizeDeque == CAPACITY) return;\r\n\t\tif(sizeDeque == 0) {\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tbackDeque = (backDeque + 1)%CAPACITY;\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\t\r\n\t\tsizeDeque++;\r\n\t}", "public void add( IAnswer possibleAnswer );", "public void enqueue(E item) {\n addLast(item);\n }", "private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }", "public void enqueue(Comparable item);", "public void enqueue(T pushed)\n\t{insert(pushed);}", "private static void tester(APQueue<String> q) {\n q.push(\"c++\");\n q.push(\"python\");\n q.push(\"java\");\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.peek());\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.pop());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.peek());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.pop());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.peek());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.pop());\n System.out.println(\"Should be 0: \" + q.size());\n \n System.out.println();\n }", "void addAnswer(Answer answer);", "@Override\n\tpublic void q() {\n\n\t}", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "public void enqueue(String animalType){\n Animal an = new Animal(animalType);\n this.rear.next=an;\n this.rear=an;\n counter++;\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public void setQuestion(String question) {\n this.question = question;\n }", "void enqueue(E e);", "@Override\n public void enqueue(Object element) {\n LinkedNode<T> node = new LinkedNode<T>((T) element);\n if (isEmpty()) {\n front = node;\n } else {\n rear.setNext(node);\n }\n rear = node;\n count++;\n\n }", "void put(String question, String answer) {\n map.put(question, answer);\n }", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "@Override\n\tpublic void enqueue(E e) {\n\t\tint index = (pos + size) % queue.length;\n\t\tqueue[index] = e;\n\t\tsize++;\n\t}", "public void setQuestion(String question) {\n\t\tthis.question = question;\n\t}", "private void re_queue() {\n\n Queue<String> queue = new LinkedList<>();\n queue.offer(\"我\");\n queue.offer(\"爱\");\n queue.offer(\"刷\");\n queue.offer(\"题\");\n queue.offer(\"呵呵\");\n\n System.out.println(\"*********queue*********\");\n System.out.println(queue);\n System.out.println(\"*********queue*********\");\n System.out.println(\"查看队首元素,不改变队列结构:\" + queue.peek());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n System.out.println(\"取出队首元素,改变队列结构:\" + queue.poll());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n while (queue.size() > 0) {\n System.out.println(queue.poll());\n System.out.println(queue);\n }\n }", "private void insertToSentList(Question question) {\r\n\t\tdListOfQuestions.append(new QuestionWithAns(question));\r\n\t\tbTreeOfQuestions.addNode(question.getQnNum(), question);\r\n\t}", "void enqueue(T t);", "public void setQuestions(Vector<Question> q){\n\t\t\tquestions = q;\n\t\t}", "public void enqueue(Person person) {\r\n saf.add(person);\r\n }", "private void addQuestion(Questions question) {\n ContentValues cv = new ContentValues();\n cv.put(QuestionsTable.Column_Question, question.getQuestion());\n cv.put(QuestionsTable.Column_Option1, question.getOption1());\n cv.put(QuestionsTable.Column_Option2, question.getOption2());\n cv.put(QuestionsTable.Column_Option3, question.getOption3());\n cv.put(QuestionsTable.Column_Option4, question.getOption4());\n cv.put(QuestionsTable.Column_Answer_Nr, question.getAnswerNr());\n db.insert(QuestionsTable.Table_name, null, cv);\n }", "@Override\r\n\tpublic void quack() {\n\t\t\r\n\t}", "void put(char ch){\n\t\tif(putloc == q.length){\n\t\t\tSystem.out.println(\"- Queue is full.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tq[putloc]=ch;\n\t\tputloc++;\n\t}", "public void addQuestion(Question quest) {\n ContentValues values = new ContentValues();\n values.put(KEY_QUES, quest.getQUESTION());\n values.put(KEY_ANSWER, quest.getANSWER());\n values.put(KEY_OPTA, quest.getOPTA());\n values.put(KEY_OPTB, quest.getOPTB());\n values.put(KEY_OPTC, quest.getOPTC());\n // Inserting Row\n db.insert(TABLE_NAME_QUEST, null, values);\n }", "void enqueue(E el);", "public void enqueue(T item) {\n\t\tif(rear == capacity)\n\t\t\treSize();\n\t\tarr[rear] = item;\n\t\tSystem.out.println(\"Added: \" + item);\n\t\trear++;\n\t\tsize++;\n\t}", "@Override\n\tpublic boolean addQuestion(QuestionObject question) {\n\t\tif (question != null && !questionComposite.checkExist(question)) {\n\t\t\tquestionComposite.add(question);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public static void enQueue(Queue q, String entry){ \n if (q.queuesize < q.names.length){ //If the queue isn't full - Size of queue is less than the set array size \n q.names[q.queuesize] = entry; //Set the value at the index of queue size to the input (Using the array in the Queue class to store this)\n q.queuesize +=1; //Increment the size of queue \n }\n }", "public void enqueue(E element) {\n\t\tadd(element);\n\t}", "@Override\n public void enqueue(E e) {\n array.addLast(e);\n }", "void enqueue(T data) \n { \n \n // Create a new LL node \n LinkedListQueue temp = new LinkedListQueue(data); \n \n // If queue is empty, then new node is front and rear both \n if (this.rear == null) { \n this.front = this.rear = temp; \n return; \n } \n \n // Add the new node at the end of queue and change rear \n this.rear.next = temp; \n this.rear = temp; \n }", "static void enQueue(Queue q, int x) {\r\n push(q.stack1, x);\r\n }", "public void enqueue( MyTreeNode<T> treeNode ) {\n\t\tQueueNode newNode = new QueueNode(treeNode);\n\t\t// the queue is empty\n\t\tif ( tail == null ) {\n\t\t\t// the tail and the head point to the same only element in the collection\n\t\t\tthis.tail = newNode;\n\t\t\tthis.head = newNode;\n\t\t// the queue is not empty\n\t\t} else {\n\t\t\t// the second from the end item of the collection keeps track with the tail\n\t\t\tthis.tail.next = newNode;\n\t\t\t// the new element becomes the tail of the collection\n\t\t\tthis.tail = newNode;\n\t\t}\n\t}", "@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }", "public interface Queue<E> {\r\n\r\n /**\r\n * Adds the given item to the end of the queue.\r\n * \r\n * @pre The queue is not full and the item to be added is not null\r\n * @post The item is added at the end of the queue\r\n * @param item\r\n * The item to be added to the queue\r\n */\r\n void enqueue(E item);\r\n\r\n /**\r\n * Removes and returns the item from the beginning of the queue.\r\n * \r\n * @pre The queue is not full\r\n * @post The item is removed queue\r\n * @return the item removed from the queue or null if the queue is empty\r\n */\r\n E dequeue();\r\n\r\n}", "public void addQuestions() {\n\t\tboolean addNewQuestion = true;\n\t\tString text;\n\t\tQuestion q;\n\t\tString promptResponse;\n\t\t\n\t\twhile (addNewQuestion) {\n\t\t\tSystem.out.print(\"Enter question: \");\n\t\t\ttext = System.console().readLine();\n\t\t\tq = new QuestionImpl(questionId, text);\n\t\t\tthis.questionId++;\n\t\t\tq.addAnswers();\n\t\t\tthis.questions.add(q);\n\n\t\t\tSystem.out.print(\"Hit Return to add another question or q to quit: \");\n\t\t\tpromptResponse = System.console().readLine();\n\t\t\tif (promptResponse.equals(\"q\") ||\n\t\t\t\t\tpromptResponse.equals(\"Q\") ||\n\t\t\t\t\tpromptResponse.equals(\"quit\") ||\n\t\t\t\t\tpromptResponse.equals(\"Quit\")) {\n\t\t\t\taddNewQuestion = false;\n\t\t\t}\n\t\t}\n\t}", "void enqueue(Object elem);", "public void addQuestion(Question a) {\n quesCollec.add(a);\n }", "public void question() {\n\t\tlead.answer(this);\n\t}", "public abstract void Enqueue (Type item);", "@Override\r\n public void addAnswer(String answer) {\r\n this.answers.add(answer);\r\n }", "public synchronized void enqueue(T thing) {\r\n\t\twhile (queue.size()==maxSize){\r\n\t\t\ttry{\r\n\t\t\t\tthis.wait();\r\n\t\t\t} catch(InterruptedException e){\r\n\t\t\t\tSystem.out.println(\"Interruption during enqueue\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tqueue.addLast(thing);\r\n\t\tthis.notifyAll();\r\n\t}", "public void setQ(int q) {\n this.q = q;\n }", "void newAnswer (Integer q, Integer a) {\n\t\tif (results.get(q)==null) {\n\t\t\tArrayList<Integer> newEntry = new ArrayList<Integer>();\n\t\t\tnewEntry.add(a);\n\t\t\tresults.put(q, newEntry);\n\t\t} else {\n\t\t\t// append to existing list\n\t\t\tresults.get(q).add(a);\n\t\t}\n\t}", "public void enqueueRear(int n);", "@Override\n public void add(String question, String answer){\n questions.add(question);\n answers.add(answer);\n\n }", "public void enqueue(student element) {\n Node3 node = new Node3(element);\n if (front == null) {\n rear = node;\n front = node;\n size++;\n } else {\n rear.setNext(node);\n rear = node;\n size++;\n }\n }", "public int askQuestion(Queue<Integer> qStack) {\n\t\ttry {\n\t\t\tif (!qStack.isEmpty()) {\n\t\t\t\taskQuestion = (Integer) qStack.remove();\n\t\t\t\tqStack.add(askQuestion);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(\"Code777\", \"ERROR inside askQuestion \"+qStack.size());\n\t\t}\n\t\treturn askQuestion;\n\t}", "void enqueue(T x);", "public void setQuestion(final List<Question> question) {\n\t\tthis.question = question;\n\t}", "private void enqueue(E x) {\n final Object[] items = this.items;\n items[putIndex] = x;\n if (++putIndex == items.length) putIndex = 0;\n count++;\n notEmpty.signal();\n }", "Queue<IMotion> addToQueue(Queue<IMotion> motionQueue);", "public void offer(E e) {\n if (e == null) throw new NullPointerException();\n queue[currentPos++] = e;\n size++;\n\n if (currentPos == queue.length) resize();\n }", "E dequeue();", "E dequeue();", "E dequeue();", "@Override\r\n\tpublic void quack() {\n\t\tSystem.out.println(\"I do Quack Quack\");\r\n\t}", "public static void main(String[] args) {\n Queue<QueueData> q1 = new LinkedList<>();\n List<String> testArList = new ArrayList<>();\n testArList.add(0, \"1\");\n for (int i = 0; i < 10; i++){\n // ArrayList의 add와 같은 기능을 가졌다.\n // 하지만, 자료구조의 특성상, 특정 인덱스에 add하는 메소드는 없다.\n q1.add(new QueueData(i, (int) (Math.random() * 1000)));\n }\n System.out.println(q1);\n // peek() : 0번째 인덱스 즉 head에 해당하는 데이터를 살펴본다. 해당 데이터가 없을 경우\n // null이 출력된다. 검색된 데이터는 삭제되지 않고 그대로 남는다.\n System.out.println(q1.peek());\n System.out.println(\"peek\");\n System.out.println(q1);\n\n // element() : peek과 동일한 기능을 가졌지만, 차이점은 해당 데이터가 없을때,\n // 예외처리를 해준다.\n System.out.println(q1.element());\n System.out.println(\"element\");\n System.out.println(q1);\n\n // Enqueue : 추가\n q1.offer(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 예외발생\n System.out.println(\"offer\");\n System.out.println(q1);\n q1.add(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 false 리턴\n System.out.println(\"add\");\n System.out.println(q1);\n\n // Dequeue : 삭제\n q1.remove(); // 삭제 실패시, 예외 발생\n System.out.println(\"remove\");\n System.out.println(q1);\n System.out.println(\"poll\");\n q1.poll(); // 실패시 false 리턴\n System.out.println(q1);\n \n // 조건부 삭제\n System.out.println(\"remove if idx % 10 == 0\");\n q1.removeIf(queueData -> queueData.idx % 10 == 0);\n System.out.println(q1);\n\n // priority Queue(우선순위 큐)\n // 가장 가중치가 낮은 순서로 poll, peek()을 할 수 있는 자료구조다.\n // Min Heap로 데이터를 sort 시켜놓고 출력하는 자료구조.\n // 데이터의 크기를 뒤죽박죽 아무렇게 넣어도 의도에 따라 오름차순 혹은 내림차순으로\n // poll(), peek() 할 수 있다.\n Queue<QueueData> pQueue = new PriorityQueue<>();\n pQueue.add(new QueueData(0, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(9, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(2, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(5, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(4, (int) (Math.random() * 1000)));\n\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.remove()); // 더이상 삭제할 수 없을 때, 예외처리(프로그램 종료)\n System.out.println(pQueue.poll()); // 더이상 삭제할 수 없을 때, null 출력\n System.out.println(pQueue.size());\n }", "public void performQuck() {\n\t\tquackBehavior.quack();\n\t}", "private void sendQueueToWear() {\n new APITask(new APICallback() {\n @Override\n public void r(String result) {\n try {\n JSONArray normalOrderQueue = new JSONObject(result).getJSONArray(\"queue\");\n\n for (int i = 0; i < normalOrderQueue.length(); i++) {\n if (gettingHelp(normalOrderQueue.getJSONObject(i)))\n if (mAdapter.helpedByMe(normalOrderQueue.getJSONObject(i))) {\n JSONObject attendedUser = normalOrderQueue.getJSONObject(i);\n normalOrderQueue = new JSONArray();\n normalOrderQueue.put(attendedUser);\n break;\n } else {\n normalOrderQueue.remove(i);\n i--;\n }\n }\n\n String queue = normalOrderQueue.toString();\n\n PutDataMapRequest putDataMapReq = PutDataMapRequest.create(\"/stayawhile/queue\");\n putDataMapReq.getDataMap().putString(QUEUE_KEY, queue);\n PutDataRequest putDataReq = putDataMapReq.asPutDataRequest();\n putDataReq.setUrgent();\n PendingResult<DataApi.DataItemResult> pendingResult =\n Wearable.DataApi.putDataItem(mGoogleApiClient, putDataReq);\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }).execute(\"method\", \"queue/\" + Uri.encode(mQueueName));\n }", "public synchronized void enqueue(Object o) {\r\n insertAtBack(o);\r\n }", "@Override\n\tpublic void enqueue(E e) {\n\t\tif(size==data.length-1){\n\t\t\tresize();\n\t\t}\n\t\tif(rear==data.length-1){\n\t\t\tdata[rear]=e;\n\t\t\tsize++;\n\t\t\trear=(rear+1)%data.length;\n\t\t}else{\n\t\t\tsize++;\n\t\t\tdata[rear++]=e;\n\t\t}\n\t\t\n\t\t\n\t}", "public void enqueue(Item item) \n {\n stack1.push(item);\n }", "public void enqueue(T newEntry){\n Node newNode = new Node(newEntry, null);\n\n if (isEmpty()){\n firstNode = newNode;\n }\n else {\n lastNode.setNext(newNode);\n }\n lastNode = newNode;\n }", "@Override\n\tpublic void myQuack() {\n\n\t}", "public E dequeue();", "public void enqueue(T item) {\r\n\r\n\t\t++item_count;\r\n\t\tif(item_count==arr.length)\r\n\t\t\tdoubleArray();\r\n\t\tarr[++back%arr.length]=item;\r\n\t}", "public void setQuestion(String newQuestion) {\n question = newQuestion;\n }", "void put(T ch) throws QueueFullException;", "void enqueue(Node n) {\n if (queueSet.contains(n)) {\n return;\n }\n queueSet.add(n);\n queue.addFirst(n);\n }" ]
[ "0.7623547", "0.6449386", "0.6436784", "0.6254869", "0.6247867", "0.60990024", "0.6095757", "0.6084604", "0.6040421", "0.6030499", "0.59746015", "0.59544045", "0.5860582", "0.5841185", "0.58039916", "0.5785109", "0.57830983", "0.5774506", "0.577002", "0.575959", "0.5750149", "0.5743734", "0.5731063", "0.57187015", "0.57170564", "0.57167506", "0.57147545", "0.57126737", "0.5706963", "0.570303", "0.57012993", "0.56992877", "0.5697534", "0.5692572", "0.56902695", "0.5686378", "0.5684875", "0.56796896", "0.5666732", "0.5666729", "0.5664299", "0.56447524", "0.5634458", "0.56312734", "0.56157905", "0.56059057", "0.55984044", "0.55979407", "0.559076", "0.55825245", "0.55804205", "0.5573651", "0.5573007", "0.5567365", "0.5564788", "0.55610055", "0.5553589", "0.55503213", "0.5542862", "0.55409425", "0.5534127", "0.5524862", "0.55206156", "0.55136114", "0.5511853", "0.5511716", "0.5511464", "0.5508762", "0.55054146", "0.549665", "0.5481922", "0.54806393", "0.54772174", "0.54696304", "0.54663116", "0.5465751", "0.5465341", "0.5459424", "0.5456493", "0.5456349", "0.54535025", "0.54506356", "0.54386806", "0.54258", "0.54258", "0.54258", "0.5423606", "0.5420076", "0.5420022", "0.54186505", "0.5415953", "0.5411507", "0.53986794", "0.5396658", "0.53962594", "0.5384319", "0.53825504", "0.5381003", "0.53762984", "0.5375798" ]
0.69150937
1
Puts a question in the rear of the queue.
public void addQ (Question Q) { newQuestion = Q; enqueue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void enqueue ()\n {\n count++;\n questionList.add(newQuestion);\n //System.out.println(\"Question #\"+ totNumQ + \" is added to the queue.\");\n }", "@Override\n\tpublic void execute() {\n\t\tthis.receiver.add(this.question, 42);\n\t}", "public void addQuestion(Question question);", "public void queue(Object newItem){\n if(isFull()){\n System.out.println(\"queue is full\");\n return;\n }\n ArrayQueue[++rear] = newItem;\n if(front == -1)\n front = 0;\n \n }", "@Override\n public void edit(Question q) {\n delete(q);\n add(q);\n }", "void addQuest(Question quest){\r\n\t\t//if the test bank does not contain this topic, create a new one and add question\r\n\t\tif(!bank.containsKey(quest.getTopic())){\r\n\t\t\tquest.setID(0);\r\n\t\t\tbank.put(quest.getTopic(), new ArrayList<Question>());\r\n\t\t\tbank.get(quest.getTopic()).add(quest);\r\n\t\t}else{\r\n\t\t\tquest.setID(bank.get(quest.getTopic()).size());\r\n\t\t\tbank.get(quest.getTopic()).add(quest);\r\n\t\t}\r\n\t}", "public void addQuestion(Question question) {\n\t\tquestions.add(question);\n\t}", "void addQuestionAnswer(Answer answer);", "void enqueue(E newEntry);", "static void insert(Queue<Integer> q, int k){\n \n q.add(k);\n \n }", "@Override\n public void enqueue(T value) {\n myQ[myLength] = value;\n myLength++;\n }", "void enqueue(E item);", "public void enqueue (E element);", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "public void enqueue(E e) {\n\t\t\tsynchronized (this.pq) {\n\t\t\t\tthis.pq.add(e);\n//\t\t\t\tSystem.out.println(\"insert \" + e);\n\t\t\t}\n\t\t\tthis.sem.release();\n\t}", "public void dequeue()\n {\n System.out.println(\"Question #\"+ questionList.get(0).getQNum()\n + \" is removed from the queue.\");\n questionList.remove(0);\n count--;\n }", "void add(String question, long time, boolean correct);", "public void enqueue(T element);", "public void addQuestion(Question question) {\n \t\tquestion.setId(questionIdCounter);\n \t\tquestions.add(question);\n \t\tquestionIdCounter++;\n \t}", "public void add(IQuestion question) throws IllegalArgumentException {\n\t\tgetQuestions().add(question);\n\t}", "@Override\n\tpublic void addToQueue() {\n\t}", "private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }", "@Override\n\tpublic void QuestionDone() {\n\t\t\n\t}", "public DnsMessage addQuestion(DnsQuestion question) {\n if (questions == null) {\n questions = new LinkedList<DnsQuestion>();\n }\n questions.add(question);\n return this;\n }", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "void enqueue(int idNumber, int arrival_time) \r\n\t { \r\n\t \r\n\t // Create a new LL node \r\n\t QNode temp = new QNode(idNumber, arrival_time); \r\n\t \r\n\t // If queue is empty, then new node is front and rear both \r\n\t if (this.rear == null) \r\n\t { \r\n\t this.front = this.rear = temp; \r\n\t size++;\r\n\t maxSize++;\r\n\t return; \r\n\t } \r\n\t \r\n\t // Add the new node at the end of queue and change rear \r\n\t else {\r\n\t \tthis.rear.next = temp;\r\n\t \tthis.rear = temp; \r\n\t \tsize++;\r\n\t \tmaxSize++;\r\n\t }\r\n\t \r\n\t }", "@Override\r\n\tpublic void enqueueRear(E element) {\n\t\tif(sizeDeque == CAPACITY) return;\r\n\t\tif(sizeDeque == 0) {\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tbackDeque = (backDeque + 1)%CAPACITY;\r\n\t\t\tdata[backDeque] = element;\r\n\t\t}\r\n\t\t\r\n\t\tsizeDeque++;\r\n\t}", "public void add( IAnswer possibleAnswer );", "public void enqueue(E item) {\n addLast(item);\n }", "private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }", "public void enqueue(Comparable item);", "public void enqueue(T pushed)\n\t{insert(pushed);}", "private static void tester(APQueue<String> q) {\n q.push(\"c++\");\n q.push(\"python\");\n q.push(\"java\");\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.peek());\n System.out.println(\"Should be 3: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be c++: \" + q.pop());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.peek());\n System.out.println(\"Should be 2: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be python: \" + q.pop());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.peek());\n System.out.println(\"Should be 1: \" + q.size());\n \n System.out.println();\n \n System.out.println(\"Should be java: \" + q.pop());\n System.out.println(\"Should be 0: \" + q.size());\n \n System.out.println();\n }", "void addAnswer(Answer answer);", "@Override\n\tpublic void q() {\n\n\t}", "private void enterToRunwayQueue() {\n\t\tqueue.insert(this);\n\t}", "public void enqueue(String animalType){\n Animal an = new Animal(animalType);\n this.rear.next=an;\n this.rear=an;\n counter++;\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public void setQuestion(String question) {\n this.question = question;\n }", "void enqueue(E e);", "@Override\n public void enqueue(Object element) {\n LinkedNode<T> node = new LinkedNode<T>((T) element);\n if (isEmpty()) {\n front = node;\n } else {\n rear.setNext(node);\n }\n rear = node;\n count++;\n\n }", "void put(String question, String answer) {\n map.put(question, answer);\n }", "public void enqueue(E e) {\n\t\tlist.addLast(e);\n\t}", "@Override\n\tpublic void enqueue(E e) {\n\t\tint index = (pos + size) % queue.length;\n\t\tqueue[index] = e;\n\t\tsize++;\n\t}", "public void setQuestion(String question) {\n\t\tthis.question = question;\n\t}", "private void re_queue() {\n\n Queue<String> queue = new LinkedList<>();\n queue.offer(\"我\");\n queue.offer(\"爱\");\n queue.offer(\"刷\");\n queue.offer(\"题\");\n queue.offer(\"呵呵\");\n\n System.out.println(\"*********queue*********\");\n System.out.println(queue);\n System.out.println(\"*********queue*********\");\n System.out.println(\"查看队首元素,不改变队列结构:\" + queue.peek());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n System.out.println(\"取出队首元素,改变队列结构:\" + queue.poll());\n System.out.println(queue.size());\n System.out.println(\"*********queue*********\");\n while (queue.size() > 0) {\n System.out.println(queue.poll());\n System.out.println(queue);\n }\n }", "private void insertToSentList(Question question) {\r\n\t\tdListOfQuestions.append(new QuestionWithAns(question));\r\n\t\tbTreeOfQuestions.addNode(question.getQnNum(), question);\r\n\t}", "void enqueue(T t);", "public void setQuestions(Vector<Question> q){\n\t\t\tquestions = q;\n\t\t}", "public void enqueue(Person person) {\r\n saf.add(person);\r\n }", "private void addQuestion(Questions question) {\n ContentValues cv = new ContentValues();\n cv.put(QuestionsTable.Column_Question, question.getQuestion());\n cv.put(QuestionsTable.Column_Option1, question.getOption1());\n cv.put(QuestionsTable.Column_Option2, question.getOption2());\n cv.put(QuestionsTable.Column_Option3, question.getOption3());\n cv.put(QuestionsTable.Column_Option4, question.getOption4());\n cv.put(QuestionsTable.Column_Answer_Nr, question.getAnswerNr());\n db.insert(QuestionsTable.Table_name, null, cv);\n }", "@Override\r\n\tpublic void quack() {\n\t\t\r\n\t}", "void put(char ch){\n\t\tif(putloc == q.length){\n\t\t\tSystem.out.println(\"- Queue is full.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tq[putloc]=ch;\n\t\tputloc++;\n\t}", "public void addQuestion(Question quest) {\n ContentValues values = new ContentValues();\n values.put(KEY_QUES, quest.getQUESTION());\n values.put(KEY_ANSWER, quest.getANSWER());\n values.put(KEY_OPTA, quest.getOPTA());\n values.put(KEY_OPTB, quest.getOPTB());\n values.put(KEY_OPTC, quest.getOPTC());\n // Inserting Row\n db.insert(TABLE_NAME_QUEST, null, values);\n }", "void enqueue(E el);", "public void enqueue(T item) {\n\t\tif(rear == capacity)\n\t\t\treSize();\n\t\tarr[rear] = item;\n\t\tSystem.out.println(\"Added: \" + item);\n\t\trear++;\n\t\tsize++;\n\t}", "@Override\n\tpublic boolean addQuestion(QuestionObject question) {\n\t\tif (question != null && !questionComposite.checkExist(question)) {\n\t\t\tquestionComposite.add(question);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "public static void enQueue(Queue q, String entry){ \n if (q.queuesize < q.names.length){ //If the queue isn't full - Size of queue is less than the set array size \n q.names[q.queuesize] = entry; //Set the value at the index of queue size to the input (Using the array in the Queue class to store this)\n q.queuesize +=1; //Increment the size of queue \n }\n }", "public void enqueue(E element) {\n\t\tadd(element);\n\t}", "@Override\n public void enqueue(E e) {\n array.addLast(e);\n }", "void enqueue(T data) \n { \n \n // Create a new LL node \n LinkedListQueue temp = new LinkedListQueue(data); \n \n // If queue is empty, then new node is front and rear both \n if (this.rear == null) { \n this.front = this.rear = temp; \n return; \n } \n \n // Add the new node at the end of queue and change rear \n this.rear.next = temp; \n this.rear = temp; \n }", "static void enQueue(Queue q, int x) {\r\n push(q.stack1, x);\r\n }", "public void enqueue( MyTreeNode<T> treeNode ) {\n\t\tQueueNode newNode = new QueueNode(treeNode);\n\t\t// the queue is empty\n\t\tif ( tail == null ) {\n\t\t\t// the tail and the head point to the same only element in the collection\n\t\t\tthis.tail = newNode;\n\t\t\tthis.head = newNode;\n\t\t// the queue is not empty\n\t\t} else {\n\t\t\t// the second from the end item of the collection keeps track with the tail\n\t\t\tthis.tail.next = newNode;\n\t\t\t// the new element becomes the tail of the collection\n\t\t\tthis.tail = newNode;\n\t\t}\n\t}", "@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }", "public interface Queue<E> {\r\n\r\n /**\r\n * Adds the given item to the end of the queue.\r\n * \r\n * @pre The queue is not full and the item to be added is not null\r\n * @post The item is added at the end of the queue\r\n * @param item\r\n * The item to be added to the queue\r\n */\r\n void enqueue(E item);\r\n\r\n /**\r\n * Removes and returns the item from the beginning of the queue.\r\n * \r\n * @pre The queue is not full\r\n * @post The item is removed queue\r\n * @return the item removed from the queue or null if the queue is empty\r\n */\r\n E dequeue();\r\n\r\n}", "public void addQuestions() {\n\t\tboolean addNewQuestion = true;\n\t\tString text;\n\t\tQuestion q;\n\t\tString promptResponse;\n\t\t\n\t\twhile (addNewQuestion) {\n\t\t\tSystem.out.print(\"Enter question: \");\n\t\t\ttext = System.console().readLine();\n\t\t\tq = new QuestionImpl(questionId, text);\n\t\t\tthis.questionId++;\n\t\t\tq.addAnswers();\n\t\t\tthis.questions.add(q);\n\n\t\t\tSystem.out.print(\"Hit Return to add another question or q to quit: \");\n\t\t\tpromptResponse = System.console().readLine();\n\t\t\tif (promptResponse.equals(\"q\") ||\n\t\t\t\t\tpromptResponse.equals(\"Q\") ||\n\t\t\t\t\tpromptResponse.equals(\"quit\") ||\n\t\t\t\t\tpromptResponse.equals(\"Quit\")) {\n\t\t\t\taddNewQuestion = false;\n\t\t\t}\n\t\t}\n\t}", "void enqueue(Object elem);", "public void addQuestion(Question a) {\n quesCollec.add(a);\n }", "public void question() {\n\t\tlead.answer(this);\n\t}", "public abstract void Enqueue (Type item);", "@Override\r\n public void addAnswer(String answer) {\r\n this.answers.add(answer);\r\n }", "public synchronized void enqueue(T thing) {\r\n\t\twhile (queue.size()==maxSize){\r\n\t\t\ttry{\r\n\t\t\t\tthis.wait();\r\n\t\t\t} catch(InterruptedException e){\r\n\t\t\t\tSystem.out.println(\"Interruption during enqueue\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tqueue.addLast(thing);\r\n\t\tthis.notifyAll();\r\n\t}", "public void setQ(int q) {\n this.q = q;\n }", "void newAnswer (Integer q, Integer a) {\n\t\tif (results.get(q)==null) {\n\t\t\tArrayList<Integer> newEntry = new ArrayList<Integer>();\n\t\t\tnewEntry.add(a);\n\t\t\tresults.put(q, newEntry);\n\t\t} else {\n\t\t\t// append to existing list\n\t\t\tresults.get(q).add(a);\n\t\t}\n\t}", "public void enqueueRear(int n);", "@Override\n public void add(String question, String answer){\n questions.add(question);\n answers.add(answer);\n\n }", "public void enqueue(student element) {\n Node3 node = new Node3(element);\n if (front == null) {\n rear = node;\n front = node;\n size++;\n } else {\n rear.setNext(node);\n rear = node;\n size++;\n }\n }", "public int askQuestion(Queue<Integer> qStack) {\n\t\ttry {\n\t\t\tif (!qStack.isEmpty()) {\n\t\t\t\taskQuestion = (Integer) qStack.remove();\n\t\t\t\tqStack.add(askQuestion);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(\"Code777\", \"ERROR inside askQuestion \"+qStack.size());\n\t\t}\n\t\treturn askQuestion;\n\t}", "void enqueue(T x);", "public void setQuestion(final List<Question> question) {\n\t\tthis.question = question;\n\t}", "private void enqueue(E x) {\n final Object[] items = this.items;\n items[putIndex] = x;\n if (++putIndex == items.length) putIndex = 0;\n count++;\n notEmpty.signal();\n }", "Queue<IMotion> addToQueue(Queue<IMotion> motionQueue);", "public void offer(E e) {\n if (e == null) throw new NullPointerException();\n queue[currentPos++] = e;\n size++;\n\n if (currentPos == queue.length) resize();\n }", "E dequeue();", "E dequeue();", "E dequeue();", "@Override\r\n\tpublic void quack() {\n\t\tSystem.out.println(\"I do Quack Quack\");\r\n\t}", "public static void main(String[] args) {\n Queue<QueueData> q1 = new LinkedList<>();\n List<String> testArList = new ArrayList<>();\n testArList.add(0, \"1\");\n for (int i = 0; i < 10; i++){\n // ArrayList의 add와 같은 기능을 가졌다.\n // 하지만, 자료구조의 특성상, 특정 인덱스에 add하는 메소드는 없다.\n q1.add(new QueueData(i, (int) (Math.random() * 1000)));\n }\n System.out.println(q1);\n // peek() : 0번째 인덱스 즉 head에 해당하는 데이터를 살펴본다. 해당 데이터가 없을 경우\n // null이 출력된다. 검색된 데이터는 삭제되지 않고 그대로 남는다.\n System.out.println(q1.peek());\n System.out.println(\"peek\");\n System.out.println(q1);\n\n // element() : peek과 동일한 기능을 가졌지만, 차이점은 해당 데이터가 없을때,\n // 예외처리를 해준다.\n System.out.println(q1.element());\n System.out.println(\"element\");\n System.out.println(q1);\n\n // Enqueue : 추가\n q1.offer(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 예외발생\n System.out.println(\"offer\");\n System.out.println(q1);\n q1.add(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 false 리턴\n System.out.println(\"add\");\n System.out.println(q1);\n\n // Dequeue : 삭제\n q1.remove(); // 삭제 실패시, 예외 발생\n System.out.println(\"remove\");\n System.out.println(q1);\n System.out.println(\"poll\");\n q1.poll(); // 실패시 false 리턴\n System.out.println(q1);\n \n // 조건부 삭제\n System.out.println(\"remove if idx % 10 == 0\");\n q1.removeIf(queueData -> queueData.idx % 10 == 0);\n System.out.println(q1);\n\n // priority Queue(우선순위 큐)\n // 가장 가중치가 낮은 순서로 poll, peek()을 할 수 있는 자료구조다.\n // Min Heap로 데이터를 sort 시켜놓고 출력하는 자료구조.\n // 데이터의 크기를 뒤죽박죽 아무렇게 넣어도 의도에 따라 오름차순 혹은 내림차순으로\n // poll(), peek() 할 수 있다.\n Queue<QueueData> pQueue = new PriorityQueue<>();\n pQueue.add(new QueueData(0, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(9, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(2, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(5, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(4, (int) (Math.random() * 1000)));\n\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.remove()); // 더이상 삭제할 수 없을 때, 예외처리(프로그램 종료)\n System.out.println(pQueue.poll()); // 더이상 삭제할 수 없을 때, null 출력\n System.out.println(pQueue.size());\n }", "public void performQuck() {\n\t\tquackBehavior.quack();\n\t}", "private void sendQueueToWear() {\n new APITask(new APICallback() {\n @Override\n public void r(String result) {\n try {\n JSONArray normalOrderQueue = new JSONObject(result).getJSONArray(\"queue\");\n\n for (int i = 0; i < normalOrderQueue.length(); i++) {\n if (gettingHelp(normalOrderQueue.getJSONObject(i)))\n if (mAdapter.helpedByMe(normalOrderQueue.getJSONObject(i))) {\n JSONObject attendedUser = normalOrderQueue.getJSONObject(i);\n normalOrderQueue = new JSONArray();\n normalOrderQueue.put(attendedUser);\n break;\n } else {\n normalOrderQueue.remove(i);\n i--;\n }\n }\n\n String queue = normalOrderQueue.toString();\n\n PutDataMapRequest putDataMapReq = PutDataMapRequest.create(\"/stayawhile/queue\");\n putDataMapReq.getDataMap().putString(QUEUE_KEY, queue);\n PutDataRequest putDataReq = putDataMapReq.asPutDataRequest();\n putDataReq.setUrgent();\n PendingResult<DataApi.DataItemResult> pendingResult =\n Wearable.DataApi.putDataItem(mGoogleApiClient, putDataReq);\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }).execute(\"method\", \"queue/\" + Uri.encode(mQueueName));\n }", "public synchronized void enqueue(Object o) {\r\n insertAtBack(o);\r\n }", "@Override\n\tpublic void enqueue(E e) {\n\t\tif(size==data.length-1){\n\t\t\tresize();\n\t\t}\n\t\tif(rear==data.length-1){\n\t\t\tdata[rear]=e;\n\t\t\tsize++;\n\t\t\trear=(rear+1)%data.length;\n\t\t}else{\n\t\t\tsize++;\n\t\t\tdata[rear++]=e;\n\t\t}\n\t\t\n\t\t\n\t}", "public void enqueue(Item item) \n {\n stack1.push(item);\n }", "public void enqueue(T newEntry){\n Node newNode = new Node(newEntry, null);\n\n if (isEmpty()){\n firstNode = newNode;\n }\n else {\n lastNode.setNext(newNode);\n }\n lastNode = newNode;\n }", "@Override\n\tpublic void myQuack() {\n\n\t}", "public E dequeue();", "public void enqueue(T item) {\r\n\r\n\t\t++item_count;\r\n\t\tif(item_count==arr.length)\r\n\t\t\tdoubleArray();\r\n\t\tarr[++back%arr.length]=item;\r\n\t}", "public void setQuestion(String newQuestion) {\n question = newQuestion;\n }", "void put(T ch) throws QueueFullException;", "void enqueue(Node n) {\n if (queueSet.contains(n)) {\n return;\n }\n queueSet.add(n);\n queue.addFirst(n);\n }" ]
[ "0.69150937", "0.6449386", "0.6436784", "0.6254869", "0.6247867", "0.60990024", "0.6095757", "0.6084604", "0.6040421", "0.6030499", "0.59746015", "0.59544045", "0.5860582", "0.5841185", "0.58039916", "0.5785109", "0.57830983", "0.5774506", "0.577002", "0.575959", "0.5750149", "0.5743734", "0.5731063", "0.57187015", "0.57170564", "0.57167506", "0.57147545", "0.57126737", "0.5706963", "0.570303", "0.57012993", "0.56992877", "0.5697534", "0.5692572", "0.56902695", "0.5686378", "0.5684875", "0.56796896", "0.5666732", "0.5666729", "0.5664299", "0.56447524", "0.5634458", "0.56312734", "0.56157905", "0.56059057", "0.55984044", "0.55979407", "0.559076", "0.55825245", "0.55804205", "0.5573651", "0.5573007", "0.5567365", "0.5564788", "0.55610055", "0.5553589", "0.55503213", "0.5542862", "0.55409425", "0.5534127", "0.5524862", "0.55206156", "0.55136114", "0.5511853", "0.5511716", "0.5511464", "0.5508762", "0.55054146", "0.549665", "0.5481922", "0.54806393", "0.54772174", "0.54696304", "0.54663116", "0.5465751", "0.5465341", "0.5459424", "0.5456493", "0.5456349", "0.54535025", "0.54506356", "0.54386806", "0.54258", "0.54258", "0.54258", "0.5423606", "0.5420076", "0.5420022", "0.54186505", "0.5415953", "0.5411507", "0.53986794", "0.5396658", "0.53962594", "0.5384319", "0.53825504", "0.5381003", "0.53762984", "0.5375798" ]
0.7623547
0
Removes a question from the front of the queue.
public void dequeue() { System.out.println("Question #"+ questionList.get(0).getQNum() + " is removed from the queue."); questionList.remove(0); count--; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "private void questionRemove(Player player, QueuedQuestion qq) {\r\n\t\tlong qqid = qq.getId();\r\n\t\t// dont allow master's first quesiton to be removed\r\n//\t\tif (player.getIsMaster() && \r\n//\t\t\t\tplayer.getGame().getRoundNumber() == 1 &&\r\n//\t\t\t\tplayer.getQueuedQuestions().size() == 1) {\r\n//\t\t\tlogger.error(\"Master tried to delete first question playerid=\"+player.getId());\r\n//\t\t\treturn;\r\n//\t\t}\r\n\t\t\t\r\n\t\tlogger.debug(\"Delete question id = \" + qqid);\r\n\t\tint i;\r\n\t\tfor (i = 0; i < player.getQueuedQuestions().size(); ++i)\r\n\t\t{\r\n\t\t\tif (qqid == player.getQueuedQuestions().get(i).getId()) {\r\n\t\t\t\tlogger.debug(\"Question found to remove = \" + qqid);\r\n\t\t\t\tplayer.getQueuedQuestions().remove(i);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void pop() {\n queue.remove();\n }", "public void pop() {\n \n if(!q1.isEmpty())q1.remove();\n \n }", "public void pop() {\n queue.remove(0);\n }", "public static String deQueue(Queue q){ \n String front = q.names[0]; //Store the front element to be returned and printed if wanted \n if (q.queuesize != 0){ //IF the queue is not empty \n for (int i = 0; i < q.queuesize; i++){ //For the all of the non zero elements in the queue\n q.names[i] = q.names[i+1]; // Overwrite the first element to get rid of it and shove all of the others up 1\n }\n q.queuesize -=1; //Decrease the size by 1 as someone left \n }\n else{\n System.out.print(\"Empty Queue\"); //State the queue is empty and nothing can be removed\n }\n return front; //Return the element that was once in front - This can be printed \n }", "private void removeQuestion(){\n\t\tif(questionText != null){\n\t\t\tquestionBox.remove(questionText);\n\t\t\tquestionBox.reDraw();\n\t\t}\n\t}", "public void pop() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n q.poll();\n }", "void deleteFromFront()\n {\n // check whether Deque is empty or not \n if (isEmpty())\n {\n return;\n }\n // Only one element left\n if (front == end)\n {\n front = end = -1;\n }\n else {\n // back to initial\n front = (front == size -1) ? 0 : front+1;\n }\n }", "public void dequeue() {\r\n saf.remove(0);\r\n }", "public void dequeue() {\n\t\tObject ret_val = todequeue();\n\t\tif(ret_val == null)\n\t\t\tSystem.out.println(\"The queue is empty\");\n\t\telse\n\t\t\tSystem.out.println(\"Removed: \" + ret_val);\n\t}", "public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}", "public E dequeue(){\n if (isEmpty()) return null;\n E answer = arrayQueue[front];\n arrayQueue[front] = null;\n front = (front +1) % arrayQueue.length;\n size--;\n return answer;\n }", "@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}", "public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }", "static void pop() {\n\t\t\tif (q1.isEmpty()) \n\t\t\t\treturn; \n\t\t\tq1.remove(); \n\t\t\tcurr_size--; \n\t\t}", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "public void pop() {\n \n q1.poll();\n }", "public int dequeue() {\n\t\tif (isEmpty()) throw new IllegalStateException(\"\\nQueue is empty!\\n\");\n\t\tint removedItem = bq[head];\n\t\tif (head == bq.length - 1) head = 0; // wraparound\n\t\telse head++;\n\t\tsize--;\n\t\treturn removedItem;\t\n\t}", "public int dequeueFront();", "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "public Country removeFront() {\n\t\tCountry temp = null;\n\t\ttry {\n\t\t\tif (isEmpty()) {\n\t\t\t\tSystem.out.println(\"The queue is empty.\");\n\t\t\t} else if (front != end) {\n\t\t\t\tfront.previous = null;\n\t\t\t\ttemp = front.data;\n\t\t\t\tfront = front.next;\n\t\t\t} else {\n\t\t\t\tfront = end = null;\n\t\t\t\ttemp = front.data;\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\t;\n\t\t}\n\t\treturn temp;\n\t}", "void dequeue() \n { \n // If queue is empty, return NULL. \n if (this.front == null) \n return; \n \n // Store previous front and move front one node ahead \n LinkedListQueue temp = this.front; \n this.front = this.front.next; \n \n // If front becomes NULL, then change rear also as NULL \n if (this.front == null) \n this.rear = null; \n }", "public T remove() throws EmptyQueueException;", "public void remove(){\n\t\tqueueArray[1][0] = null;\n\t\tqueueArray[1][1] = null;\n\t}", "public void deleteFirst() {\r\n\t\tif(isEmpty()) return;\r\n\t\t// if there is only element in the Deque, then deleting it will make front and rear point to invalid positions again\r\n\t\telse if( rear==front) front = rear = -1;\r\n\t\t// else increment the front pointer\r\n\t\telse front = (front+1)%maxSize;\r\n\t}", "private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "@Override\r\n public CustomProcess removeBest() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty, cannot remove from empty queue\");\r\n }\r\n CustomProcess best = data[0]; // process to be removed\r\n data[0] = data[size - 1];\r\n data[size - 1] = null;\r\n minHeapPercolateDown(0); // Percolate down on first index\r\n size--;\r\n return best;\r\n }", "public void remove( IAnswer answerToRemove );", "public Queue<T> deQueue();", "public Object dequeue(){\r\n return super.remove(size()-1);\r\n }", "void removePickDetail(Question question);", "Node dequeue() {\n Node n = queue.removeFirst();\n queueSet.remove(n);\n return n;\n }", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public void removeAtFront(){\r\n\t head = head.getLink();\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n\t manyNodes--;\r\n }", "@Override\n public void removeFromFront(){\n if(getSize() < 1) {\n throw new IndexOutOfBoundException(\"Cannot remove Node from Empty List\");\n }\n Node<T> temp = this.head.getNext();\n\n this.head.setNext(temp.getNext());\n temp.setData(null);\n temp.setNext(null);\n }", "public void deleteFront(){\n\t\tif(head == null){\n\t\t\tSystem.out.println(\"List is empty... Cannot remove from front.\");\n\t\t\treturn;\n\t\t}\n\t\tNode tmp = head;\n\t\thead = tmp.getNext();\n\t\tif(head == null){\n\t\t\ttail = null;\n\t\t}\n\t}", "public void pop() {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\twhile (!queue.isEmpty())\n\t\t\tlist.add(queue.poll());\n\t\tfor (int i = 0; i < list.size() - 1; i++)\n\t\t\tqueue.add(list.get(i));\n\t}", "public void pop() {\n move();\n reverseQueue.poll();\n }", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "@Override\n public PaintOrder remove() {\n if (!queue.isEmpty()) {\n var temp = queue.remove();\n processedOrders ++;\n currentOrders --;\n queuedOrders --;\n return temp; \n }\n return null;\n }", "public static Object dequeue() {\t \n if(queue.isEmpty()) {\n System.out.println(\"The queue is already empty. No element can be removed from the queue.\"); \n return -1;\n }\n return queue.removeFirst();\n }", "public T dequeue();", "public Object remove(int index){\r\n return dequeue(); //calls the dequeue method\r\n }", "public void removeAnswer(){\n\t\thideNextButton();\n\t\tif(answerText != null)\n\t\t\tquestionBox.remove(answerText);\n\t\tif(answerIcon != null)\n\t\t\tquestionBox.remove(answerIcon);\n\t\tif(answerNote != null)\n\t\t\tquestionBox.remove(answerNote);\n\t\t\n\t\tanswerText = null;\n\t\tanswerIcon = null;\n\t\tanswerNote = null;\n\t\t\n\t\tquestionBox.reDraw();\n\t}", "T dequeue() {\n return contents.removeFromTail();\n }", "T dequeue();", "T dequeue();", "void dequeue() {\r\n\t\tfirst.nextSet(first.next.next);\r\n\t\tfirst.next.prevSet(first);\r\n\t\tlength--;\r\n\t}", "public void dequeue() {\r\n\t\tif(head.prev == null && head.next == null) { //If the only node in the list is the head, set everything equal to null and return\r\n\t\t\thead = null;\r\n\t\t\tprintQueue();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\thead = head.next; //The new head is the node after the previous head\r\n\t\thead.prev = tail; //The previous node to the head is set to tail\r\n\t\tsize--;\r\n\t\tprintQueue();\r\n\t}", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public void removeFromQueue(Player player) {\n }", "@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}", "public IClause uncheckedPopFront() {\n assert back!=front : \"Deque is empty\";\n\n front++;\n if (front >= tab.length)\n front = 0;\n return tab[front];\n }", "public E dequeue() {\n if (isEmpty()) return null; //nothing to remove.\n E item = first.item;\n first = first.next; //will become null if the queue had only one item.\n n--;\n if (isEmpty()) last = null; // special case as the queue is now empty. \n return item;\n }", "public E dequeue() {\n\t\treturn list.removeFirst();\n\t}", "Object dequeue();", "Object dequeue();", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "static int deQueue(Queue q) {\r\n int x;\r\n\r\n /* If both stacks are empty then error */\r\n if (q.stack1.isEmpty() && q.stack2.isEmpty()) {\r\n System.out.println(\"Q is empty\");\r\n System.exit(0);\r\n }\r\n\r\n /*\r\n * Move elements from stack1 to stack 2 only if\r\n * stack2 is empty\r\n */\r\n if (q.stack2.isEmpty()) {\r\n while (!q.stack1.isEmpty()) {\r\n x = pop(q.stack1);\r\n push(q.stack2, x);\r\n }\r\n }\r\n x = pop(q.stack2);\r\n return x;\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic T dequeue() {\r\n\t\tT data;\r\n\t\t\r\n\t\t// checking if queue is empty or not\r\n\t\tif (isEmtpy()) {\r\n\t\t\tthrow new AssertionError(\"Queue is empty\");\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t// remove element\r\n\t\t\tdata = (T)(Integer)this.array[this.front];\r\n\t\t\t\r\n\t\t\t// adjust both front and rear of queue\r\n\t\t\tif (this.front == this.rear) {\r\n\t\t\t\tthis.front = this.rear = -1;\r\n\t\t\t} else {\r\n\t\t\t\tthis.front = (this.front + 1) % this.size;\r\n\t\t\t}\r\n\t\t\treturn (T)data;\r\n\t\t}\r\n\t}", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "void removeFromQueue(ActionEvent event){\n model.getQueueList().remove(podcast);\n podcast.setQueued(false);\n podcast.togglePlaying();\n cm.hide();\n }", "@Override\n public T dequeue() {\n T frontChar = myQ[0];\n\n for(int i = 1; i < myLength; i++) {\n myQ[i - 1] = myQ[i];\n }\n myLength--;\n return frontChar;\n }", "public T dequeue()\n\t{\n\t\tNode<T> eliminado = head;\n\t\thead = head.getNext();\n\t\tif(head == null)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tsize--;\n\t\treturn eliminado.getElement();\n\t}", "@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}", "public void popFront()\n {\n\thead = head.next;\n\tif (null == head) {\t// the list is now empty\n\t tail = null;\n\t}\n\telse {\n\t head.prev = null;\n\t}\n }", "public Object deQueue()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n Node temp = this.front;\n front = front.getNext();\n if(this.isEmpty()){this.rear = null;}\n return temp.getData();\n }", "@Override\r\n\tpublic void Dequeue() {\n\t\tif (IsEmpty())\r\n\t throw new NoSuchElementException(\"Underflow Exception\");\r\n\t else \r\n\t {\r\n\t \tlen--;\r\n\t int data = queue[front];\r\n\t System.out.println(\"The Dequed Element is \"+data);\r\n\t if ( front == rear) \r\n\t {\r\n\t front = -1;\r\n\t rear = -1;\r\n\t }\r\n\t else\r\n\t front++;\r\n\t }\r\n\t\t\r\n\t}", "public int remove() {\n return priorityQueue[--counter];\n }", "public T dequeue(){\n T front = getFront(); // might throw exception, assumes firstNode != null\n firstNode = firstNode.getNext();\n\n if (firstNode == null){\n lastNode = null;\n } // end if\n return front;\n }", "public void removeCheque(Cheque cheque) {\n\t\t\r\n\t}", "public E dequeue();", "public void remove() {\n btRemove().push();\n }", "public void remove() {\n btRemove().push();\n }", "void deleteFront()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call deleteFront() on empty List\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tcursor = null;\n\t\t\tindex = -1; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t}\n \n\t\tfront = front.next; //front element becomes the next element in the list\n\t\tlength--;\n index --; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t\n\t}", "E dequeue();", "E dequeue();", "E dequeue();", "public T dequeue() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to remove.\");\n } else if (front == backingArray.length - 1) {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = 0;\n size--;\n return data;\n } else {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = temp + 1;\n size--;\n return data;\n }\n }", "public T remove() throws NoSuchElementException {\n\tT result = poll();\n\tif(result == null) {\n\t throw new NoSuchElementException(\"Priority queue is empty\");\n\t} else {\n\t return result;\n\t}\n }", "public void dequeue() {\n if (!isEmpty()) { //se estiver vazia retorna -1\n\n No temp = inicio;\n // move o topo para o prox nó\n inicio = inicio.next;\n if (inicio == null) {\n fim = null;\n }\n size--;\n }\n\n }", "@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }", "public Person dequeue() throws EmptyQueueException{\n if (!isEmpty()){ throw new EmptyQueueException(\"This queue is empty.\");}\n Person first = holdingQueue.get(0);\n holdingQueue.remove(0);\n numPeople--;\n return first;\n }", "public process dequeue() {\n\t\treturn queue.removeFirst();\n\t}", "public int pop() {\n int res= q1.remove();\n if (!q1.isEmpty())\n top = q1.peek();\n return res;\n }", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public T removeFront() {\n\t\tT found = start.value;\n\t\tstart = start.next;\n\t\treturn found;\n\t}", "public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }", "protected void removeByIndex(int index) {\n int h = head;\n int t = tail;\n size = size - 1;\n int present = dequeue.length - 1;\n int offset = (index - h) & present;\n int finish = (tail - index) & present;\n\n if (offset < finish) {\n if (h <= index) {\n System.arraycopy(dequeue, h, dequeue, h + 1, offset);\n } else {\n System.arraycopy(dequeue, 0, dequeue, 1, index);\n dequeue[0] = dequeue[present];\n System.arraycopy(dequeue, h, dequeue, h + 1, present - h);\n }\n dequeue[h] = null;\n head = (h + 1) & present;\n } else {\n if (index < t) {\n System.arraycopy(dequeue, index + 1, dequeue, index, finish);\n tail = t - 1;\n } else {\n System.arraycopy(dequeue, index + 1, dequeue, index, present - index);\n dequeue[present] = dequeue[0];\n System.arraycopy(dequeue, 1, dequeue, 0, t);\n tail = (t - 1) & present;\n }\n }\n }", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public E dequeue() {\n return pop();\n }", "public E removeFront() {\r\n if (elem[front] == null) {\r\n throw new NoSuchElementException();\r\n } else {\r\n E temp = elem[front];\r\n elem[front] = null;\r\n front++;\r\n return temp;\r\n }\r\n }", "public void pop() {\n one.poll();\n \n }", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "public void dequeueFromBack() {\r\n\t\tif (head == null) { //If there is no head (meaning the list is empty), don't do anything\r\n\t\t\tprintQueue();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tNode current = head; //Instantiated node to cycle through list\r\n\t\tfor(int i = 1; i < size; i++) { //Loop to get instantiated node to the end of the list\r\n\t\t\tcurrent = current.next;\r\n\t\t\tcurrent.prev.index--;\r\n\t\t}\r\n\t\t\r\n\t\tif(current.prev == tail && current.next == tail) { //If there is only one node left, set it equal to null\r\n\t\t\thead = null;\r\n\t\t\tprintQueue();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tcurrent.prev.next = head; //The previous node's next node is removed\r\n\t\ttail = current.prev;\r\n\t\tsize--;\r\n\t\tprintQueue();\r\n\t}", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }" ]
[ "0.71156025", "0.6891283", "0.6831638", "0.681357", "0.6581744", "0.65154946", "0.6455885", "0.64134777", "0.64058113", "0.6398181", "0.63753074", "0.63417506", "0.6308679", "0.6282912", "0.62765294", "0.6266003", "0.62587756", "0.6231232", "0.623038", "0.62224865", "0.6221158", "0.6214169", "0.619062", "0.61849946", "0.6176419", "0.6165164", "0.6110425", "0.6077472", "0.60744166", "0.6064037", "0.60598814", "0.6053334", "0.6041052", "0.60304326", "0.60275245", "0.6021598", "0.60152704", "0.6003462", "0.59700906", "0.5967879", "0.5965402", "0.59609354", "0.59487593", "0.594274", "0.59408915", "0.59383386", "0.5936398", "0.5933431", "0.59304607", "0.5910729", "0.5910729", "0.590298", "0.588865", "0.58856076", "0.5880012", "0.5868504", "0.5866696", "0.58523995", "0.5851263", "0.5844476", "0.5844476", "0.5843754", "0.58322215", "0.58106303", "0.58053577", "0.57997775", "0.57962894", "0.57885724", "0.5786693", "0.57835317", "0.5782016", "0.5779413", "0.5779031", "0.577707", "0.57768816", "0.5774307", "0.5770986", "0.5770986", "0.5769546", "0.576089", "0.576089", "0.576089", "0.57600033", "0.5753603", "0.5753282", "0.57493436", "0.5747366", "0.57420135", "0.57341176", "0.57318985", "0.5728947", "0.5724817", "0.571802", "0.57111555", "0.570496", "0.5703299", "0.5690128", "0.5673616", "0.5665616", "0.56600213" ]
0.71906143
0
Returns the first question in queue.
public Question getFirstQ() { return questionList.get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public process get_first() {\n\t\treturn queue.getFirst();\n\t}", "public Object firstElement() {\n return _queue.firstElement();\n }", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }", "Question getFirstQuestion();", "T peek(){\n if(isEmpty()){\n return null;\n }\n return (T)queueArray[0];\n }", "public int peek() {\n return queue.firstElement();\n }", "public Question getCurrentQuestion() {\n Question question = null;\n for (Question q : questions) {\n if (q.getSequence() == sequence) {\n question = q;\n break;\n }\n }\n return question;\n }", "@Override\r\n public CustomProcess peekBest() {\r\n if (data[0] == null || isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty\");\r\n }\r\n return data[0];\r\n }", "@Override\n public E getFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[head];\n }", "@Override\n public E peek() {\n return (E)queue[0];\n }", "public String getFirst () {\n lengthMutex.lock ();\n try\n {\n while (length == 0)\n empty.await ();\n }\n catch (Exception e)\n {}\n finally\n {\n lengthMutex.unlock ();\n }\n\n String result = null;\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].pollFirst ();\n qLock[i].unlock ();\n if (result != null)\n {\n length--;\n break;\n }\n }\n if (result == null)\n {\n // System.out.println (\"pooop\");\n System.exit (1);\n }\n\n lengthMutex.lock ();\n full.signal ();\n lengthMutex.unlock ();\n\n return result;\n }", "public T peek() {\n if (this.size <= 0)\n return null;\n return (T) pq[0];\n }", "public T peek() {\n\t if (size==0)\n\t return null;\n\t else return (T) pq[0];\n }", "public E peek() {\n\t\tif (isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn apq.get(1);\n\t}", "public synchronized Cincamimis firstAvailable() throws QueueException\r\n {\r\n if(measurementQueue==null) throw new QueueException(\"CINCAMIMIS Queue not found\");\r\n \r\n return measurementQueue.peek(); \r\n }", "public Object peek()\n {\n return queue.peekLast();\n }", "public Item peek(){\n if(isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\n return first.item;\n }", "public T peek() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to peek.\");\n } else {\n return backingArray[front];\n }\n\n }", "public SurveyQuestion getQuestion (int idx)\n {\n if (idx >= 0 && idx < questions.size()) {\n return questions.get(idx);\n }\n return null;\n }", "public int peek() {\n return queue.peek();\n }", "public String peek()\n\t{\n\t\tString firstVal;\n\t\tfirstVal = q.peekFirst();\n\t\treturn firstVal;\n\t}", "public Driver getFirstDriver()\n\t{\n\t\tif(unitSpaceAvailable == MAX_QUEUE){return null;}\n\t\treturn queue.get(0);\n\t}", "public T pollFirst() {\n if (!isEmpty()) {\n T polled = (T) list[startIndex];\n startIndex++;\n if (isEmpty()) {\n startIndex = 0;\n nextindex = 0;\n }\n return polled;\n }\n return null;\n }", "public DVDPackage front() {\n\t\treturn queue.peek();\n\t}", "public Object peek() {\n\t\t\n\t\t// Check: Queue is empty\n\t\tif (isEmpty()) {\n\t\t\tthrow new NoSuchElementException(\"Queue is empty. Nothing to peek at.\");\n\t\t}\n\t\t\n\t\treturn head.data;\n\t}", "public int getFront() {\n if(isEmpty()){\n return -1;\n }\n return queue[head];\n }", "public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }", "public String top() {\n return queue.size() == 0 ? null : queue.get(0);\n }", "public int peek()\n\t{\n\t\tif(isEmpty())\t\n\t\t{\n\t\t\tSystem.out.println(\"Queue Underflow\");\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\treturn queueArray[front];\n\t}", "public String getNextQuestion() {\r\n\t\t// Condition for getting the exact question, starting from the first question in\r\n\t\t// the list. This will happen until the method reaches the end of the list with\r\n\t\t// questions.\r\n\t\tif (counter < questions.size()) {\r\n\t\t\tnextQuestion = questions.get(counter).getQuestion();\r\n\t\t\t// Incrementing the counter with one, so next time the method is called it will\r\n\t\t\t// get the following question from the list.\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\t// When the end of the list is reached the next question will take this value.\r\n\t\telse {\r\n\t\t\tnextQuestion = \"You completed the test!\";\r\n\t\t}\r\n\t\treturn nextQuestion;\r\n\r\n\t}", "public Person peek() throws EmptyQueueException{\n if (holdingQueue.isEmpty()){\n throw new EmptyQueueException(\"This queue is empty.\");\n }else{\n return holdingQueue.get(0);\n }\n }", "public int peekMin() \n {\n\tfor ( int i = 0; i < queue.size(); i++ ) {\n\t if ( queue.get( i + 1 ) == null ) {\n\t\treturn (int) queue.get(i);\n\t }\n\t}\n\t\n\t//nothing to peek at!\n\tif ( queue.isEmpty() ) {\n\t throw new NoSuchElementException();\n\t}\n\n\treturn 0;\n }", "public int Front() {\n if(queue[head] == null){\n return -1;\n }else{\n return queue[head];\n }\n }", "public Question next() {\n\t\tif (this.questions.size() == this.iter) {\n\t\t\treturn null;\n\t\t}\n\t\tQuestion q = this.questions.get(this.iter);\n\t\tthis.iter++;\n\t\treturn q;\n\t}", "public QuestionModel getDefaultQuestion() {\n\t\treturn questionList.get(0);\n\t}", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "T peek(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.get(0);\n\treturn answer;\n }", "public IEvent peek(){\r\n\t\treturn queue.peek();\r\n\t}", "public WalkIn peek() {\n if(isEmpty()) System.err.println(\"The queue is empty! Nobody is next!\");\n \n return first.getData();\n }", "public QuestionModel getNextQuestion() {\n\t\tindex++;\n\t\treturn questionList.get(index % questionList.size());\n\t}", "public E element() {\n if (size == 0){\n return null;\n }\n return (E)queue[0];\n }", "public String getNextQuery() {\n\t\t return queryQueue.poll();\n\t }", "public E getFirst() {\n return peek();\n }", "public int Front() {\n if (this.count == 0)\n return -1;\n return this.queue[this.headIndex];\n }", "public int Front() {\n if (isEmpty()) {\n return -1;\n }\n return queue[head];\n }", "public E pollFirst();", "public T getFront(){\n if (isEmpty()){\n throw new EmptyQueueException();\n }\n else {\n return firstNode.getData();\n }\n }", "public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }", "public PuzzleBoard peek() {\r\n if (isEmpty()) throw new NoSuchElementException(\"Priority queue underflow\");\r\n return pq[1];\r\n }", "public T peek() {\n if (isEmpty()) {\n throw new RuntimeException(\"Ring buffer underflow\");\n }\n return rb[first];\n // Return the first item. None of your instance variables should change.\n }", "public Object peek()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n return front.getData();\n }", "public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }", "public int peek()\n\t{\n\t\tif (isEmpty() == true)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty!\");\n\t\t}\n\t\treturn head.value;\n\t}", "public int viewTop(){\r\n\t\treturn queue[0];\r\n\t}", "public int top() {\n int size = queue.size();\n for (int i = 0; i < size - 1; i++) {\n Integer poll = queue.poll();\n queue.offer(poll);\n }\n Integer poll = queue.poll();\n queue.offer(poll);\n return poll;\n }", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public int top() {\n return queue.element();\n }", "public Object getFront() throws Exception {\n if (!isEmpty()) {\n return queue[front];\n } else {\n // 对为空返回null\n return null;\n }\n }", "public Question getQuestion(String questionId) {\r\n Question[] questions = currentProcessInstance.getQuestions();\r\n Question foundQuestion = null;\r\n \r\n for (int i = 0; foundQuestion == null && i < questions.length; i++) {\r\n if (questions[i].getId().equals(questionId))\r\n foundQuestion = questions[i];\r\n }\r\n \r\n return foundQuestion;\r\n }", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public Object peek() throws QueueEmptyException {\n\n\t\tif (isEmpty()) {\n\t\t\tthrow new QueueEmptyException(\"Usage: using peek() on empty queue\");\n\t\t} else {\n\t\t\tNode N = head;\n\t\t\treturn N.item;\n\n\t\t}\n\n\t}", "private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public int peek()\n\t{\n\t\tif (head == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Queue is empty\");\n\t\t}\n\t\treturn head.value;\n\t}", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public int peek()\r\n\t{\r\n\t\treturn (int) pq[lowestCurrentPriority].getHead();\r\n\t}", "public char FirstAppearingOnce()\n {\n if(queue.isEmpty()){\n return '#';\n }else{\n return queue.peek();\n }\n }", "public Person get(int index) {\r\n\t\t// if the queue size is 0 then return null\r\n\t\tif(q.size() == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\treturn q.get(index);\r\n\t}", "@Override\r\n\tpublic E pollFirst() {\n\t\treturn null;\r\n\t}", "public int top() {\n return q1.getFirst();\n }", "T getFront() throws EmptyQueueException;", "public synchronized Cincamimis firstAvailableandRemove() throws QueueException\r\n {\r\n if(measurementQueue==null) throw new QueueException(\"CINCAMIMIS Queue not found\");\r\n if(measurementQueue.isEmpty()) return null;\r\n \r\n Cincamimis element=measurementQueue.poll(); \r\n if(element!=null) this.notifyObservers();\r\n \r\n return element; \r\n }", "public T minValue(){\r\n \tif(size > 0) {\r\n \t\treturn stack1.peek();\r\n \t}else {\r\n \t\treturn null;\r\n \t}\r\n }", "public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}", "public T front() throws EmptyQueueException;", "public int top() {\n return q.peek();\n }", "public int top() {\n return queue1.peek();\n }", "public int top() {\n return q1.peek();\n }", "public int top() {\n if(q1.size() > 0){\n return q1.peek();\n } else {\n return q2.peek();\n }\n }", "@Override\r\n\t\tpublic T getFirst() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.getFirst();\r\n\t\t\t}\r\n\t\t}", "public T peek()\n {\n if (isEmpty())\n return null;\n \n return first.getData();\n }", "public T getFirst();", "public T getFirst();", "public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }", "public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }", "public int top() {\n\t return q.peek();\n\t }", "@Override\r\n\r\n\tpublic E pollFirst() {\n\t\treturn poll();\r\n\t}", "public K getFirst() {\r\n\t\treturn first;\r\n\t}", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public int peek() {\n\t return first;\n\t}", "public Optional<T> getFirstItem() {\n return getData().stream().findFirst();\n }", "public int top() {\n if(q1.size() > 0) {\n return q1.peek();\n } else {\n return q2.peek();\n }\n }" ]
[ "0.7670004", "0.75211114", "0.7498179", "0.7416442", "0.72729915", "0.7233774", "0.7229395", "0.7226251", "0.7178079", "0.71093136", "0.70604223", "0.7023954", "0.70162964", "0.69571143", "0.6894919", "0.68470514", "0.68152446", "0.67071235", "0.6701994", "0.66765314", "0.66728616", "0.6658588", "0.66306734", "0.66239434", "0.6598723", "0.6595753", "0.65769374", "0.6545933", "0.6538384", "0.6533576", "0.6533197", "0.6526582", "0.652268", "0.65195423", "0.64947283", "0.6484029", "0.6481559", "0.6475325", "0.64751405", "0.6473456", "0.6465162", "0.6463268", "0.6461947", "0.6446181", "0.6433237", "0.6429031", "0.64226836", "0.6406583", "0.6400746", "0.63938296", "0.6391122", "0.63846856", "0.6375348", "0.6371887", "0.6335207", "0.62986463", "0.62961537", "0.6293762", "0.62842304", "0.6276475", "0.6271265", "0.6266962", "0.62614816", "0.6259362", "0.6259362", "0.62552595", "0.62552595", "0.6254282", "0.6254079", "0.62534106", "0.6249396", "0.62418956", "0.6239061", "0.62303793", "0.6216364", "0.621057", "0.62079996", "0.62066954", "0.6205882", "0.6202413", "0.62019604", "0.6197865", "0.6189747", "0.6188139", "0.6186832", "0.6183996", "0.61755776", "0.6173799", "0.61652774", "0.6163114", "0.6163114", "0.6152454", "0.61412644", "0.61340475", "0.61337185", "0.6132942", "0.6131956", "0.6128097", "0.61256117", "0.6115493" ]
0.8080278
0
Returns the size of the queue
public int getSize() { return questionList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getQueueSize();", "public int queueSize() {\n\t\treturn queue.size();\t\n\t}", "public long getQueueSize(){\n return queue.size();\n }", "public int size(){\r\n\t\treturn queue.size();\r\n\t}", "public int size() {\n return queue.size();\n }", "public int size() {\n return _queue.size();\n }", "public int size() {\n return this.queue.size();\n }", "public int getQueueSize() {\r\n\t\treturn this.queue.size();\r\n\t}", "public int size() {\n\t\treturn queue.size();\n\t}", "public int getQueueSize() {\n return queue.getQueueSize();\n }", "public static int size() {\n System.out.println();\n System.out.println(\"The size of the queue is: \" + queue.size());\t \n return queue.size();\n }", "public abstract int getQueueLength();", "public int queueSize() {\n return executor.getQueue().size();\n }", "final int getQueueSize() {\n // suppress momentarily negative values\n return Math.max(0, sp - base);\n }", "public int size() \r\n {\r\n if(measurementQueue==null) return 0;\r\n \r\n return measurementQueue.size();\r\n }", "public int getOutgoingQueueSize();", "public int size()\n\t{\n\t\treturn requestQueue != null ? requestQueue.size() : 0;\n\t}", "@Override\n public int queueLength() {\n return this.job_queue.size();\n }", "public int size() {\n processQueue();\n return weakCache.size();\n }", "public synchronized int getSize() {\r\n\t\treturn queueManagers.size();\r\n\t}", "public int size()\n\t{\n\t\tif(isEmpty())\n\t\t\treturn 0;\n\t\tif(isFull())\n\t\t\treturn queueArray.length;\n\t\t\n\t\tint i=front;\n\t\tint sz=0;\n\t\tif(front<=rear)\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\twhile(i<=queueArray.length-1)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t\ti=0;\n\t\t\twhile(i<=rear)\n\t\t\t{\n\t\t\t\tsz++;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\treturn sz;\n\t}", "public int inputQueueSize() {\n\t\tsynchronized (inputQueue) {\n\t\t\treturn inputQueue.size();\n\t\t}\n\t}", "public int getCount() {\n return queue.size();\n }", "public int size() {\n return qSize;\n }", "public int queueArrayLength(){\n\t\treturn queueArray.length;\n\t}", "long getWriterQueueLength();", "public static int size(ArrayQueueADT arrayQueue) {\n return arrayQueue.size;\n }", "public final int size()\r\n/* 41: */ {\r\n/* 42:215 */ long after = lvConsumerIndex();\r\n/* 43: */ for (;;)\r\n/* 44: */ {\r\n/* 45:219 */ long before = after;\r\n/* 46:220 */ long currentProducerIndex = lvProducerIndex();\r\n/* 47:221 */ after = lvConsumerIndex();\r\n/* 48:222 */ if (before == after)\r\n/* 49: */ {\r\n/* 50:224 */ long size = currentProducerIndex - after >> 1;\r\n/* 51:225 */ break;\r\n/* 52: */ }\r\n/* 53: */ }\r\n/* 54: */ long size;\r\n/* 55:230 */ if (size > 2147483647L) {\r\n/* 56:232 */ return 2147483647;\r\n/* 57: */ }\r\n/* 58:236 */ return (int)size;\r\n/* 59: */ }", "public int get_size();", "public int get_size();", "public synchronized int size() {\r\n return size;\r\n }", "public int getQueueSize(String walGroupId) {\n Queue<Path> queue = queues.get(walGroupId);\n if (queue == null) {\n return 0;\n }\n return queue.size();\n }", "public int size() { return dequeSize; }", "public long size() {\n\t\treturn size;\n\t}", "public synchronized long size() {\n\t\treturn size;\n\t}", "public int get_size()\r\n\t{\r\n\t\treturn this.size;\r\n\t}", "public int getNumQueues() {\n return queues.size();\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public long getSize() {\n return size.get();\n }", "public int size() {\n\t\t//Because we're the only consumer, we know nothing will be removed while\n\t\t//we're computing the size, so we know there are at least (rear - front)\n\t\t//elements already added.\n\t\treturn (int)(rear.get() - front.get());\n\t}", "public int size () {\n\t\treturn size;\n\t}", "public int size () {\n\t\treturn size;\n\t}", "public int size () {\r\n return this.size;\r\n }", "@Test\n public void sizeTest() {\n assertThat(4, is(this.queue.size()));\n }", "public int size ()\n {\n return size;\n }", "public int size() {\n\t\treturn heap.size();\n\t}", "public int size()\r\n\t{\r\n\t\treturn heap.size();\r\n\t}", "public synchronized int getSize() {\n\t\treturn this.size;\n\t}", "public int size()\r\n {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public int size() {\r\n\t\treturn q.size();\r\n\t}", "public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }", "public int size() {\n return this.heap.size();\n }", "public int size() {\n // DO NOT MODIFY!\n return size;\n }", "public int size() {\n\t\treturn size;\r\n\t}", "public int size() {\n\t\treturn size;\r\n\t}", "public int size() {\r\n \r\n return size;\r\n }", "public int size() {\n return doSize();\n }", "public long size();", "public int size() {\n return size;\r\n }", "public int size()\n {\n return size;\n }", "public int size()\n {\n return size;\n }", "public int size()\n {\n return size;\n }", "public int size()\n {\n return size;\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\r\n return size;\r\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }" ]
[ "0.9010169", "0.8921802", "0.8913381", "0.8848598", "0.8736755", "0.8726586", "0.87181306", "0.8703761", "0.86983824", "0.8688378", "0.86744696", "0.837217", "0.8235585", "0.82306296", "0.8138994", "0.80825335", "0.80222267", "0.8009988", "0.7957926", "0.79199207", "0.7886883", "0.7861276", "0.7745275", "0.76667374", "0.76314384", "0.7442747", "0.74238104", "0.74091196", "0.73699605", "0.73699605", "0.73540956", "0.73183376", "0.7305979", "0.7302149", "0.72774124", "0.7274253", "0.72708076", "0.7206964", "0.7206172", "0.7168873", "0.716566", "0.716566", "0.7147538", "0.7139144", "0.7135353", "0.7132455", "0.71296227", "0.71153355", "0.7114779", "0.7114779", "0.7114779", "0.70995617", "0.7098055", "0.7095858", "0.7095149", "0.70783913", "0.70783913", "0.7077873", "0.7075402", "0.7072243", "0.70714414", "0.7068324", "0.7068324", "0.7068324", "0.7068324", "0.70627755", "0.70627755", "0.70627755", "0.70627755", "0.70585334", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306", "0.7057306" ]
0.0
-1
Returns true if the queue is empty.
public boolean empty() { return questionList.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty()\n {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() \n {\n\treturn queue.size() == 0;\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean isEmpty(){\n\t\tif(queue.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean empty() {\r\n return this.queueMain.isEmpty();\r\n }", "@Override\n public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean queueEmpty() {\r\n\t\tif (vehiclesInQueue.size() == 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isEmpty() {\n return holdingQueue.isEmpty();\n }", "public static boolean isEmpty() {\n System.out.println();\t \n if(queue.isEmpty()) {\t \n System.out.println(\"The queue is currently empty and has no elements.\");\t \t \t \n }\n else {\n System.out.println(\"The queue is currently not empty.\");\t \t\t \n }\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty() && forReverse.isEmpty();\n }", "public boolean isMessageQueueEmpty() {\r\n\t\treturn this.messages.size() == 0;\r\n\t}", "public boolean isEmpty()\r\n\t{\n\t\tif(backIndex<0)\r\n\t\t{\r\n\t\t\tbackIndex=-1;\r\n\t\t\tSystem.out.println(\"Queue is Empty\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isEmpty() {\r\n boolean z = false;\r\n if (!isUnconfinedQueueEmpty()) {\r\n return false;\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null && !delayedTaskQueue.isEmpty()) {\r\n return false;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n z = ((LockFreeTaskQueueCore) obj).isEmpty();\r\n }\r\n return z;\r\n }\r\n z = true;\r\n return z;\r\n }", "public boolean empty() {\n return normalQueue.isEmpty() && reverseQueue.isEmpty();\n }", "public boolean empty() {\r\n return queue1.size() == 0;\r\n }", "public boolean empty() {\r\n return queue1.size() == 0;\r\n }", "public boolean isEmpty()\r\n {\r\n if(measurementQueue==null) return true;\r\n \r\n return measurementQueue.isEmpty();\r\n }", "public static boolean isEmpty() {\n\t\treturn resultQueue.isEmpty();\n\t}", "public boolean isEmpty() {\n return (head == tail) && (queue[head] == null);\n }", "public boolean isFull(){\n return size == arrayQueue.length;\n }", "public boolean isQueueEmpty(Queue objQueue){\r\n\t\treturn objQueue.getRare()==-1;\r\n\t}", "public boolean isFull() {\n int nexttail = (tail + 1 == queue.length) ? 0 : tail + 1;\n return (nexttail == head) && (queue[tail] != null);\n }", "public boolean empty() {\n return queue1.isEmpty();\n }", "public boolean queueFull() {\r\n\t\tif (vehiclesInQueue.size() > maxQueueSize) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean isFull() {\r\n\r\n\t\treturn data.size() >= maxQueue;\r\n\t}", "public boolean empty() {\n return queueA.isEmpty() && queueB.isEmpty();\n }", "public boolean isEmpty() {\n return qSize == 0;\n }", "public boolean empty() {\n return q.isEmpty();\n }", "public boolean isEmpty() { return (dequeSize == 0); }", "public boolean isEmpty(){\n\t\treturn ( startQueue.isEmpty() && finishQueue.isEmpty() && completedRuns.isEmpty() );\n\t}", "public boolean empty() {\n return q.isEmpty();\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "public boolean isQueueFull(Queue objQueue){\r\n\t\treturn objQueue.getRare()==objQueue.getArrOueue().length;\r\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isFull()\n\t{\n\t return (front==0 && rear==queueArray.length-1 || (front==rear+1));\n\t}", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "public boolean empty() {\n\t if(q.size()==0) return true;\n\t return false;\n\t }", "public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}", "public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }", "public synchronized boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty()\n {\n return heapSize == 0;\n }", "public boolean empty() {\n return size <= 0;\n }", "public boolean empty() {\n if (queue1.isEmpty() && queue2.isEmpty()){\n return true;\n }\n return false;\n }", "boolean isEmpty() {\n\t\t\n\t\t// array is empty if no elements can be polled from it\n\t\t// \"canPoll\" flag shows if any elements can be polled from queue\n\t\t// NOT \"canPoll\" means - empty\n\t\t\n\t\treturn !canPoll;\n\t}", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean empty() {\n return size == 0;\n }", "public boolean isEmpty() {\n\t\tboolean empty = true;\n\n\t\tfor(LinkedList<Passenger> queue : queues) { // loop through each queue to see if its empty.\n\t\t\tif(!queue.isEmpty()){\n\t\t\t\tempty = false;\n\t\t\t}\n \t}\n\t\treturn empty;\n }", "public boolean empty()\r\n\t{\r\n\t\treturn currentSize == 0;\r\n\t}", "public boolean empty() {\r\n return size == 0;\r\n }", "public boolean empty() {\n return push.isEmpty();\n }", "public boolean empty() { \t \n\t\t return size <= 0;\t \n }", "public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}", "public boolean isEmpty()\n {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return (this.size == 0);\n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty(){\n return myHeap.getLength() == 0;\n }", "public boolean empty() {\n return popStack.isEmpty();\n }", "public boolean isEmpty() {\n\t return size == 0;\n\t }", "public boolean isEmpty() {\n\t\treturn(this.size == 0);\n\t}", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean isEmpty() {\n return (size == 0);\n\n }", "public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\r\n return size == 0;\r\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public final boolean isEmpty() {\n return mSize == 0;\n }", "public boolean isEmpty() {\n return size == 0;\n }" ]
[ "0.9087273", "0.8937253", "0.8902561", "0.8869178", "0.8860727", "0.88598305", "0.88598305", "0.8836357", "0.8832554", "0.8832554", "0.8832554", "0.8832554", "0.8832554", "0.8832554", "0.8832554", "0.88265526", "0.8775803", "0.8757256", "0.8757256", "0.8757256", "0.8757256", "0.8757256", "0.87429404", "0.8726522", "0.8579932", "0.85643166", "0.85572624", "0.84870976", "0.84487087", "0.8441236", "0.8401451", "0.838895", "0.835955", "0.83131874", "0.83131874", "0.8308479", "0.8271952", "0.8234625", "0.8233357", "0.8211181", "0.81818104", "0.8142969", "0.8109395", "0.81079775", "0.809673", "0.8070484", "0.8019975", "0.8014546", "0.8011692", "0.79670066", "0.7950581", "0.7932282", "0.7907336", "0.7907336", "0.7875263", "0.78739345", "0.7865695", "0.7858042", "0.7841275", "0.78368026", "0.7829762", "0.7815838", "0.7811083", "0.78102595", "0.7807896", "0.7806506", "0.78004634", "0.7798466", "0.7768721", "0.77522945", "0.77335054", "0.7716676", "0.77115035", "0.76998323", "0.76977515", "0.7696078", "0.76949406", "0.76912403", "0.7690128", "0.7681261", "0.76776475", "0.76776475", "0.7673311", "0.76479423", "0.7641741", "0.7641141", "0.7621955", "0.7621955", "0.76214844", "0.76175886", "0.7615195", "0.7611077", "0.76097304", "0.76097304", "0.7609192", "0.76062936", "0.76004565", "0.76004565", "0.76004565", "0.7599336", "0.75980175" ]
0.0
-1
Returns a report describing the current queue.
public String toString() { String report = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"; report += "Numbered Question Queue\n\n"; //for (int i = 0; i < questionList.size();i++) // report += questionList.get(i) + "\n"; for (int i = 0; i < questionList.size();i++) report += "Q." + (i+1) + " " + questionList.get(i) + "\n"; return report; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String getQueueDisplayName();", "@DISPID(112)\r\n\t// = 0x70. The runtime will prefer the VTID if present\r\n\t@VTID(107)\r\n\tjava.lang.String queue();", "Collection<QueuedPrintJob> getQueue();", "public String queueName();", "public void printQueue();", "@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(32)\r\n\tjava.lang.String submissionQueue();", "@DISPID(26)\r\n\t// = 0x1a. The runtime will prefer the VTID if present\r\n\t@VTID(31)\r\n\tjava.lang.String submissionQueue();", "public java.lang.String getQueueStatus() {\n return queueStatus;\n }", "@Override\n\tpublic String getQueueName() {\n\t\treturn model.getQueueName();\n\t}", "@Override\n\t\t\tpublic Optional<IAMQPQueue> queue() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic Optional<IAMQPQueue> queue() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n protected String getQueueName() {return _queueName;}", "public String gotoQueue() {\n\t\tselectedPlaylist = PlaylistMng.QUEUE_NAME;\n\t\tpassivePlaylist = playlistMng.getPlaylist(PlaylistMng.QUEUE_NAME);\n\t\treturn \"queue\";\n\t}", "public String toString() {\n\t\tString s = \"(\" + emptyQueueTime + \"ms)_Q[\" + this.id + \"](\" + queueEfficency + \"score)= \";\n\t\tfor (Client a : queue) {\n\t\t\ts += a.toString();\n\t\t}\n\t\ts += \"\\n\";\n\t\treturn s;\n\t}", "java.lang.String getQueueName();", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"support\", value = \"The name of the queue\")\n @JsonProperty(JSON_PROPERTY_QUEUE)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getQueue() {\n return queue;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"support\", value = \"The name of the queue\")\n @JsonProperty(JSON_PROPERTY_QUEUE)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getQueue() {\n return queue;\n }", "public static void display() {\n System.out.println();\t \n System.out.println(\"Contents of the queue are: \" + queue);\n }", "public String getMonitoringState() {\n StringBuilder sb = new StringBuilder();\n sb.append(queueManager.getMonitoringInfo());\n return sb.toString();\n }", "public List<MediaSessionCompat.QueueItem> getQueue() {\n }", "@DISPID(7)\r\n\t// = 0x7. The runtime will prefer the VTID if present\r\n\t@VTID(13)\r\n\tjava.lang.String queueName();", "String getBaseQueueName();", "Queue getQueue() throws NamingException;", "public Queue getQueue() {\n return new Queue();\n }", "public java.lang.Object getQueueID() {\n return queueID;\n }", "public java.lang.String getQueueName() {\n return queueName;\n }", "@DISPID(113)\r\n\t// = 0x71. The runtime will prefer the VTID if present\r\n\t@VTID(108)\r\n\tint queueId();", "public String toString()\n\t{\n\t\tString list = new String();\n\t\tlist += \"Pump: \"+(pumpNumber + 1)+\"\\n\";\n\t\tlist += \"Queue size is: \" + queue.size()+\" Queue Free is: \"+unitSpaceAvailable+\"\\n\";\n\t\tfor(int i = 0; i < queue.size(); i++){\n\t\t\tlist += queue.get(i).toString()+\"\\n\";\n\t\t}\n\t\tif(list.equals(\"\"))\n\t\t{\n\t\t\treturn \"Empty\";\n\t\t}\n\t\treturn list;\n\t}", "default String replyQueue() {\n return (String) metadata().get(\"x-reply-queue\");\n }", "public LinkedList<ElevatorQueueObject> getQueue() {\n return queue;\n }", "public String toString() {\n return report;\n }", "public String getQueueBand() {\n return _queueBand;\n }", "public String toString()\n\t{\n\t\tString queueAsString = \"\";\n\t\tint index = front - 1;\n\t\tfor (int i = 0; i < counter; i++)\n\t\t{\n\t\t\tindex = next(index);\n\t\t\tqueueAsString += list[index] + \" \";\n\t\t}\n\t\treturn queueAsString;\n\t}", "public final synchronized String mo47204a() {\n return this.f49750a.getString(\"topic_operaion_queue\", \"\");\n }", "public interface Queue {\n\tpublic Set getGatheredElements();\n\tpublic Set getProcessedElements();\n\tpublic int getQueueSize(int level);\n\tpublic int getProcessedSize();\n\tpublic int getGatheredSize();\n\tpublic void setMaxElements(int elements);\n\tpublic Object pop(int level);\n\tpublic boolean push(Object task, int level);\n\tpublic void clear();\n}", "public static void main(String[] args) {\n// System.out.println(testQueue.getQueueElement());\n// System.out.println(testQueue.getQueueElement());\n }", "public String getProcessCompleteQueueName()\n {\n return DONE; \n }", "@DISPID(62)\r\n\t// = 0x3e. The runtime will prefer the VTID if present\r\n\t@VTID(67)\r\n\tint queueId();", "private void getQueueDetails(RoutingContext routingContext) {\n LOGGER.debug(\"Info: getQueueDetails method started;\");\n JsonObject requestJson = new JsonObject();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/queue\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n String queueId = routingContext.request().getParam(\"queueId\");\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson, authenticationInfo, authHandler -> {\n LOGGER.debug(\"Info: Authenticating response;\".concat(authHandler.result().toString()));\n if (authHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.getQueueDetails(queueId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Getting Queue Details\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad Request;\" + brokerResultHandler.cause());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n }", "public static Queue getQueue(){\r\n\t\treturn queueInstance;\r\n\t}", "protected void printQueue()\r\n\t{\r\n\t\tint south = 1;\r\n\t\tint west = 2;\r\n\t\tint midwest = 3;\r\n\t\t\r\n\t\tgetPriorityHeader(south);\r\n\t\tSystem.out.println(State.getHeader());\r\n\t\tdisplaySouth();\r\n\t\t\r\n\t\tgetPriorityHeader(west);\r\n\t\tSystem.out.println(State.getHeader());\r\n\t\tdisplayWest();\r\n\t\t\r\n\t\tgetPriorityHeader(midwest);\r\n\t\tSystem.out.println(State.getHeader());\r\n\t\tdisplayMidwest();\r\n\t}", "@Override\r\n\tpublic void Display() {\n\t\t System.out.print(\"\\nQueue = \");\r\n\t if (len == 0)\r\n\t {\r\n\t System.out.print(\"Empty\\n\");\r\n\t return ;\r\n\t }\r\n\t for (int i = front; i <= rear; i++)\r\n\t System.out.print(queue[i]+\" \");\r\n\t System.out.println(); \r\n\t\t\r\n\t}", "com.google.protobuf.ByteString\n getQueueNameBytes();", "public String getQueDesc() {\n return queDesc;\n }", "public AppQueue getQueue()\r\n {\r\n return event_q;\r\n }", "public int getQueueStatus() throws FTD2XXException {\n IntByReference reference = new IntByReference();\n ensureFTStatus(ftd2xx.FT_GetQueueStatus(ftHandle, reference));\n return reference.getValue();\n }", "String report() {\n StringBuilder sb = new StringBuilder();\n // Header\n for (int i = 0; i < Stat.values().length; i++) {\n if (i > 0) {\n sb.append(\",\");\n }\n sb.append(Stat.values()[i].name);\n }\n // One line per job\n for (JobResult result : jobResults) {\n result.computeMetrics();\n sb.append(\"\\n\").append(result);\n }\n // Include aggregates for jobs and overall\n if (jobTypeResults.containsKey(\"ForwardChain\")) {\n jobTypeResults.get(\"ForwardChain\").computeMetrics();\n sb.append(\"\\n\").append(jobTypeResults.get(\"ForwardChain\"));\n }\n if (jobTypeResults.containsKey(\"DuplicateElimination\")) {\n jobTypeResults.get(\"DuplicateElimination\").computeMetrics();\n sb.append(\"\\n\").append(jobTypeResults.get(\"DuplicateElimination\"));\n }\n totals.computeMetrics();\n sb.append(\"\\n\").append(totals);\n return sb.toString();\n }", "public int getQueuePosition();", "@Override\n\t\t\tpublic IAMQPPublishAction replyTo(IAMQPQueue queue) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic IAMQPPublishAction replyTo(IAMQPQueue queue) {\n\t\t\t\treturn null;\n\t\t\t}", "public void printQueue() {\r\n\t\tNode current = head; //Instantiated node which will cycle through\r\n\t\tfor(int i = 0; i < size; i++) { //While the current instantiated node isn't null (meaning thats it's in the list), increment through the list and print the data\r\n\t\t\tSystem.out.print(current.data + \"[\" +current.index+ \"] \");\r\n\t\t\tcurrent = current.next;\r\n\t\t}\r\n\t\tif(head == null) System.out.println(\"THE QUEUE IS EMPTY!\");\r\n\t\tSystem.out.println(\"\\n\");\r\n\t}", "public void printProcessQueue()\n\t{\n\t\tProcesses.print();\n\t}", "@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(60)\r\n\tjava.lang.String lastInstanceQueue();", "public String toString() {\r\n StringBuffer buffer = new StringBuffer();\r\n buffer.append(\"IQ id(\");\r\n buffer.append(importQueueId);\r\n buffer.append(\"), uploaded by \");\r\n buffer.append(uploadedByName);\r\n buffer.append(\" on \");\r\n buffer.append(uploadedTime);\r\n buffer.append(\", last updated \");\r\n buffer.append(getLastUpdateString());\r\n buffer.append(\".\");\r\n return buffer.toString();\r\n }", "<V extends Object> Queue<V> getQueue(String queueName);", "public CmsEventQueueRecord() {\n super(CmsEventQueue.CMS_EVENT_QUEUE);\n }", "public void print(){\n System.out.print(\"Current Queue: \");\n for (int i = 1; l <= myHeap.getLength(); i++){\n \tSystem.out.printf(\"%s\", myHeap.getArray()[i]);\n \tif (i < myHeap.getLength()){\n \t\tSystem.out.print(\",\");\n \t}\n }\n\n System.out.println();\n }", "public ArrayQueue<Person> getQueue() {\n return applicantQueue;\n }", "public void printQueue() {\n \t\n \tif(this.front == null) {\t\n \t\tSystem.out.println(\"Queue Empty!!\");\n \t\treturn;\n \t}\n \t\n \twhile(this.front != null) {\n \t\tSystem.out.print(\"(\"+this.front.data+ \") \");\n \t\tthis.front = this.front.next;\n \t}\n }", "public String getExchangeCaseMgrQueue() {\n\t\treturn exchangeCaseMgrQueue;\n\t}", "private String queryToString(Queue<Character> queue) {\n Iterator<Character> it = queue.iterator();\n StringBuffer bufferSt = new StringBuffer();\n while (it.hasNext()) {\n bufferSt.append(queue.poll());\n }\n return bufferSt.toString().replace(\")\", \"\").replace(\"(\", \"\").trim();\n }", "@Override\r\n\tpublic String toString () {\n\t\treturn \"|AListPQueue: \" + aPList.toString() + \"|\";\r\n\t}", "public final String toString() {\n String myReturn = \"Report \\\"\" + this.name + \"\\\" with query \\\"\"\n + this.query + \"\\\".\";\n return myReturn;\n }", "String nameOfListenQueue();", "void printqueue()\n\t{\n\t\tint i;\n\t\tif(!isEmpty())\n\t\t{\n\t\t\tfor(i=front;i<=rear;i++)\n\t\t\t\tSystem.out.print(queue[i]+\" \");\n\t\t\tSystem.out.println();\n\n\t\t}\n\t}", "public void display() {\n\t\tSystem.out.println(\"Queue display\");\n\t\tint maxi = (front < rear) ? rear : (rear + MAX_QUEUE_SIZE);\n\t\tfor (int i = front + 1; i <= maxi; i++) {\n\t\t\tSystem.out.println(data[i]);\n\t\t}\n\t}", "public String toString()\n\t{\n\t\tStringBuilder str = new StringBuilder(\n\t\t\tString.format(\"Bank (%2d els, %3d fls):\\n\", this.getElevatorCount(), this.getFloorCount()));\n\t\t\n\t\tfor (int i = this.getFloorCount()-1; i >= 0; i--)\n\t\t{\n\t\t\tstr.append(String.format(\"\\t%3d: %2d u, %2d d\\n\", i, this.upQueues[i].size(), this.downQueues[i].size()));\n\t\t}\n\t\t\n\t\treturn str.toString();\n\t}", "static void dump(Queue queue) {\n String temp = \" queue = \";\n System.out.print(temp);\n while (queue.isEmpty()) {\n System.out.println(((TreeNode) queue.remove()).data + \" \");\n }\n }", "public int queue() \n { return waiting; }", "public int getQueueSize() {\n return queue.getQueueSize();\n }", "void showQueuingBuildProgress();", "public interface Queue<T> {\n\n /**\n * Current queue size\n * @return size as int\n */\n int size();\n\n /**\n * Checks if the the queue is empty\n * @return true if the list is empty\n */\n boolean isEmpty();\n\n /**\n * Adding an element to the queue\n * @param t element to add\n */\n void enqueue(T t);\n\n /**\n * Return and removes the first element in the queue\n * @return the removed element\n * @throws IndexOutOfBoundsException if queue is empty\n */\n T dequeue();\n\n /**\n * Return (without removing) first element in queue\n * @return the first element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n *\n */\n T first();\n\n /**\n * Return (without removing) last element in queue\n * @return last element in queue\n * @throws IndexOutOfBoundsException if the queue is empty\n */\n T last();\n\n /**\n * Return a string representation of the queue content.\n * @return String of queue\n */\n String toString();\n\n /**\n * Element iterator.\n * @return Iterates over elements in queue\n */\n Iterator iterator();\n\n}", "public String pendingToString() {\n InterruptibleTask interruptibleTask = this.task;\n if (interruptibleTask == null) {\n return super.pendingToString();\n }\n StringBuilder stringBuilder = new StringBuilder(\"task=[\");\n stringBuilder.append(interruptibleTask);\n stringBuilder.append(\"]\");\n return stringBuilder.toString();\n }", "public String read(){\r\n DebugWrapper.infoMsg(\"Current data size in buffer left: \" + mBufferData.size(), VSPManager.TAG);\r\n String queue = new String();\r\n \r\n if(mBufferData.size() <= mMaxDataToBeReadFromBuffer){\r\n /*\r\n * we have less or equal to mMaxDataToBeReadFromFIFO bytes of data in the buffer,\r\n * so we move all the available data in the sending queue\r\n */\r\n queue = getDataFromBuffer();\r\n } else{\r\n /*\r\n * from the buffer(mBufferData) add the maximum allowed\r\n * data (as defined by the mMaxDataToBeReadFromFIFO variable)\r\n * in the sending queue\r\n */\r\n queue = getDataFromBuffer(mMaxDataToBeReadFromBuffer);\r\n\r\n }\r\n DebugWrapper.infoMsg(\"Queue data size to be currently send: \" + queue.toString().length(), VSPManager.TAG);\r\n DebugWrapper.infoMsg(StringHandler.printWithNonPrintableChars(\"Queue data to be currently send: \" + queue.toString()), VSPManager.TAG);\r\n \r\n\r\n return queue.toString();\r\n }", "@Override\n public String toString() {\n String output;\n if (isDone) {\n output = String.format(\"[X] %s\", description);\n } else {\n output = String.format(\"[ ] %s\", description);\n }\n return output;\n }", "public void printQueue() {\n\t\tcurrent = front;\n\n\t\tif (isEmpty()) {\n\t\t\tSystem.out.println(\"The queue is empty.\");\n\t\t}\n\t\twhile (current.next != null) {\n\t\t\tSystem.out.println(current.data);\n\t\t\tcurrent = current.next;\n\t\t}\n\t}", "public void getSystemStatus() throws Exception\r\n\t{\r\n\t\tsystemDump.delete(0, systemDump.length());\r\n\r\n\t\tboolean needAlarm = memoryLogging();\r\n\r\n\t\tif (Database.appDatasource != null)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Database connection status: \\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number database connection\\t\\t\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number busy database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumBusyConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumIdleConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"\\t Number idle database connection\\t: \");\r\n\t\t\tsystemDump.append(Database.appDatasource.getNumUnclosedOrphanedConnections());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tString queueWarningMessage = \"\";\r\n\r\n\t\tsystemDump.append(\"\\r\\n\");\r\n\t\tsystemDump.append(\"Local queue status: \\r\\n\");\r\n\r\n\t\tfor (String key : QueueFactory.localQueues.keySet())\r\n\t\t{\r\n\t\t\tLocalQueue localQueue = QueueFactory.getLocalQueue(key);\r\n\r\n\t\t\tsystemDump.append(\"Local queue (\");\r\n\t\t\tsystemDump.append(key);\r\n\t\t\tsystemDump.append(\"): \");\r\n\t\t\tsystemDump.append(localQueue.getSize());\r\n\r\n\t\t\tif (localQueue.getMaxSize() > 0)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"/\");\r\n\t\t\t\tsystemDump.append(localQueue.getMaxSize());\r\n\t\t\t}\r\n\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\t\tif (QueueFactory.getTotalLocalPending() > 0)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"Total pending counter : \");\r\n\t\t\tsystemDump.append(QueueFactory.getTotalLocalPending());\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t}\r\n\r\n\t\tif (queueDispatcherEnable)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"\\r\\n\");\r\n\t\t\tsystemDump.append(\"Remote queue status: \\r\\n\");\r\n\r\n\t\t\tQueueSession session = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tsession = getQueueSession();\r\n\r\n\t\t\t\tfor (int j = 0; j < externalQueues.length; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (externalQueues[j].equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tString queueName = externalQueues[j];\r\n\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tQueue checkQueue = QueueFactory.getQueue(queueName);\r\n\r\n\t\t\t\t\t\tint size = QueueFactory.getQueueSize(session, checkQueue);\r\n\r\n\t\t\t\t\t\tQueueFactory.queueSnapshot.put(queueName, new Integer(size));\r\n\r\n\t\t\t\t\t\tsystemDump.append(\"Total command request for \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\" : \");\r\n\t\t\t\t\t\tsystemDump.append(size);\r\n\t\t\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\t\t\tqueueWarningMessage += queueWarning(checkQueue, queueName, size);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsystemDump.append(\"Error occur when get size of queue \");\r\n\t\t\t\t\t\tsystemDump.append(queueName);\r\n\t\t\t\t\t\tsystemDump.append(\": \");\r\n\t\t\t\t\t\tsystemDump.append(e.getMessage());\r\n\r\n\t\t\t\t\t\tlogMonitor(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tsystemDump.append(\"Can not get remote queue size: \");\r\n\t\t\t\tsystemDump.append(e.getMessage());\r\n\t\t\t\tsystemDump.append(\"\\r\\n\");\r\n\r\n\t\t\t\tlogMonitor(e);\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tQueueFactory.closeQueue(session);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsystemDump.append(\"WARNING: Disk space is running low\");\r\n\t\t}\r\n\t\tif (!queueWarningMessage.equals(\"\"))\r\n\t\t{\r\n\t\t\tneedAlarm = true;\r\n\t\t\tsystemDump.append(queueWarningMessage);\r\n\t\t}\r\n\r\n\t\tlogMonitor(systemDump);\r\n\r\n\t\tif (needAlarm)\r\n\t\t{\r\n\t\t\tsendInstanceAlarm(\"system-resource\", systemDump.toString());\r\n\t\t}\r\n\t}", "public long getQueueSize(){\n return queue.size();\n }", "public synchronized Cincamimis firstAvailable() throws QueueException\r\n {\r\n if(measurementQueue==null) throw new QueueException(\"CINCAMIMIS Queue not found\");\r\n \r\n return measurementQueue.peek(); \r\n }", "private void printReport() {\n\t\t\tSystem.out.println(\"Processed \" + this.countItems + \" items:\");\n\t\t\tSystem.out.println(\" * Labels: \" + this.countLabels);\n\t\t\tSystem.out.println(\" * Descriptions: \" + this.countDescriptions);\n\t\t\tSystem.out.println(\" * Aliases: \" + this.countAliases);\n\t\t\tSystem.out.println(\" * Statements: \" + this.countStatements);\n\t\t\tSystem.out.println(\" * Site links: \" + this.countSiteLinks);\n\t\t}", "public String doPrint() {\n\t\t// Get the event title.\n\t\tString event = \"\";\n\t\tswitch (eventType) {\n\t\t\tcase \"IND\": event = \"Individual\";\n\t\t\t\t\t\tbreak;\n\t\t\tcase \"GRP\": event = \"Group\";\n\t\t\t\t\t\tbreak;\n\t\t\tcase \"PARIND\": event = \"Parallel Individual\";\n\t\t\t\t\t\t break;\n\t\t\tcase \"PARGRP\": event = \"Parallel Group\";\n\t\t\t\t\t\t break;\n\t\t default:\tevent = \"\";\n\t\t \t\t\tbreak;\n\t\t}\n\t\t\n\t\tString out = \"RUN BIB TIME\t \" + event +\"\\n\";\n\t\t\n\t\t// Print completed runs.\n\t\tfor ( Run run : completedRuns ) {\n\t\t\tout += run.print() + \"\\n\";\n\t\t}\n\t\t\n\t\t// Print inProgress runs.\n\t\tfor ( Run run : finishQueue ) {\n\t\t\tout += run.print() + \"\\n\";\n\t\t}\n\t\t\n\t\t// Print waiting runs.\n\t\tfor ( Run run : startQueue ) {\n\t\t\tout += run.print() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn out;\n\t}", "private void printReport() {\n\t\tSystem.out.println(getReport());\n\t}", "@javax.annotation.Nullable\n @ApiModelProperty(example = \"7\", value = \"Last position of the call in the queue.\")\n @JsonProperty(JSON_PROPERTY_QUEUE_POSITION)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public Integer getQueuePosition() {\n return queuePosition;\n }", "public MyArrayList<E> getQueue() {\n return this.queue;\n }", "public static void showNodeQueue(AYQueue<Node> q)\n {\n for (int i = 0; i < q.size(); i++)\n {\n Node node = q.dequeue();\n System.out.format(\"Element #%d = [%s]%n\", i, node.getNodeID());\n q.enqueue(node);\n } //for\n\n }", "public QueueEao getQueueEao() {\n\t\treturn queueEao;\n\t}", "public boolean isQueue() {\n return this == QUEUE;\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuilder sb=new StringBuilder();\n\t\tif(isEmpty()){\n\t\t\tsb.append(String.format(\"ArrayQueueLoop:[] %d/%d\",size,data.length));\n\t\t}else{\n\t\t\tsb.append(\"ArrayQueueLoop:[\");\n\t\t\tfor(int i=front;i!=rear;i=(i+1)%data.length){\n\t\t\t\tif((i+1)%data.length==rear){\n\t\t\t\t\tsb.append(data[i]+\"]\");\n\t\t\t\t}else{\n\t\t\t\t\tsb.append(data[i]+\",\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(String.format(\" %d/%d\",size,data.length));\n\t\t}\n\t\t\n\t\treturn sb.toString();\n\t}", "@RequestMapping(value = \"/{listId}/queue\", method = RequestMethod.GET)\r\n\tpublic List<Driver> getQueue(@PathVariable long listId){\r\n\t\tClearList cList = ClearListController.getClearlistById(listId);\r\n\t\t\r\n\t\treturn cList.getQueue();\r\n\t}", "private String getInitQueueForQueue(Sysview sysview, String qmgr, String queue)\n throws IOException {\n TabularData details = sysview.execute(\"MQ {0}; MQALTER Queue {1}\", qmgr, queue)\n .getTabularData();\n return details.getFirstRowMatching(\"Field\", \"InitQ\").get(\"Value\");\n }", "public boolean isSetQueue() {\n return this.queue != null;\n }", "@Override\n public String toString() {\n return \"[\" + (isDone ? \"X\" : \" \") + \"] \" + description;\n }", "public WorkReport call() {\n System.out.println(message);\n return new DefaultWorkReport(WorkStatus.COMPLETED);\n }", "@Override\n public String toString() {\n return \"Report{\" +\n \"reportId=\" + reportId +\n \", reportOpId=\" + reportOp +\n \", date='\" + date + '\\'' +\n \", reportedUserId=\" + reportedUser +\n \", userId=\" + user +\n \", status=\" + status +\n '}';\n }", "public String toString() {\n String s = \"Message <ReportAckMsg> \\n\";\n try {\n s += \" [dest=0x\"+Long.toHexString(get_dest())+\"]\\n\";\n } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ }\n return s;\n }", "public String getReportDetail () {\n return reportDetail;\n }", "public String getReport() {\n return reportDoc.toString();\n }", "String getBaseQueueManagerName();", "protected interface IndexedQueue {\n long lvConsumerIndex();\n\n long lvProducerIndex();\n }", "public OutputQueue getOutputQueue() {\n\treturn outputQueue;\n }" ]
[ "0.7201726", "0.6922306", "0.68775356", "0.6527583", "0.6400762", "0.638406", "0.63743573", "0.63546026", "0.6310842", "0.63050425", "0.63050425", "0.6302589", "0.62907666", "0.6279516", "0.62678885", "0.624263", "0.624263", "0.6133144", "0.607192", "0.60015494", "0.5997725", "0.59823996", "0.5961268", "0.59597695", "0.59315646", "0.5881684", "0.58595985", "0.5858965", "0.5857099", "0.5830384", "0.5818585", "0.577227", "0.5753603", "0.57533354", "0.57487154", "0.56694967", "0.5660448", "0.5632583", "0.56299263", "0.5622683", "0.5608911", "0.5589415", "0.5576136", "0.55736905", "0.5564448", "0.5552301", "0.55236477", "0.550952", "0.5506987", "0.5506987", "0.55067617", "0.5495873", "0.5489839", "0.5488799", "0.5434807", "0.543006", "0.54210925", "0.5409578", "0.5405783", "0.5383733", "0.53783184", "0.53768706", "0.53613704", "0.53577214", "0.53524214", "0.5341891", "0.5337882", "0.5326606", "0.5321624", "0.5310732", "0.5310105", "0.5304761", "0.5302544", "0.52988636", "0.52979195", "0.5287054", "0.5286705", "0.5286231", "0.5285978", "0.52833265", "0.52820474", "0.5278732", "0.5270509", "0.5269297", "0.5267269", "0.5251912", "0.5237978", "0.52345914", "0.52303594", "0.52292395", "0.5225374", "0.52216", "0.5212963", "0.52105063", "0.5210145", "0.5205756", "0.52043605", "0.519303", "0.5189634", "0.5187359" ]
0.65818083
3
private static final CounterFactoryCOUNTER_FACTORY= CounterFactory.getInstance();
@Test public void testPerformance() { String testName = logTestName(); int cPass = 5; int iMax = 1000 * 1000; // int[] cThreadList = { 1, 2, 4, 6, 8 }; int[] cThreadList = { 1, 2, 4 }; StringGroup nameList = new StringGroup(testName); LockCounterFamily counterFamily = new LockCounterFamily(nameList); MagicNamedCounter namedCounter = new MagicNamedCounter(counterFamily); for (int cThread : cThreadList) { measurePerformance(new SynchronizedCounter(), cPass, iMax, cThread); measurePerformance(new AtomicCounter(), cPass, iMax, cThread); measurePerformance(new MagicReadCounter(), cPass, iMax, cThread); measurePerformance(new PlainWriteCounter(), cPass, iMax / 20, cThread); measurePerformance(new MagicWriteCounter(), cPass, iMax, cThread); measurePerformance(namedCounter, cPass, iMax, cThread); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Counter() {\r\n this.count = 0;\r\n }", "public static int getCounter() {return counter;}", "public myCounter() {\n\t\tcounter = 1;\n\t}", "int getInstanceCount();", "public Counter() {\r\n value = 0;\r\n }", "public BasicCounter() {\n count = 0;\n }", "private SchedulerThreadCounter()\n\t{\n\t\tii_counter = 100;\n\t}", "Counter getCounter(String counterName);", "public void createCounters() {\n // COUNTERS CREATION //\n //create a new counter for the blocks.\n this.blockCounter = new Counter();\n //create a new counter for the blocks.\n this.ballCounter = new Counter();\n }", "public Counter() {\n //this.max = max;\n }", "ThreadCounterRunner() {}", "public Counter create(Type type){\n Counter counter = Counter.builder(CounterPath+\".\"+type.getCounterName()).description(\"\").baseUnit(\"Counter\").register(meterRegistry);\r\n counters.put(type.getName(), counter);\r\n \r\n return counter;\r\n }", "public Counter()\n {\n this(0);\n }", "private static Counters m147576a(Parcel parcel) {\n return new Counters(parcel);\n }", "private SingletonColorFactory() {\n\t\tRandom rand = new Random();\n\t\tfactoryID = rand.nextInt(10000);\n\t}", "p3(){ \n cnt++; // Increment the static variable by 1 for each object creation. \n }", "public static SchedulerThreadCounter getInstance()\n\t{\n\t\tif(istc_intance == null)\n\t\t\tistc_intance = new SchedulerThreadCounter();\n\n\t\treturn istc_intance;\n\t}", "private VerifierFactory() {\n }", "public int getCounter() {\nreturn this.counter;\n}", "private CardReaderMonitorFactory() {\t\t\n\t}", "private Count() {}", "private Count() {}", "public Counter(Counter count) {\r\n value = count.value;\r\n }", "public int getCounter(){\n return counter;\n }", "private SingletonTextureFactory(){\n\t\tRandom rand = new Random();\n\t\tfactoryID = rand.nextInt(10000); \n\t}", "public Counter(int val) {\r\n value = val;\r\n }", "@Override\n\tpublic void onCreate() {\n\t\tcounter = 0;\n\t\tTimerTask timerTask = new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\tcounter = counter + 1;\n\t\t\t\tLog.d(\"SvcCounter\", Integer.toString(counter));\n\t\t\t\tIntent counterValue = new Intent(\"CounterValue\");\n\n\t\t\t\tcounterValue.putExtra(\"cValue\", counter);\n\t\t\t\tsendBroadcast(counterValue);\n\t\t\t}\n\t\t};\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(timerTask, delay = 2000, period = 5000);\n\t\tsuper.onCreate();\n\t}", "static void doCount(){\n\t\tStaticDemo st=new StaticDemo();\n\t\t st.count++;\n\t\t System.out.println(\"Count is:\"+st.count);\n\t }", "public Counter(int count)\n {\n this.setCount(count);\n }", "public Counter(int init){\n \tvalue = init;\n }", "public int getCounter()\n {\n return counter;\n }", "private static void setCounter() {++counter;}", "@Override\n public void initialize() {\n counter = 0;\n }", "@Override\n public void initialize() {\n counter = 0;\n }", "IntStrategyFactory() {\n }", "private @Nullable Counter<Long, CounterDistribution> getCounter(NameContext step) {\n CounterName counterName =\n CounterName.named(\"per-element-processing-time\").withOriginalName(step);\n return (Counter<Long, CounterDistribution>) counters.getExistingCounter(counterName);\n }", "public interface Counter {\n \n \n public int getCount();\n}", "protected abstract CounterFormatter createFormatter();", "public ClassFrequency getInstance(){\n\t\treturn instance;\n\t}", "private FrequencyConverter() {\n }", "private Singleton()\n\t\t{\n\t\t}", "public ConnectionCount(int counter) {\nthis.counter = counter;\n}", "public Person(){\n instanceCounter++;\n localCounter++;\n }", "public HotrodCacheFactory() {\n }", "private Singleton() {\n\t}", "public int getCounter() {\r\n return counter;\r\n }", "public int getCounter() {\n return counter;\n }", "io.dstore.values.IntegerValue getCounter();", "TesttrackFactory getTesttrackFactory();", "public static int getIdcounter() {\n return idcounter;\n }", "public Countable(){\n counter++;\n objectName = \"Countable \" + counter;\n// System.out.println(objectName);\n }", "public Frequency() {\n\n }", "private MPayment createCounterDoc() {\n //\tIs this a counter doc ?\n if (getRef_Payment_ID() != 0) {\n return null;\n }\n\n //\tOrg Must be linked to BPartner\n MOrg org = MOrg.get(getCtx(), getAD_Org_ID());\n int counterC_BPartner_ID = org.getLinkedC_BPartner_ID();\n if (counterC_BPartner_ID == 0) {\n return null;\n }\n //\tBusiness Partner needs to be linked to Org\n MBPartner bp = new MBPartner(getCtx(), getC_BPartner_ID(), null);\n int counterAD_Org_ID = bp.getAD_OrgBP_ID_Int();\n if (counterAD_Org_ID == 0) {\n return null;\n }\n\n MBPartner counterBP = new MBPartner(getCtx(), counterC_BPartner_ID, null);\n MOrgInfo counterOrgInfo = MOrgInfo.get(getCtx(), counterAD_Org_ID);\n log.info(\"Counter BP=\" + counterBP.getName());\n\n //\tDocument Type\n int C_DocTypeTarget_ID = 0;\n MDocTypeCounter counterDT = MDocTypeCounter.getCounterDocType(getCtx(), getC_DocType_ID());\n if (counterDT != null) {\n log.fine(counterDT.toString());\n if (!counterDT.isCreateCounter() || !counterDT.isValid()) {\n return null;\n }\n C_DocTypeTarget_ID = counterDT.getCounter_C_DocType_ID();\n } else //\tindirect\n {\n C_DocTypeTarget_ID = MDocTypeCounter.getCounterDocType_ID(getCtx(), getC_DocType_ID());\n log.fine(\"Indirect C_DocTypeTarget_ID=\" + C_DocTypeTarget_ID);\n if (C_DocTypeTarget_ID <= 0) {\n return null;\n }\n }\n\n //\tDeep Copy\n MPayment counter = new MPayment(getCtx(), 0, get_TrxName());\n counter.setAD_Org_ID(counterAD_Org_ID);\n counter.setC_BPartner_ID(counterBP.getC_BPartner_ID());\n counter.setIsReceipt(!isReceipt());\n counter.setC_DocType_ID(C_DocTypeTarget_ID);\n counter.setTrxType(getTrxType());\n counter.setTenderType(getTenderType());\n //\n counter.setPayAmt(getPayAmt());\n counter.setDiscountAmt(getDiscountAmt());\n counter.setTaxAmt(getTaxAmt());\n counter.setWriteOffAmt(getWriteOffAmt());\n counter.setIsOverUnderPayment(isOverUnderPayment());\n counter.setOverUnderAmt(getOverUnderAmt());\n counter.setC_Currency_ID(getC_Currency_ID());\n counter.setC_ConversionType_ID(getC_ConversionType_ID());\n //\n counter.setDateTrx(getDateTrx());\n counter.setDateAcct(getDateAcct());\n counter.setRef_Payment_ID(getC_Payment_ID());\n //\n String sql = \"SELECT C_BankAccount_ID FROM C_BankAccount \"\n + \"WHERE C_Currency_ID=? AND AD_Org_ID IN (0,?) AND IsActive='Y' \"\n + \"ORDER BY IsDefault DESC\";\n int C_BankAccount_ID = DB.getSQLValue(get_TrxName(), sql, getC_Currency_ID(), counterAD_Org_ID);\n counter.setC_BankAccount_ID(C_BankAccount_ID);\n\n //\tRefernces\n counter.setC_Activity_ID(getC_Activity_ID());\n counter.setC_Campaign_ID(getC_Campaign_ID());\n counter.setC_Project_ID(getC_Project_ID());\n counter.setUser1_ID(getUser1_ID());\n counter.setUser2_ID(getUser2_ID());\n counter.save(get_TrxName());\n log.fine(counter.toString());\n setRef_Payment_ID(counter.getC_Payment_ID());\n\n //\tDocument Action\n if (counterDT != null) {\n if (counterDT.getDocAction() != null) {\n counter.setDocAction(counterDT.getDocAction());\n counter.processIt(counterDT.getDocAction());\n counter.save(get_TrxName());\n }\n }\n return counter;\n }", "public EnumFactory() {\n countKeys = new int[EnumFactory.numberOfTypes];\n clearCounts();\n }", "private ServiceFactory() {}", "public HitCounter() {\n q = new ArrayDeque();\n PERIOD = 300;\n }", "public static int getIdCounter() {\n return idCounter;\n }", "public synchronized static Incremental getInstance1() {\n\t\tif (instance == null) {\n\t\t\tinstance = new Incremental();\n\t\t}\n\t\treturn instance;\n\t}", "private PerksFactory() {\n\n\t}", "CloudwatchFactory getCloudwatchFactory();", "private SingletonThreadSafeExample(){\n this.invoke++;\n }", "private static O11y create(\n Context context, CounterFactory counterFactory, DistributionFactory distributionFactory) {\n return new O11y(\n // throttlingMs is a special counter used by dataflow. When we are having to throttle,\n // we signal to dataflow that fact by adding to this counter.\n // Signaling to dataflow is important so that a bundle isn't categorised as hung.\n counterFactory.get(context.getNamespace(), \"throttlingMs\"),\n // metrics specific to each rpc\n counterFactory.get(context.getNamespace(), \"rpc_failures\"),\n counterFactory.get(context.getNamespace(), \"rpc_successes\"),\n counterFactory.get(context.getNamespace(), \"rpc_streamValueReceived\"),\n distributionFactory.get(context.getNamespace(), \"rpc_durationMs\"),\n // qos wide metrics\n distributionFactory.get(RpcQos.class.getName(), \"qos_write_latencyPerDocumentMs\"),\n distributionFactory.get(RpcQos.class.getName(), \"qos_write_batchCapacityCount\"));\n }", "public Integer getCounter() {\n return counter;\n }", "public void initializeInstance() {\n instanceLife = new Timer();\n }", "public SynchronizedCounter(int count) {\n\t\tthis.count = count;\n\t}", "public static CountManager getCountManager() {\n return countManager;\n }", "public Counter(int initial, String name, String comment, String date){\n value = initial;\n this.name = name;\n this.comment = comment;\n this.date = date;\n this.inital_value=initial;\n\n }", "private SingletonSample() {}", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public IntHolder() {\r\n\t}", "public BasicCalculator() {\n // Initialization here.\n // this.count = 0;\n\n }", "public HitCounter() {\n map = new HashMap<Integer, Integer>();\n }", "GlobalVariable getCycleCounterVariable();", "private Singleton() { }", "private LoggerSingleton() {\n\n }", "public static void main(String[] args) {\n int objectCount;\n //Now let create 4 instances of the countable class\n\n Countable obj1 = new Countable();\n Countable obj2 = new Countable();\n Countable obj3 = new Countable();\n Countable obj4 = new Countable();\n\n //Get the number of instances from\n //the class's static field\n\n objectCount = obj1.getInstanceCount(); //Here is the note it does not matter which obj1 or obj2 or obj3 or\n //obj4 assign objectCount. Result will be same\n System.out.println(objectCount + \" instances of the class were created.\");\n\n\n }", "private FixtureCache() {\n\t}", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public Singleton(){\n userID = 1;\n reportID = 1;\n purityReportID = 1;\n c = Calendar.getInstance();\n dateTime = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n dateTime.format(c.getTime());\n }", "long getInstanceID();", "public AtomicLong getCounter() {\n return counter;\n }", "private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }", "private WordCounting() {\r\n }", "private SingletonEager(){\n \n }", "public void incCounter(){\n counter++;\n }", "@Override\n\tpublic int getCounter() {\n\t\treturn counter;\n\t}", "public HitCounter() {\n q = new ArrayDeque();\n map = new HashMap();\n PERIOD = 300;\n hits = 0;\n }", "public static VersionFactory getInstance() {\n\t\treturn SingletonHolder.versionFactory;\n\t}", "private LOCFacade() {\r\n\r\n\t}", "private ResourceFactory() {\r\n\t}", "MeterProvider create();", "public ClickCounter() {\n System.out.println(\"Click constructor: \" + count);\n \n }", "public int counter (){\n return currentID;\n }", "public static int performanceCountGet() { return 0; }", "private Singleton(){}", "Meter createMeter();", "static IterV<String, Integer> counter() {\n return cont(count.f(0));\n }", "MetricsFactory getMetricsFactory();", "private SingletonClass() {\n x = 10;\n }" ]
[ "0.7033099", "0.6933636", "0.69097227", "0.6756804", "0.6743474", "0.66773164", "0.6569733", "0.64622676", "0.6440722", "0.64278567", "0.64250094", "0.6398695", "0.6375435", "0.6369556", "0.63423145", "0.6338408", "0.6336231", "0.63052243", "0.6300268", "0.6267882", "0.6264104", "0.6264104", "0.6256794", "0.62425494", "0.61779016", "0.61646134", "0.615828", "0.6147891", "0.61441267", "0.61435044", "0.6126556", "0.6116551", "0.60911304", "0.60911304", "0.6062116", "0.60480577", "0.60215396", "0.6019209", "0.60091984", "0.59928966", "0.5981619", "0.59763736", "0.5951573", "0.5943229", "0.58994496", "0.588601", "0.58639854", "0.5860554", "0.58558136", "0.5850454", "0.58464247", "0.58326113", "0.5830964", "0.5809548", "0.57950807", "0.5794624", "0.57874155", "0.57868534", "0.577938", "0.5777676", "0.57726014", "0.57669306", "0.5765769", "0.57610697", "0.5752399", "0.5745226", "0.57326245", "0.5730645", "0.5730167", "0.5729034", "0.5723333", "0.572273", "0.5707916", "0.57047224", "0.57035047", "0.5702744", "0.56962186", "0.5689657", "0.5670094", "0.5670094", "0.56661373", "0.56641304", "0.56625646", "0.5657064", "0.56473744", "0.56421244", "0.5635413", "0.56327504", "0.5631834", "0.5620502", "0.5619504", "0.5614625", "0.56139106", "0.5609425", "0.56037134", "0.55994344", "0.55948496", "0.5592743", "0.55902475", "0.55738455", "0.5568334" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_login, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79046476", "0.7805623", "0.7766615", "0.77274555", "0.7632045", "0.76220745", "0.75848633", "0.7531134", "0.74884325", "0.74575055", "0.74575055", "0.74388313", "0.74218154", "0.7403308", "0.7391667", "0.7386889", "0.73792624", "0.73705244", "0.7362704", "0.7355958", "0.73457336", "0.73412824", "0.73301464", "0.73288566", "0.73257905", "0.7318758", "0.7316527", "0.7313703", "0.7304158", "0.7304158", "0.7302085", "0.72983634", "0.7293686", "0.72866", "0.7283303", "0.728145", "0.72787505", "0.7260023", "0.7260023", "0.7260023", "0.7259934", "0.72594047", "0.7249977", "0.72246146", "0.7219595", "0.72166914", "0.7204287", "0.72013676", "0.72004634", "0.71934885", "0.7185269", "0.7177778", "0.71687645", "0.7167653", "0.71539253", "0.7153525", "0.7136213", "0.7134901", "0.7134901", "0.7129261", "0.7129006", "0.71241", "0.712339", "0.71232814", "0.71220535", "0.7117341", "0.7117331", "0.7117331", "0.7117331", "0.7117331", "0.71168953", "0.71166164", "0.71150327", "0.71121156", "0.71098715", "0.7108862", "0.7105525", "0.7099833", "0.7098193", "0.7095489", "0.709369", "0.709369", "0.70865035", "0.7083285", "0.70810497", "0.70802194", "0.70737916", "0.7068235", "0.70619094", "0.70604193", "0.7060166", "0.7051441", "0.70377", "0.70377", "0.7035963", "0.703536", "0.703536", "0.70326227", "0.703064", "0.70297664", "0.7018773" ]
0.0
-1
private int x, y;
public MyView(Context context) { super(context); paint = new Paint(paint.ANTI_ALIAS_FLAG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getY() { return y;}", "public int getY() { return y;}", "public int getX(){ return xPosition; }", "public int getY() {return y;}", "Point(int x_, int y_){\n x = x_;\n y = y_;\n }", "public int getY() { return y; }", "public int getY() { return y; }", "void setXandY(double x, double y){\r\n\t\tthis.x=x;\r\n\t\tthis.y=y;\r\n\t}", "public int getY(){ return yPosition; }", "public int getX(){return this.x;}", "posXY(int x, int y){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "public int getY() { return (int)y; }", "public int getY(){\n return y;\n }", "public int getY(){\n return y;\n }", "public int getY(){\n return y;\n }", "public int getY()\n {\n \t return _y;\n }", "double getY() { return pos[1]; }", "public int getXY(int x, int y);", "int getX_coordinate(){\n return x_coordinate;\n }", "public int getX() {return x;}", "public int getX() {return x;}", "public Coordinates(int x, int y){\n this.x = x;\n this.y = y;\n }", "public int getX() { return x;}", "public int getX() { return x;}", "public final int getY()\n{\n\treturn _y;\n}", "public void set(int x, int y)\r\n\t{\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "int getY_coordinate(){\n return y_coordinate;\n }", "public void setY(int y) { this.y=y; }", "public final int getX()\n{\n\treturn _x;\n}", "public int getY() {\n return y;\n }", "public int getY() {\n return y;\n }", "public Point(int x, int y){\n this.x = x;\n this.y = y;\n }", "int getY() {\n return yPos;\n }", "public VariablePoint2(){\n super(0, 0);\n x = 0;\n y = 0;\n }", "public int getY(){\n return this.y;\n }", "public int getY(){\n return this.y;\n }", "public int getY(){\n return this.y;\n }", "public int getX() { return x; }", "public int getX() { return x; }", "public int getX() { return x; }", "int getY() {\n return y;\n }", "int getY() {\n return y;\n }", "int getY() {\n return y;\n }", "int getX() {\n return xPos;\n }", "public int getX() { return loc.x; }", "public float getPosY(){return py;}", "public int getX()\n {\n \t return _x;\n }", "public int getPoint(){\n return point;\n }", "public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public Coordinate(int x,int y)\n {\n this.x = x;\n this.y = y;\n }", "float getY() {\n return _y;\n }", "public double getY() { return y; }", "public Entity( int x, int y){\n this.x = x;\n this.y = y;\n }", "public double getY(){\n return y;\n }", "public int getY()\n {\n return y;\n }", "public int getY()\n {\n return y;\n }", "public float getX() { return xCoordinate;}", "public int getY()\r\n {\r\n return myY;\r\n }", "int getY();", "int getY();", "int getY();", "int getY();", "int getY();", "public double getY(){\r\n return y;\r\n }", "public int getY(){\n return this.position[1];\n }", "public float getY(){\n return y;\n }", "public int getY() { return loc.y; }", "public int getX(){\n return this.x;\n }", "public int getX(){\n return this.x;\n }", "public int getX(){\n return this.x;\n }", "public Piste(int x, int y){\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t}", "public int getX() { return position.x; }", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "public float getPosX(){return px;}", "public int getX(){\n return x;\n }", "public int getX(){\n return x;\n }", "public int getX(){\n return x;\n }", "public Coordinates(int x, int y)\r\n {\r\n xCoord = x;\r\n yCoord = y;\r\n }", "public Position2D(double x, double y) {\n this.x = x;\n this.y = y;\n }", "public double get(int y, int x);", "public void setSijainti(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public int getX() {\n\treturn baseXCoord;\n}", "public void setPosition(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public int getX()\r\n {\r\n return xCoord;\r\n }", "public void set(double x, double y) {\n \n _x = x;\n _y = y;\n \n }", "public int getY() {\n return y;\r\n }", "public void setPoint(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public void setPosicion(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\n return x;\n }", "public int getX() {\r\n return xpos;\r\n }", "private SquareCoordinate(int x, int y)\n {\n \tthis.x = x;\n \tthis.y = y;\n }", "public Ponto(int x, int y){\n this.x = x;\n this.y = y;\n }", "public int getY() {\n return this.y;\n }", "public Point(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }", "public VariablePoint2(double x, double y){\n super(x, y);\n this.x = x;\n this.y = y;\n }", "public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }", "public Point2Dd (int x, int y){\r\n this.x = (double)x;\r\n this.y = (double)y;\r\n }", "public int getY() {\r\n return ypos;\r\n }", "public int getLocY ()\n {\n return locY;\n }" ]
[ "0.740175", "0.740175", "0.7378016", "0.725847", "0.72361976", "0.7215639", "0.7215639", "0.7206225", "0.71672773", "0.7160915", "0.7109168", "0.70415866", "0.70257163", "0.70257163", "0.70257163", "0.70088816", "0.69832575", "0.6964582", "0.6960446", "0.69488585", "0.69488585", "0.69340724", "0.6904447", "0.6904447", "0.6872056", "0.6865346", "0.6835504", "0.6833174", "0.6813984", "0.6804584", "0.6804584", "0.68029976", "0.6784989", "0.6777426", "0.6755208", "0.6755208", "0.6755208", "0.6752106", "0.6752106", "0.6752106", "0.67423964", "0.67423964", "0.67423964", "0.673183", "0.66984737", "0.66917354", "0.6688777", "0.6663351", "0.6659981", "0.66593236", "0.66521454", "0.6642817", "0.6642811", "0.6640915", "0.6634681", "0.6634681", "0.6628445", "0.6625666", "0.66217554", "0.66217554", "0.66217554", "0.66217554", "0.66217554", "0.6617435", "0.6595906", "0.65918636", "0.6591555", "0.6590784", "0.6590784", "0.6590784", "0.6589324", "0.6586092", "0.65836424", "0.65762055", "0.65683115", "0.65683115", "0.65683115", "0.65637136", "0.6556464", "0.6545435", "0.6538669", "0.65349025", "0.65267444", "0.6525363", "0.6520727", "0.6518123", "0.6518119", "0.65168315", "0.6508346", "0.6508346", "0.6508346", "0.65042615", "0.64985657", "0.6491957", "0.6487004", "0.6480488", "0.6474761", "0.64579487", "0.64534", "0.64517933", "0.64507085" ]
0.0
-1
TODO Autogenerated method stub getAnnotations("Melanoma is a malignant tumor of melanocytes which+are found predominantly in skin but also in the bowel and the+eye") ;
public static void main(String[] args) throws IOException, ParseException { getAvaluation() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DataMap getCustomAnnotations();", "Set<String> annotations();", "public abstract Annotations mo30682c();", "public String getAnnotation();", "public static Map<String, Integer> getAnnotations(String text) throws IOException, ParseException\n\t{\n\t \tMap<String, Integer> concepts = new HashMap<String, Integer>();\n\t\tString request = URL + URLEncoder.encode(text, \"UTF-8\") ; ; \n\t\tString jRespond= restcalls.get(request,apikey) ;\n\t\tSystem.out.println(jRespond);\n\t\t\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = parser.parse(jRespond) ;\n\t\tJSONArray msgs = (JSONArray) obj;\n\t\tIterator item = msgs.iterator();\n\n\t\t // take each value from the json array separately\n\t while (item.hasNext()) \n\t {\n\t \tJSONObject innerObj = (JSONObject) item.next();\n\t \tJSONArray msg = (JSONArray) innerObj.get(\"annotations\") ;\n\t \tSystem.out.println(msg.toString());\n\n\t Iterator iterator = msg.iterator();\n\t while (iterator.hasNext()) \n\t {\n\t \tJSONObject annotinnerObj = (JSONObject) iterator.next();\n\t System.out.println(annotinnerObj.get(\"matchType\").toString());\n\t // if (annotinnerObj.get(\"matchType\").toString().equals(\"PREF\"))\n\t {\n\t \tconcepts.put(annotinnerObj.get(\"text\").toString(), 1) ;\n\t }\n \n\t }\n\n\t }\n\t \n\t return concepts ;\n\t\t\n\t}", "@PropertyGetter(role = ANNOTATION)\n\tList<CtAnnotation<? extends Annotation>> getAnnotations();", "public String getAnnotations() {\n\t\treturn annotations;\n\t}", "@Override\n\tpublic Annotation[] getAnnotations() {\n\t\treturn null;\n\t}", "@Word(word = \"First\", value = 1) \n\t public static void newMethod(){ \n\t\t FullAnnotationProgram obj = new FullAnnotationProgram(); \n\n\t try{ \n\t Class<?> c = obj.getClass(); \n\n\t // Obtain the annotation for newMethod \n\t Method m = c.getMethod(\"newMethod\"); \n\t \n\t // Display the full annotation \n\t Annotation anno = m.getAnnotation(CustomRepeatAnnots.class); \n\t System.out.println(anno); \n\t }catch (NoSuchMethodException e){ \n\t System.out.println(e); \n\t } \n\t }", "int getAnnotationsLimit();", "public ElementList[] getAnnotations() {\r\n return union.value();\r\n }", "public org.tigr.microarray.mev.cgh.CGHDataObj.ICGHDataRegion[][] getAnnotations();", "public final Set<Annotation> annotations() throws RecognitionException {\n Set<Annotation> annotations = null;\n\n\n Annotation annotation201 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1219:3: ( ^( I_ANNOTATIONS ( annotation )* ) )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1219:5: ^( I_ANNOTATIONS ( annotation )* )\n {\n HashMap<String, Annotation> annotationMap = Maps.newHashMap();\n match(input, I_ANNOTATIONS, FOLLOW_I_ANNOTATIONS_in_annotations3421);\n if (input.LA(1) == Token.DOWN) {\n match(input, Token.DOWN, null);\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1220:21: ( annotation )*\n loop39:\n while (true) {\n int alt39 = 2;\n int LA39_0 = input.LA(1);\n if ((LA39_0 == I_ANNOTATION)) {\n alt39 = 1;\n }\n\n switch (alt39) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1220:22: annotation\n {\n pushFollow(FOLLOW_annotation_in_annotations3424);\n annotation201 = annotation();\n state._fsp--;\n\n\n Annotation anno = annotation201;\n Annotation old = annotationMap.put(anno.getType(), anno);\n if (old != null) {\n throw new SemanticException(input, \"Multiple annotations of type %s\", anno.getType());\n }\n\n }\n break;\n\n default:\n break loop39;\n }\n }\n\n match(input, Token.UP, null);\n }\n\n\n if (annotationMap.size() > 0) {\n annotations = ImmutableSet.copyOf(annotationMap.values());\n }\n\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return annotations;\n }", "public Element[] getAnnotations() {\r\n return union.value();\r\n }", "public ElementMap[] getAnnotations() {\r\n return union.value();\r\n }", "@Test\n public void InternalNLP_annotate_doesAnnotate() {\n ExtractedText extractedText = null;\n\n String fileUri = \"dummyUri\";\n String fileRef = \"src/test/res/Pasta.txt\";\n File file = new File(fileRef);\n try {\n InputStream inputStream = new FileInputStream(file);\n extractedText = mInternalTextProcessor.processFile(inputStream, fileUri, fileRef\n , \"txt\", false);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (FileTypeNotSupportedException e) {\n e.printStackTrace();\n } catch (DocumentNotSupportedException e) {\n e.printStackTrace();\n }\n\n // Annotate\n mInternalNLP.annotate(extractedText);\n\n if(!extractedText.getTitle().isEmpty()) {\n Assert.assertNotNull(extractedText.getTitleAnnotation());\n }\n\n for (Section section: extractedText.getSections()) {\n if(!section.getBody().isEmpty()) {\n Assert.assertNotNull(section.getBodyAnnotation());\n }\n if(!section.getTitle().isEmpty()) {\n Assert.assertNotNull(section.getTitleAnnotation());\n }\n }\n }", "Annotation getAnnotation();", "public Annotations getAnnotations() {\n\t\treturn annotations;\n\t}", "protected void createMappingAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/MNoE/CapellaLike/Mapping\";\t\n\t\taddAnnotation\n\t\t (blockArchitecturePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Package\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which RequirementsPkg stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which AbstractCapabilityPkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which InterfacePkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which DataPkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisionedArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisioningArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatedArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatingArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::BehavioredClassifier\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"Descendants are mapped to SysML::Blocks::Block, which cannot contain a Package.\\r\\nTherefore, store these AbstractCapabilityPackages in the nearest available package.\",\n\t\t\t \"constraints\", \"Multiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which InterfacePkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which DataPkg stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [0..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedStateMachines(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::BehavioredClassifier::ownedBehavior\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::BehavioredClassifier::ownedBehavior elements on which StateMachine stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Class\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::NamedElement::clientDependency elements on which InterfaceUse stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::BehavioredClassifier::interfaceRealization\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Order must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisionedComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisioningComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"SysML::Blocks::Block cannot contain PhysicalPath\\'s equivalent, hence we find the nearest available package to store them.\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::StructuredClassifier::ownedConnector\",\n\t\t\t \"explanation\", \"since PhysicalLink is mapped to uml::Connector\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractActorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"SysML::Blocks::Block\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"should be mapped to uml::Property, but one of its concrete ancestors already is (Property), so avoid redefining it\\r\\nat this level to avoid profile generation issue\",\n\t\t\t \"constraints\", \"information::Property must have as base metaclass uml::Property\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_OwnedDeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Realization\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatedArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatingArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::ComponentRealization or uml::InterfaceRealization regarding the baseMetaClass of the realized element\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatingComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataType(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Package\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which Interface stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Package::nestedPackage#uml::Package::packagedElement\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Package::nestedPackage elements on which InterfacePkg stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Interface\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Opposite reference of uml::InterfaceRealization::contract\",\n\t\t\t \"constraints\", \"uml::Element::ownedElement elements on which InterfaceImplementation stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Opposite reference of uml::Dependency::supplier\",\n\t\t\t \"constraints\", \"uml::Element::ownedElement elements on which InterfaceUse stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvisioningInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_OwnedExchangeItemAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::InterfaceRealization\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::InterfaceRealization::contract\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Usage\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::client\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::supplier\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Multiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::InterfaceRealization\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::InterfaceRealization::contract\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Usage\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::supplier\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Dependency::supplier elements on which Interface stereotype or any stereotype that inherits from it is applied\\r\\nMultiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatingInterfaceAllocator(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocatorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Classifier\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_OwnedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Some elements on which InterfaceAllocation stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_ProvisionedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_AllocatedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Dependency\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Dependency\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentContextEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (exchangeItemAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Realization\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_SendProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_ReceiveProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatedItem(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatingInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deployableElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::NamedElement\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Opposite reference of uml::Dependency::supplier\",\n\t\t\t \"constraints\", \"Order must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deploymentTargetEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::DeploymentTarget\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::NamedElement::clientDependency\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::DeploymentTarget::deployment elements on which AbstractDeployment stereotype or any stereotype that inherits from it is applied\\r\\nOrder must be computed\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractDeploymentLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"uml::Dependency,could be mapped on uml::Deployment, but dependencies diagram allows to \\\"deploy\\\" more capella element types.\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::supplier\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"Multiplicity must be [1..1]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Dependency::client\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::Dependency::client elements on which DeploymentTarget stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPathInvolvedElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalArtifactEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalPathLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Connector\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_LinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::specific\",\n\t\t\t \"explanation\", \"first need to create ConnectorEnds pointing to the Ports, and then reference them in uml::Connector::end\",\n\t\t\t \"constraints\", \"cardinality must be [2..2]\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedComponentExchangeFunctionalExchangeAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::nearestpackage\",\n\t\t\t \"explanation\", \"Elements are contained in the nearest possible parent container.\",\n\t\t\t \"constraints\", \"some elements on which ComponentFunctionalExchangeAllocation stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::Connector::end\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::ConnectorEnd\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::ConnectorEnd::role\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"uml::ConnectorEnd::role elements on which PhysicalPort stereotype or any stereotype that inherits from it is applied\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"uml::ConnectorEnd::partWithPort\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"uml::Class\",\n\t\t\t \"explanation\", \"_todo_\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_NextInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathReferenceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"SysML::PortAndFlows::FlowPort\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_OwnedPhysicalPortRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"keyword::none\",\n\t\t\t \"explanation\", \"Derived and transient\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"UML/SysML semantic equivalences\", \"\",\n\t\t\t \"base metaclass in UML/SysML profile \", \"none\",\n\t\t\t \"explanation\", \"none\",\n\t\t\t \"constraints\", \"none\"\n\t\t });\n\t}", "@Override\n\tpublic Set<String> getAnnotations(OWLEntity cpt) {\n\t\treturn new HashSet<String>();\n\t}", "public interface Annotation {\n\t\n\t/** Return the unique ID associated with the annotation */\n\tpublic String getId();\n\n\t/** Return the type of the annotation (such as \"laughter\", \"speaker\") according to Alveo */\n\tpublic String getType();\n\n\t/** Return the label assigned to the annotation\n\t */\n\tpublic String getLabel();\n\n\t/** Return the start offset of the annotation\n\t */\n\tpublic double getStart();\n\n\t/** Return the end offset of the annotation\n\t */\n\tpublic double getEnd();\n\n\t/** Return the <a href=\"http://www.w3.org/TR/json-ld/#typed-values\">JSON-LD value type</a>\n\t */\n\tpublic String getValueType();\n\n\t/** Return a mapping containing URIs as keys corresponding to fields, and their matching values\n\t * This is used for converting to and from JSON\n\t *\n\t * The URIs correspond to JSON-LD URIs and therefore also to RDF predicate URIs on the server side\n\t *\n\t * @return a URI to value mapping\n\t */\n\tpublic Map<String, Object> uriToValueMap();\n\n\tpublic Document getAnnotationTarget();\n\n\n}", "public List<Annotation> getAnnotations() {\n return this.annotations.obtainAll();\n }", "int getLabelAnnotationsCount();", "int getLabelAnnotationsCount();", "public abstract Annotations getClassAnnotations();", "public abstract AnnotationMap mo30683d();", "Set<? extends Class<? extends Annotation>> annotations();", "protected void createSemanticAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/semantic\";\t\n\t\taddAnnotation\n\t\t (this, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedStateMachines(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinkCategories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_OwnedAbstractType(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_OwnedExchangeItemAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (exchangeItemAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_SendProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_ReceiveProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatedItem(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_LinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_Categories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizingPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkCategoryEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkCategory_Links(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizedPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizingPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_NextInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathReferenceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizingPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\n\t}", "@Override\r\n public void annotate(Annotation annotation) {\r\n// System.out.println(\"Tokens\");\r\n// for(CoreLabel token : annotation.get(CoreAnnotations.TokensAnnotation.class)){\r\n for(int i=0;i<annotation.get(CoreAnnotations.TokensAnnotation.class).size();i++){\r\n CoreLabel token = annotation.get(CoreAnnotations.TokensAnnotation.class).get(i);\r\n// System.out.println(token.word() +\", tokenIndex = \"+i);\r\n if(token.word().equals(sch)) {\r\n// positions.add(token.index());\r\n token.set(SearchAnnotation.class,i); //index of the token is saved\r\n\r\n }\r\n }\r\n }", "protected void createMimoentslotAnnotations() {\n\t\tString source = \"mimo-ent-slot\";\n\t\taddAnnotation\n\t\t (getPartyQual_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_PartyQualType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_Status(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Status e.g. completed, part-time etc.\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_Title(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Title of degree or job\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_VerifStatus(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Verification done for this entry if any\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartySkill_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartySkill_SkillType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_EmployeeParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_EmployeeRoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_PerfReviewId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_EmployeeParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_EmployeeRoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_PerfReviewId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_PerfReviewItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_RoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_TrainingClassType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t}", "public List<Annotation> getAnnotations() {\r\n\t\treturn rootAnnotations;\r\n\t}", "public XSObjectList getAnnotations() {\n\treturn (fAnnotations != null) ? fAnnotations : XSObjectListImpl.EMPTY_LIST;\n }", "@Override\r\n\tpublic Annotation annotate() {\n\t\treturn null;\r\n\t}", "public static List<String> computeDisplayAnnotations(VisualizerInput input,\n Class<? extends SNode> type) {\n if (input == null) {\n return new LinkedList<String>();\n }\n\n SDocumentGraph graph = input.getDocument().getSDocumentGraph();\n\n Set<String> annoPool = SToken.class.isAssignableFrom(type) ?\n getAnnotationLevelSet(graph, null, type)\n : getAnnotationLevelSet(graph, input.getNamespace(), type);\n List<String> annos = new LinkedList<String>(annoPool);\n\n String annosConfiguration = input.getMappings().getProperty(\n MAPPING_ANNOS_KEY);\n if (annosConfiguration != null && annosConfiguration.trim().length() > 0) {\n String[] split = annosConfiguration.split(\",\");\n annos.clear();\n for (String s : split) {\n s = s.trim();\n // is regular expression?\n if (s.startsWith(\"/\") && s.endsWith(\"/\")) {\n // go over all remaining items in our pool of all annotations and\n // check if they match\n Pattern regex = Pattern.compile(StringUtils.strip(s, \"/\"));\n\n LinkedList<String> matchingAnnos = new LinkedList<String>();\n for (String a : annoPool) {\n if (regex.matcher(a).matches()) {\n matchingAnnos.add(a);\n }\n }\n\n annos.addAll(matchingAnnos);\n annoPool.removeAll(matchingAnnos);\n\n } else {\n annos.add(s);\n annoPool.remove(s);\n }\n }\n }\n\n // filter already found annotation names by regular expression\n // if this was given as mapping\n String regexFilterRaw = input.getMappings().getProperty(\n MAPPING_ANNO_REGEX_KEY);\n if (regexFilterRaw != null) {\n try {\n Pattern regexFilter = Pattern.compile(regexFilterRaw);\n ListIterator<String> itAnnos = annos.listIterator();\n while (itAnnos.hasNext()) {\n String a = itAnnos.next();\n // remove entry if not matching\n if (!regexFilter.matcher(a).matches()) {\n itAnnos.remove();\n }\n }\n } catch (PatternSyntaxException ex) {\n log.\n warn(\"invalid regular expression in mapping for grid visualizer\",\n ex);\n }\n }\n return annos;\n }", "int getAnnotationCount();", "public void setAnnotations(String Annotations) {\n this.Annotations.add(Annotations);\n }", "protected void createMimoentformatAnnotations() {\n\t\tString source = \"mimo-ent-format\";\n\t\taddAnnotation\n\t\t (getPartyQual_QualificationDesc(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQual_Title(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQualType_PartyQualTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyQualType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyResume_ResumeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartyResume_ResumeText(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"255\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartySkill_Rating(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"precision\", \"20\",\n\t\t\t \"scale\", \"0\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartySkill_SkillLevel(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"precision\", \"20\",\n\t\t\t \"scale\", \"0\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPartySkill_YearsExperience(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"precision\", \"20\",\n\t\t\t \"scale\", \"0\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfRatingType_PerfRatingTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfRatingType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_EmployeeRoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_PerfReviewId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_Comments(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"comment\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReview_ManagerRoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_EmployeeRoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_PerfReviewId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_PerfReviewItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItem_Comments(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"comment\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItemType_PerfReviewItemTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerfReviewItemType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_RoleTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPerformanceNote_Comments(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"comment\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_ApprovalStatus(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getPersonTraining_Reason(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getResponsibilityType_ResponsibilityTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getResponsibilityType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getSkillType_SkillTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getSkillType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getTrainingClassType_TrainingClassTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getTrainingClassType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t}", "protected void createBusinessInformationAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/BusinessInformation\";\t\n\t\taddAnnotation\n\t\t (blockArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"BlockArchitecture\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedRequirementPkgs\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedAspectPkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedInterfacePkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedDataPkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"Block\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"aspectPkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedInterfacePkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedDataPkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ComponentArchitecture\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedInterfaceUses\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"usedInterfaceLinks\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"usedInterfaces\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"realizedInterfaceLinks\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"implementedInterfaces\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"providedInterfaces\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"requiredInterfaces\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractActorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"AbstractActor\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"PhysicalPart\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"providedInterfaces\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"requiredInterfaces\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ArchitectureAllocation\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ComponentAllocation\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"SystemComponent\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"participationsInCapabilityRealizations\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"InterfacePkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ownedInterfaces\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"subInterfacePkgs\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"Interface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"implementorComponents\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"userComponents\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"interfaceImplementations\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"interfaceUses\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"InterfaceImplementation\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"Interface Implementor\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"realizedInterface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"InterfaceUse\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"interfaceUser\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"usedInterface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ProvidedInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"interface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"RequiredInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"interface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"ActorCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"SystemComponentCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deployableElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"DeployableElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"deployingLinks\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deploymentTargetEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"DeploymentTarget\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"deployments\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractDeploymentLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"AbstractDeployement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"deployedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"location\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"PhysicalLinkEnd\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"port\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"Label\", \"part\"\n\t\t });\n\t}", "public void setAnnotations(Annotations annotations) {\n\t\tthis.annotations = annotations;\n\t}", "public AnnotationJava[] getAnnotations() {\n\t\treturn annotations;\n\t}", "protected void createDocumentationAnnotations() {\n\t\tString source = \"http://www.polarsys.org/kitalpha/ecore/documentation\";\t\n\t\taddAnnotation\n\t\t (this, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"CompositeStructure aims at defining the common component approach composite structure pattern language (close to the UML Composite structure).\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"none\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"none\",\n\t\t\t \"constraints\", \"This package depends on the model FunctionalAnalysis.ecore\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockArchitecturePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Container package for BlockArchitecture elements\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Parent class for deriving specific architectures for each design phase\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"n/a\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to packages that contain requirements\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to packages that contain capabilities\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to packages that contain interfaces\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to packages that contain data\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisionedArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) list of allocation links to other architectures\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisioningArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) list of allocation links from other architectures to this one\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatedArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the BlockArchitectures that are allocated from this one\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatingArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to BlockArchitectures that allocate to this architecture\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"A modular unit that describes the structure of a system or element.\\r\\n[source: SysML specification v1.1]\",\n\t\t\t \"usage guideline\", \"n/a (abstract)\",\n\t\t\t \"used in levels\", \"n/a (abstract)\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to packages that contain capabilities\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to packages that contain interfaces\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to packages that contain data\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedStateMachines(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Link to related state machines\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"A specialized kind of BlockArchitecture, serving as a parent class for the various architecture levels, from System analysis down to EPBS architecture\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"N/A (abstract)\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"An entity, with discrete structure within the system, that interacts with other Components of the system, thereby contributing at its lowest level to the system properties and characteristics.\\r\\n[source: Sys EM , ISO/IEC CD 15288]\",\n\t\t\t \"arcadia_description\", \"A component is a constituent part of the system, contributing to its behaviour, by interacting with other components and external actors, thereby contributing at its lowest level to the system properties and characteristics. Example: radio receiver, graphical user interface...\\r\\nDifferent kinds of components exist: see below (logical component, physical component...).\",\n\t\t\t \"usage guideline\", \"none\",\n\t\t\t \"used in levels\", \"n/a (abstract)\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"InterfaceUse relationships that are stored/owned under this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) interfaceUse relationships that involve this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the Interfaces being used by this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Interface implementation relationships that are stored/owned under this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) list of InterfaceImplementation links that involve this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the Interfaces being implemented by this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisionedComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) list of allocation links made from this component to other components\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisioningComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) list of allocation links from other components, to this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the components being allocated from this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the components allocating this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the Interfaces being provided by this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the Interfaces being required by this component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the PhysicalPaths that are stored/owned by this physical component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Physical links contained in / owned by this Physical component\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinkCategories(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractActorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"An Actor models a type of role played by an entity that interacts with the subject (e.g., by exchanging signals and data),\\r\\nbut which is external to the subject (i.e., in the sense that an instance of an actor is not a part of the instance of its corresponding subject). \\r\\n\\r\\nActors may represent roles played by human users, external hardware, or other subjects.\\r\\nNote that an actor does not necessarily represent a specific physical entity but merely a particular facet (i.e., \\'role\\') of some entity\\r\\nthat is relevant to the specification of its associated use cases. Thus, a single physical instance may play the role of\\r\\nseveral different actors and, conversely, a given actor may be played by multiple different instances.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"usage guideline\", \"none\",\n\t\t\t \"used in levels\", \"n/a (abstract)\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"In SysML, a Part is an owned property of a Block\\r\\n[source: SysML glossary for SysML v1.0]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(computed) the provided interfaces associated to the classifier that this part represents\\r\\n[source: Capella study]\\r\\n\\r\\nThe interfaces that the component exposes to its environment.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(computed) the required interfaces associated to the classifier that this part represents\\r\\n[source: Capella study]\\r\\n\\r\\nThe interfaces that the component requires from other components in its environment in order to be able to offer\\r\\nits full set of provided functionality\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_OwnedDeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Deployment relationships that are stored/owned under this part\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Mediator class between BlockArchitecture elements, to represent an allocation link\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"n/a\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatedArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the allocated architecture\\r\\n[source: Capella study]\\r\\n\\r\\nSpecifies the targets of the DirectedRelationship.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatingArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the allocating architecture\\r\\n[source: Capella study]\\r\\n\\r\\nSpecifies the sources of the DirectedRelationship.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Mediator class between Component elements, representing the allocation link between these elements\\r\\n[source: Capella light-light study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"n/a\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the allocated component\\r\\n[source: Capella study]\\r\\n\\r\\nSpecifies the targets of the DirectedRelationship.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatingComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the allocating component\\r\\n[source: Capella study]\\r\\n\\r\\nSpecifies the targets of the DirectedRelationship.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"An entity, with discrete structure within the system, that interacts with other Components of the system, thereby contributing at its lowest level to the system properties and characteristics.\\r\\n[source: Sys EM , ISO/IEC CD 15288]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"n/a (abstract)\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"specifies whether or not this is a data component\\r\\n[source: Capella light-light study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataType(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"data type(s) associated to this component\\r\\n[source: Capella light-light study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) the involvement relationships between this SystemComponent and CapabilityRealization elements\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"A container for Interface elements\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the interfaces that are owned by this Package\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the packages of interfaces that are owned by this Package\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"An interface is a kind of classifier that represents a declaration of a set of coherent public features and obligations. An\\r\\ninterface specifies a contract; any instance of a classifier that realizes the interface must fulfill that contract.\\r\\n[source: UML superstructure v2.2]\\r\\n\\r\\nInterfaces are defined by functional and physical characteristics that exist at a common boundary with co-functioning items and allow systems, equipment, software, and system data to be compatible.\\r\\n[source: not precised]\\r\\n\\r\\nThat design feature of one piece of equipment that affects a design feature of another piece of equipment. \\r\\nAn interface can extend beyond the physical boundary between two items. (For example, the weight and center of gravity of one item can affect the interfacing item; however, the center of gravity is rarely located at the physical boundary.\\r\\nAn electrical interface generally extends to the first isolating element rather than terminating at a series of connector pins.)\",\n\t\t\t \"usage guideline\", \"In Capella, Interfaces are created to declare the nature of interactions between the System and external actors.\",\n\t\t\t \"used in levels\", \"system/logical/physical\",\n\t\t\t \"usage examples\", \"../img/usage_examples/external_interface_example.png\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"_todo_reviewed : cannot find the meaning of this attribute ? How to fill it ?\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"type\", \"_todo_reviewed : to be precised\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Structural(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"type\", \"n/a\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"references to the components that implement this interface\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"references to the components that use this interface\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"references to the InterfaceImplementation elements, that act as mediators between this interface and its implementers\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"references to the InterfaceUse elements, that act as mediator classes between this interface and its users\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvisioningInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References to the InterfaceAllocation elements, acting as mediator classes between the interface and the elements to which/from which it is allocated\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References to the Interfaces that declare an allocation link to this Interface\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References to the components that declare an allocation link to this Interface\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References to all exchange items allocated by the interface\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_OwnedExchangeItemAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References to allocations of exchange items\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Mediator class between an Interface and its implementor (typically a Component)\\r\\n[source: Capella study]\\r\\n\\r\\nAn InterfaceRealization is a specialized Realization relationship between a Classifier and an Interface. This relationship\\r\\nsignifies that the realizing classifier conforms to the contract specified by the Interface.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References the Component that owns this Interface implementation.\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References the Interface specifying the conformance contract\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Mediator class between an interface and its user (typically a Component)\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Component that uses the interface\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Supplied interface\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(not used)\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"n/a\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"n/a\",\n\t\t\t \"comment/notes\", \"not used/implemented as of Capella 1.0.3\",\n\t\t\t \"reference documentation\", \"n/a\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"References the Interface specifying the conformance contract\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(not used)\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"n/a\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"n/a\",\n\t\t\t \"comment/notes\", \"not used/implemented as of Capella\",\n\t\t\t \"reference documentation\", \"n/a\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"The element(s) independent of the client element(s), in the same respect and the same dependency relationship\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Mediator class between an Interface and an element that allocates to/from it.\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the allocated interface\\r\\n[source: Capella study]\\r\\n\\r\\nSpecifies the targets of the DirectedRelationship.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatingInterfaceAllocator(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Specifies the allocating interface\\r\\n[source: Capella study]\\r\\n\\r\\nSpecifies the sources of the DirectedRelationship.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocatorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Base class for elements that need to be involved in an allocation link to/from an Interface\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical,epbs\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_OwnedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the interface allocation links that are stored/owned under this interface allocator\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_ProvisionedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) the interface allocation links involving this interface allocator\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_AllocatedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"(automatically computed) direct references to the Interfaces being allocated by this interface allocator\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"support class to implement the link between an Actor and a CapabilityRealization\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"system, logical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Support class for implementation of the link between a CapabilityRealization and a SystemComponent\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"logical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentContextEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Base class for specific SystemContext, LogicalContext, PhysicalContext\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a (abstract)\",\n\t\t\t \"used in levels\", \"system,logical,physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (exchangeItemAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Allocation link between exchange items and interface that support them\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_SendProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"describes the default protocol used by the sender of the exchange item. It could be overrided by the protocol used by the given communication exchanger\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"type\", \"refer to CommunicationLinkProtocol definition\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_ReceiveProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"describes the default protocol used by the receiver of the exchange item. It could be overrided by the protocol used by the given communication exchanger\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"type\", \"refer to CommunicationLinkProtocol definition\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatedItem(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the exchange item that is being allocated by the interface\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatingInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the interface that allocated the given exchange item\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deployableElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"characterizes a physical model element that is intended to be deployed on a given (physical) target\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the list of deployment specifications associated to this element, e.g. associations between this element and a physical location to which it is to be deployed\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deploymentTargetEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the physical target that will host a deployable element\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the list of deployment specifications involving this physical target as the destination of the deployment\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractDeploymentLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the link between a physical element, and the physical target onto which it is deployed\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the physical element involved in this relationship, that is to be deployed on the target\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the host where the source element involved in this relationship will be deployed\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPathInvolvedElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"An involved element is a capella element that is, at least, involved in an involvement relationship with the role of the element that is involved\\r\\n[source:Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalArtifactEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"A physical artifact is any physical element in the physical architecture (component, port, link,...).\\r\\nThese artifacts will be part allocated to configuration items in the EPBS.\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"End of a physical link\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Physical links that come in or out of this physical port\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractPhysicalPathLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the base element for building a physical path : a link between two physical interfaces\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the representation of the physical medium connecting two physical interfaces\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_LinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the source(s) and destination(s) of this physical link\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedComponentExchangeFunctionalExchangeAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the allocations between component exchanges and functional exchanges, that are owned by this physical link\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the physical link endpoints involved in this link\\r\\n\\r\\nA connector consists of at least two connector ends, each representing the participation of instances of the classifiers\\r\\ntyping the connectable elements attached to this end. The set of connector ends is ordered.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizingPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"an endpoint of a physical link\\r\\n\\r\\nA connector end is an endpoint of a connector, which attaches the connector to a connectable element. Each connector\\r\\nend is part of one connector.\\r\\n[source: UML superstructure v2.2]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"operational,system,logical,physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the port to which this communication endpoint is attached\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the part to which this connect endpoint is attached\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"n/a\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the specification of a given path of informations flowing across physical links and interfaces.\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"this is the equivalent for the physical architecture, of a functional chain defined at system level\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"the list of steps of this physical path\\r\\n[source: Capella study]\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizedPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizingPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"n/a\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"A port on a physical component\\r\\n[source: Capella study]\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_OwnedPhysicalPortRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizingPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"none\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortRealizationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"n/a\",\n\t\t\t \"usage guideline\", \"n/a\",\n\t\t\t \"used in levels\", \"physical\",\n\t\t\t \"usage examples\", \"n/a\",\n\t\t\t \"constraints\", \"none\",\n\t\t\t \"comment/notes\", \"none\",\n\t\t\t \"reference documentation\", \"none\"\n\t\t });\n\t}", "private void prepareAnnotations() {\n\n // get the annotation object\n SKAnnotation annotation1 = new SKAnnotation();\n // set unique id used for rendering the annotation\n annotation1.setUniqueID(10);\n // set annotation location\n annotation1.setLocation(new SKCoordinate(-122.4200, 37.7765));\n // set minimum zoom level at which the annotation should be visible\n annotation1.setMininumZoomLevel(5);\n // set the annotation's type\n annotation1.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_RED);\n // render annotation on map\n mapView.addAnnotation(annotation1);\n\n SKAnnotation annotation2 = new SKAnnotation();\n annotation2.setUniqueID(11);\n annotation2.setLocation(new SKCoordinate(-122.410338, 37.769193));\n annotation2.setMininumZoomLevel(5);\n annotation2.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_GREEN);\n mapView.addAnnotation(annotation2);\n\n SKAnnotation annotation3 = new SKAnnotation();\n annotation3.setUniqueID(12);\n annotation3.setLocation(new SKCoordinate(-122.430337, 37.779776));\n annotation3.setMininumZoomLevel(5);\n annotation3.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_BLUE);\n mapView.addAnnotation(annotation3);\n\n selectedAnnotation = annotation1;\n // set map zoom level\n mapView.setZoom(14);\n // center map on a position\n mapView.centerMapOnPosition(new SKCoordinate(-122.4200, 37.7765));\n updatePopupPosition();\n }", "public List<AnnotationMirror> getAnnotations() {\n\t\treturn new ArrayList<>(annotations);\n\t}", "Annotation createAnnotation();", "Annotation createAnnotation();", "public List<J.Annotation> getAllAnnotations() {\n List<Annotation> allAnnotations = new ArrayList<>(leadingAnnotations);\n for (J.Modifier modifier : modifiers) {\n allAnnotations.addAll(modifier.getAnnotations());\n }\n if (typeParameters != null) {\n allAnnotations.addAll(typeParameters.getAnnotations());\n }\n if (returnTypeExpression instanceof AnnotatedType) {\n allAnnotations.addAll(((AnnotatedType) returnTypeExpression).getAnnotations());\n }\n allAnnotations.addAll(name.getAnnotations());\n return allAnnotations;\n }", "void annotate(String line);", "@MyFirstAnnotation(name=\"tom\",description=\"write by tom\")\n\tpublic UsingMyFirstAnnotation(){\n\t\t\n\t}", "int getShotAnnotationsCount();", "int getShotAnnotationsCount();", "public static void parseAnnotations(String previousLine, String line, ApexModel model) {\n if (previousLine != null && !previousLine.startsWith(\"*\")) {\n line += \" \" + previousLine;\n if (line.toLowerCase().contains(\"isTest\"))\n System.out.println(line);\n }\n\n ArrayList<String> matches = new ArrayList<String>();\n Matcher m = Pattern.compile(\"@\\\\w+\\\\s*(\\\\([\\\\w=.*''/\\\\s]+\\\\))?\").matcher(line);\n\n while (m.find()) {\n matches.add(m.group().trim());\n }\n\n if (model != null) model.getAnnotations().addAll(matches);\n }", "private List<EntityAnnotation> sciGraphAnnotate(String text) throws AnnotationException\n {\n List<EntityAnnotation> entities;\n try {\n StringReader reader = new StringReader(text);\n EntityFormatConfiguration.Builder builder = new EntityFormatConfiguration.Builder(reader);\n builder.includeCategories(CATEGORIES);\n builder.longestOnly(false);\n builder.includeAbbreviations(false);\n builder.includeAncronyms(false);\n builder.includeNumbers(false);\n entities = wrapper.annotate(builder.get());\n } catch (IOException e) {\n throw new AnnotationException(e.getMessage());\n }\n return entities;\n }", "@Override\n public void visit(Tree.AnnotationList al) {\n }", "public interface Annotator {\n\n\t/**\n\t * @param pamDataBlock Annotated datablock\n\t * @return the number of annotations\n\t */\n\tpublic int getNumAnnotations(PamDataBlock pamDataBlock);\n\t\n\t/**\n\t * Get an Annotation\n\t * @param pamDataBlock Annotated datablock\n\t * @param iAnnotation annotation number\n\t * @return Annotation\n\t */\n\tpublic Annotation getAnnotation(PamDataBlock pamDataBlock, int iAnnotation);\n}", "public List<J.Annotation> getAllAnnotations() {\n List<Annotation> allAnnotations = new ArrayList<>(leadingAnnotations);\n for (J.Modifier modifier : modifiers) {\n allAnnotations.addAll(modifier.getAnnotations());\n }\n allAnnotations.addAll(kind.getAnnotations());\n return allAnnotations;\n }", "protected void createExtendedMetaDataAnnotations() {\n\t\tString source = \"http:///org/eclipse/emf/ecore/util/ExtendedMetaData\";\t\t\n\t\taddAnnotation\n\t\t (controlEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"control\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Midi(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"midi\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Background(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"background\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Centered(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"centered\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Color(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"color\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_H(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"h\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Inverted(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"inverted\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_InvertedX(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"inverted_x\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_InvertedY(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"inverted_y\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_LocalOff(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"local_off\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Name(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"name\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Number(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"number\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_NumberX(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"number_x\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_NumberY(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"number_y\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_OscCs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"osc_cs\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Outline(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"outline\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Response(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"response\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Scalef(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"scalef\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Scalet(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"scalet\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Seconds(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"seconds\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Size(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"size\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Text(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"text\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Type(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"type\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_W(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"w\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_X(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"x\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getControl_Y(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"y\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (layoutEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"layout\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getLayout_Tabpage(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"tabpage\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getLayout_Mode(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"mode\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getLayout_Orientation(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"orientation\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getLayout_Version(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"version\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (midiEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"midi\",\n\t\t\t \"kind\", \"empty\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getMidi_Channel(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"channel\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getMidi_Data1(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"data1\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getMidi_Data2f(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"data2f\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getMidi_Data2t(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"data2t\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getMidi_Type(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"type\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getMidi_Var(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"var\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (tabpageEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"tabpage\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getTabpage_Control(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"control\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getTabpage_Name(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"name\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (topEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"TOP\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getTOP_Layout(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"layout\"\n\t\t });\n\t}", "protected void createExtendedMetaDataAnnotations() {\n\t\tString source = \"http:///org/eclipse/emf/ecore/util/ExtendedMetaData\";\t\t\t\t\t\n\t\taddAnnotation\n\t\t (analyzerJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"AnalyzerJob\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getAnalyzerJob_RFSService(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"RFSService\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (componentFailureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"ComponentFailure\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getComponentFailure_ComponentRef(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"ComponentRef\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (componentWorkFlowRunEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"ComponentWorkFlowRun\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getComponentWorkFlowRun_FailureRefs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"FailureRefs\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (expressionFailureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"ExpressionFailure\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getExpressionFailure_ExpressionRef(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"ExpressionRef\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (failureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"Failure\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getFailure_Message(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"Message\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (jobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"Job\",\n\t\t\t \"kind\", \"empty\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJob_EndTime(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"EndTime\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJob_Interval(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"Interval\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJob_JobState(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"JobState\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJob_Name(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"Name\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJob_Repeat(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"Repeat\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJob_StartTime(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"StartTime\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (jobRunContainerEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"JobRunContainer\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJobRunContainer_Job(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"Job\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getJobRunContainer_WorkFlowRuns(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"WorkFlowRuns\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (jobRunStateEEnum, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"JobRunState\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (jobRunStateObjectEDataType, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"JobRunState:Object\",\n\t\t\t \"baseType\", \"JobRunState\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (jobStateEEnum, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"JobState\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (jobStateObjectEDataType, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"JobState:Object\",\n\t\t\t \"baseType\", \"JobState\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (metricSourceJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"MetricSourceJob\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getMetricSourceJob_MetricSources(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"MetricSources\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (nodeReporterJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"NodeReporterJob\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getNodeReporterJob_Node(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"Node\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (nodeTypeReporterJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"NodeTypeReporterJob\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getNodeTypeReporterJob_NodeType(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"NodeType\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getNodeTypeReporterJob_ScopeObject(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"ScopeObject\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (operatorReporterJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"OperatorReporterJob\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getOperatorReporterJob_Operator(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"Operator\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (retentionJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"RetentionJob\",\n\t\t\t \"kind\", \"empty\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (rfsServiceMonitoringJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"RFSServiceMonitoringJob\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getRFSServiceMonitoringJob_RFSService(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"RFSService\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (rfsServiceReporterJobEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"RFSServiceReporterJob\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getRFSServiceReporterJob_RFSService(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"RFSService\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (serviceUserFailureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"ServiceUserFailure\",\n\t\t\t \"kind\", \"elementOnly\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getServiceUserFailure_ServiceUserRef(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"element\",\n\t\t\t \"name\", \"ServiceUserRef\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (workFlowRunEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"name\", \"WorkFlowRun\",\n\t\t\t \"kind\", \"empty\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWorkFlowRun_Ended(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"Ended\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWorkFlowRun_Log(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"Log\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWorkFlowRun_Progress(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"Progress\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWorkFlowRun_ProgressMessage(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"ProgressMessage\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWorkFlowRun_ProgressTask(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"ProgressTask\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWorkFlowRun_Started(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"Started\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWorkFlowRun_State(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"kind\", \"attribute\",\n\t\t\t \"name\", \"State\"\n\t\t });\n\t}", "java.util.List<com.google.cloud.videointelligence.v1p3beta1.LabelAnnotation> \n getLabelAnnotationsList();", "@Override\n public String getAnnotation() {\n return annotation;\n }", "public Framework_annotation<T> build_annotation();", "protected void createDerivedAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/derived\";\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisionedArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisioningArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatedArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatingArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisionedComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisioningComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatedArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatingArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatingComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvisioningInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatingInterfaceAllocator(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_ProvisionedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_AllocatedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatingInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizingPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizedPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizingPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizingPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "public Vector getSampleAnnotationFieldNames();", "@DISPID(1610940430) //= 0x6005000e. The runtime will prefer the VTID if present\n @VTID(36)\n Collection annotationSets();", "public final void annotations() throws RecognitionException {\n int annotations_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"annotations\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(527, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 70) ) { return ; }\n // Java.g:528:5: ( ( annotation )+ )\n dbg.enterAlt(1);\n\n // Java.g:528:9: ( annotation )+\n {\n dbg.location(528,9);\n // Java.g:528:9: ( annotation )+\n int cnt88=0;\n try { dbg.enterSubRule(88);\n\n loop88:\n do {\n int alt88=2;\n try { dbg.enterDecision(88);\n\n int LA88_0 = input.LA(1);\n\n if ( (LA88_0==73) ) {\n int LA88_2 = input.LA(2);\n\n if ( (LA88_2==Identifier) ) {\n int LA88_3 = input.LA(3);\n\n if ( (synpred128_Java()) ) {\n alt88=1;\n }\n\n\n }\n\n\n }\n\n\n } finally {dbg.exitDecision(88);}\n\n switch (alt88) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: annotation\n \t {\n \t dbg.location(528,9);\n \t pushFollow(FOLLOW_annotation_in_annotations2704);\n \t annotation();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt88 >= 1 ) break loop88;\n \t if (state.backtracking>0) {state.failed=true; return ;}\n EarlyExitException eee =\n new EarlyExitException(88, input);\n dbg.recognitionException(eee);\n\n throw eee;\n }\n cnt88++;\n } while (true);\n } finally {dbg.exitSubRule(88);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 70, annotations_StartIndex); }\n }\n dbg.location(529, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"annotations\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "InstrumentedType withAnnotations(List<? extends AnnotationDescription> annotationDescriptions);", "protected void createMimoentformatAnnotations() {\n\t\tString source = \"mimo-ent-format\";\n\t\taddAnnotation\n\t\t (getInvoice_InvoiceId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoice_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoice_InvoiceMessage(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"255\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoice_ReferenceNumber(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_AttrDescription(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_AttrValue(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"255\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContentType_InvoiceContentTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContentType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_InvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_Amount(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"currency-precise\",\n\t\t\t \"precision\", \"18\",\n\t\t\t \"scale\", \"3\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_ParentInvoiceId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_ParentInvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_Quantity(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"fixed-point\",\n\t\t\t \"precision\", \"18\",\n\t\t\t \"scale\", \"6\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceIdFrom(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceIdTo(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemSeqIdFrom(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemSeqIdTo(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_Amount(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"currency-amount\",\n\t\t\t \"precision\", \"18\",\n\t\t\t \"scale\", \"2\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_Quantity(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"fixed-point\",\n\t\t\t \"precision\", \"18\",\n\t\t\t \"scale\", \"6\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssocType_InvoiceItemAssocTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssocType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_InvoiceId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_InvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_AttrDescription(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_AttrValue(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"255\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemType_InvoiceItemTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeAttr_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeAttr_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeMap_InvoiceItemMapKey(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceRole_Percentage(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"fixed-point\",\n\t\t\t \"precision\", \"18\",\n\t\t\t \"scale\", \"6\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTerm_InvoiceTermId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTerm_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTerm_InvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTerm_TermDays(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"precision\", \"20\",\n\t\t\t \"scale\", \"0\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTerm_TermValue(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"currency-amount\",\n\t\t\t \"precision\", \"18\",\n\t\t\t \"scale\", \"2\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTerm_TextValue(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTerm_UomId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTermAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTermAttribute_AttrDescription(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTermAttribute_AttrValue(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"255\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceType_InvoiceTypeId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"20\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceType_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTypeAttr_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"length\", \"60\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTypeAttr_Description(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"type\", \"description\"\n\t\t });\n\t}", "int getObjectAnnotationsCount();", "int getObjectAnnotationsCount();", "public Map<String, Object> getAnnotations() {\n return ImmutableMap.copyOf(annotations);\n }", "public String getAnnotation () {\n return annotation;\n }", "private void checkTextAnnotation(MGraph g, UriRef textAnnotation, String content) {\n Iterator<Triple> selectedTextIterator = g.filter(textAnnotation,\n Properties.ENHANCER_SELECTED_TEXT, null);\n // check if the selected text is added\n assertTrue(selectedTextIterator.hasNext());\n // test if the selected text is part of the TEXT_TO_TEST\n Resource object = selectedTextIterator.next().getObject();\n assertTrue(object instanceof Literal);\n Literal selectedText = (Literal)object;\n object = null;\n assertTrue(content.indexOf(selectedText.getLexicalForm()) >= 0);\n // test if context is added\n //context not present for Zemanta\n// Iterator<Triple> selectionContextIterator = g.filter(textAnnotation,\n// Properties.ENHANCER_SELECTION_CONTEXT, null);\n// assertTrue(selectionContextIterator.hasNext());\n// // test if the selected text is part of the TEXT_TO_TEST\n// object = selectionContextIterator.next().getObject();\n// assertTrue(object instanceof Literal);\n// assertTrue(content.indexOf(((Literal)object).getLexicalForm()) >= 0);\n// object = null;\n //test start/end if present\n Iterator<Triple> startPosIterator = g.filter(textAnnotation,\n ENHANCER_START, null);\n Iterator<Triple> endPosIterator = g.filter(textAnnotation,\n ENHANCER_END, null);\n //start end is optional, but if start is present, that also end needs to be set\n if(startPosIterator.hasNext()){\n Resource resource = startPosIterator.next().getObject();\n //only a single start position is supported\n assertTrue(!startPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral startPosLiteral = (TypedLiteral) resource;\n resource = null;\n int start = LiteralFactory.getInstance().createObject(Integer.class, startPosLiteral);\n startPosLiteral = null;\n //now get the end\n //end must be defined if start is present\n assertTrue(endPosIterator.hasNext());\n resource = endPosIterator.next().getObject();\n //only a single end position is supported\n assertTrue(!endPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral endPosLiteral = (TypedLiteral) resource;\n resource = null;\n int end = LiteralFactory.getInstance().createObject(Integer.class, endPosLiteral);\n endPosLiteral = null;\n //check for equality of the selected text and the text on the selected position in the content\n //System.out.println(\"TA [\"+start+\"|\"+end+\"]\"+selectedText.getLexicalForm()+\"<->\"+content.substring(start,end));\n assertTrue(content.substring(start, end).equals(selectedText.getLexicalForm()));\n } else {\n //if no start position is present, there must also be no end position defined\n assertTrue(!endPosIterator.hasNext());\n }\n }", "protected void createDocsAnnotations() {\n\t\tString source = \"http://www.eclipse.org/ecl/docs\";\t\t\n\t\taddAnnotation\n\t\t (readCsvFileEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Parses given csv file. Fails if file is not found or format is invalid.\\nLearn more about <a href = \\\"http://xored.freshdesk.com/solution/articles/78219-assert-the-whole-table\\\">Asserting the whole table contents.</a>\",\n\t\t\t \"returns\", \"<code>Table</code> EMF Object. \",\n\t\t\t \"example\", \"with [get-window Preferences] {\\n\\tget-tree | select \\\"Java/Installed JREs\\\"\\n\\tget-table | get-table-data | eq [read-csv-file \\\"workspace:/assertData/table.csv\\\"] | \\n\\t\\tassert-true \\\"Data in table does not match input file\\\" \\n\\tget-button OK | click\\n}\\n\\n//Let\\'s say we need to write ErrorLog info to csv file \\'table.csv\\'.\\n//ECL script should look like this:\\n \\nget-view \\\"Error Log\\\" | get-tree | expand-all\\nget-view \\\"Error Log\\\" | get-tree | get-table-data | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\n \\n//Note: \\n//<a href=\\\"#expand-all\\\">Expand-all</a>command may be useful in case of hierarchical tree - otherwise non-expanded levels won\\'t be written. \\n//You should have MyProject/AssertData on your workspace (you may do it easily with a workspace context) to let you csv file to be created there. \\n \\n//In case you want to specify which columns/rows should be written you may use \\n//<a href=\\\"#select-columns\\\">select-columns</a>/<a href=\\\"#exclude-columns\\\">exclude-columns</a> and <a href=\\\"#select-rows\\\">select-rows</a>/<a href=\\\"#exclude-rows\\\">exclude-rows</a> commands:\\n \\nget-view \\\"Error Log\\\" | get-tree | get-table-data | select-columns \\\"Message\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\" \\nget-view \\\"Error Log\\\" | get-tree | get-table-data | exclude-columns \\\"Message\\\" \\\"Plug-in\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\"\\nget-view \\\"Error Log\\\" | get-tree | get-table-data | select-rows -column \\\"Message\\\" -value \\\"Execution of early startup handlers completed.\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\"\\n \\n//To compare table data to already written csv file you may use <a href=\\\"#read-csv-file\\\">read-csv-file</a> command:\\n \\nget-view \\\"Error Log\\\" | get-tree | get-table-data | select-columns \\\"Plug-in\\\" | eq [read-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\"] | assert-true \\\"Data in table does not match input file\\\" \"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getReadCsvFile_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"URI to a file to read. Currently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (printEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Takes a list of objects from input pipe and prints them as a plain-text table into output pipe.\",\n\t\t\t \"returns\", \"Series of string objects\"\n\t\t });\t\t\t\t\n\t\taddAnnotation\n\t\t (writeCsvFileEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Writes given table into csv file. Fails if file is not accessible.\\nLearn more about <a href = \\\"http://xored.freshdesk.com/solution/articles/78219-assert-the-whole-table\\\">Asserting the whole table contents.</a>\",\n\t\t\t \"returns\", \"The value of <code>table</code> argument.\",\n\t\t\t \"example\", \"with [get-window Preferences] {\\n\\tget-tree | select \\\"Java/Installed JREs\\\"\\n\\tget-table | get-table-data | write-csv-file \\\"workspace:/assertData/table.csv\\\"\\n\\tget-button OK | click\\n}\\n\\n//Let\\'s say we need to write ErrorLog info to csv file \\'table.csv\\'.\\n//ECL script should look like this:\\n \\nget-view \\\"Error Log\\\" | get-tree | expand-all\\nget-view \\\"Error Log\\\" | get-tree | get-table-data | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\n \\n//Note: \\n//<a href=\\\"#expand-all\\\">Expand-all</a>command may be useful in case of hierarchical tree - otherwise non-expanded levels won\\'t be written. \\n//You should have MyProject/AssertData on your workspace (you may do it easily with a workspace context) to let you csv file to be created there. \\n \\n//In case you want to specify which columns/rows should be written you may use \\n//<a href=\\\"#select-columns\\\">select-columns</a>/<a href=\\\"#exclude-columns\\\">exclude-columns</a> and <a href=\\\"#select-rows\\\">select-rows</a>/<a href=\\\"#exclude-rows\\\">exclude-rows</a> commands:\\n \\nget-view \\\"Error Log\\\" | get-tree | get-table-data | select-columns \\\"Message\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\" \\nget-view \\\"Error Log\\\" | get-tree | get-table-data | exclude-columns \\\"Message\\\" \\\"Plug-in\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\"\\nget-view \\\"Error Log\\\" | get-tree | get-table-data | select-rows -column \\\"Message\\\" -value \\\"Execution of early startup handlers completed.\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\"\\n \\n//To compare table data to already written csv file you may use <a href=\\\"#read-csv-file\\\">read-csv-file</a> command:\\n \\nget-view \\\"Error Log\\\" | get-tree | get-table-data | select-columns \\\"Plug-in\\\" | eq [read-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\"] | assert-true \\\"Data in table does not match input file\\\" \"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getWriteCsvFile_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Table to write\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWriteCsvFile_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"URI to write CSV data to. Currently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (excludeColumnsEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Takes a table from input and returns the same table which has some columns excluded. \",\n\t\t\t \"returns\", \"Copy of input table object without columns with names listed in <code>columns</code>\",\n\t\t\t \"example\", \"get-view \\\"Error Log\\\" | get-tree | get-table-data | exclude-columns \\\"Message\\\" \\\"Plug-in\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\"\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Table to exclude columns from\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getExcludeColumns_Columns(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Column names to exclude from table. It is OK to pass column names which are not present in table\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (selectColumnsEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Takes a table from input and returns the table containing only columns passed into <code>columns</code> argument.\",\n\t\t\t \"returns\", \"Copy of input table object with only columns with names listed in <code>columns</code>\",\n\t\t\t \"example\", \"get-view \\\"Error Log\\\" | get-tree | get-table-data | select-columns \\\"Message\\\" | write-csv-file \\\"workspace:/MyProject/AssertData/table.csv\\\" \"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getSelectColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Table to take columns from\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getSelectColumns_Columns(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Column names to take from table. If given column name is not present in input table, command fails\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (assertTablesMatchEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Compares contents of two tables. If contents are not the same, fails with a descriptive message\",\n\t\t\t \"example\", \"assert-tables-match [get-editor \\\"context\\\" | get-section Parameters | get-table | get-table-data ]\\n [get-editor \\\"context2\\\" | get-section Parameters | get-table | get-table-data]\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getAssertTablesMatch_IgnoreColumnOrder(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"When true, column order is not taken into account\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getAssertTablesMatch_IgnoreMissingColumns(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Describes the comparison behaviour in case when one of tables contains a column which is not present in other table:\\n<ul>\\n<li><b>NONE</b> &ndash; all columns must be present in both tables</li>\\n<li><b>LEFT</b> &ndash; columns from right table which are not present in left, are ignored</li>\\n<li><b>RIGHT</b> &ndash; columns from left table which are not present in right, are ignored</li>\\n<li><b>BOTH</b> &ndash; comparison performed only on columns present in both tables</li>\\n<p>Another way to interpret this argument is that it is an answer on question &quot;Which column can have less columns?&quot;</p>\\n<p>The primary reasoning for this argument is to provide smooth migration when presentation is changed \\u2013 consider this scenario: we have a CSV file with table data, and we have UI table. If we add or remove extra columns in the UI, we can keep existing sample data file and just correct the <code>ignoreMissingColumns</code> argument</p>\\n\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (writeLinesEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Reads objects from input pipe and writes them into file line-by-line as strings\",\n\t\t\t \"example\", \"//writes a list of launch configuration into a file line-by-line\\nlist-launch-configurations | write-lines -uri \\\"workspace:/Project/Folder/file.txt\\\"\\n// appends \\\"New line\\\" into a file. \\nstr \\\"New line\\\" | write-lines -uri \\\"workspace:/Project/Folder/file.txt\\\" -append\\n\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWriteLines_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"URI to write lines to. Currently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getWriteLines_Append(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Whether to append given lines into file. Default value is false\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (readLinesEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Reads lines from file identified by uri and writes them one-by-one into output pipe\",\n\t\t\t \"example\", \"//Displays alert with lines count\\nshow-alert [concat \\\"The number of lines is \\\"[read-lines -uri \\\"workspace:/Project/Folder/file.txt\\\" | length | str]]\\n\\n\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getReadLines_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"URI to read lines from. Currently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (selectRowsEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Takes a table from input and returns the table with rows filtered by column and criteria.\",\n\t\t\t \"returns\", \"Copy of input table object with filtered rows.\",\n\t\t\t \"example\", \"select-rows -column \\\"columnName\\\" -value \\\"value\\\" -match exact|glob|regex\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getSelectRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Table to take columns from\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getSelectRows_Column(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Column named to filter rows by.\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getSelectRows_Value(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Pattern to match rows to.\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getSelectRows_Match(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Describes the matching behaviour for rows.\\n<ul>\\n<li><b>glob</b> &ndash; wildcard matching</li>\\n<li><b>exact</b> &ndash; value should be equals to pattern</li>\\n<li><b>regext</b> &ndash; value must match java regular expression</li>\\n</ul>\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (excludeRowsEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Takes a table from input and returns the table with rows filtered by column and criteria.\",\n\t\t\t \"returns\", \"Copy of input table object with filtered rows.\",\n\t\t\t \"example\", \"exclude-rows -column \\\"columnName\\\" -value \\\"value\\\" -match exact|glob|regex\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Table to take columns from\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getExcludeRows_Column(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Column named to filter rows by.\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getExcludeRows_Value(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Pattern to match rows to.\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getExcludeRows_Match(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Describes the matching behaviour for rows.\\n<ul>\\n<li><b>glob</b> &ndash; wildcard matching</li>\\n<li><b>exact</b> &ndash; value should be equals to pattern</li>\\n<li><b>regext</b> &ndash; value must match java regular expression</li>\\n</ul>\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (asTableDataEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Converts its input to table data format, exactly the same as <code>get-table-data</code> returns.\",\n\t\t\t \"returns\", \"Table data.\",\n\t\t\t \"example\", \"get-log -levels error | as-table-data | write-csv-file \\\"workspace:/Project/file2.csv\\\"\"\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getAsTableData_Input(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Object(s) to convert from.\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (readPropertiesEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"Parses given .properties file. Fails if file is not found or format is invalid\",\n\t\t\t \"returns\", \"ECL map with values from properties file\",\n\t\t\t \"example\", \"...get-item \\\"General Registers/pc\\\" | get-property \\\"values[\\\\\\'Value\\\\\\']\\\"\\n| matches [format \\\"%s.*\\\" [read-properties -uri \\\"file:/C:/Users/Administrator/Desktop/p.properties\\\" | get myKey]] | verify-true\\n\"\n\t\t });\t\t\n\t\taddAnnotation\n\t\t (getReadProperties_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"description\", \"URI to a file to read. Currently supported schemes are workspace:/ for files in workspace and file:/ for files on local file system\"\n\t\t });\n\t}", "default List<AnnotationContext<?>> allAnnotations() {\n\n return annotations().stream()\n .flatMap(annotation -> annotation.valueType().<Stream<AnnotationContext<?>>>map(valueType -> {\n if (valueType.isArray()) {\n final TypeContext componentType = valueType.arrayComponentType();\n final AnnotationContext<Repeatable> rep = componentType.annotation(Repeatable.class);\n if (rep != null && rep.value().equals(annotation.annotationType())) {\n final Annotation[] repeated = annotation.value();\n return Arrays.stream(repeated).map(AnnotationContext::new);\n }\n }\n return Stream.of(annotation);\n }).orElseGet(() -> Stream.of(annotation)))\n .collect(Collectors.toList());\n }", "@Test\n public void testRead() throws Exception {\n String data = \"\\n/*\\n * @Description(value=\\\"Her er en forklaring\\\")\\n\"+\n \"@Parameter(name=\\\"text\\\",type=\\\"String\\\") \\n*/\"+\n \"@Parameter(name=\\\"illegal\\\",type=\\\"String\\\")\";\n System.out.println(\"read\");\n InputStream inputStream = new ByteArrayInputStream(data.getBytes());\n List<ScriptAnnotation.Annotation> result = ScriptAnnotation.read(inputStream);\n \n assertEquals(2, result.size());\n assertEquals(\"Description\", result.get(0).getName());\n assertEquals(\"Parameter\", result.get(1).getName());\n assertEquals(\"text\", result.get(1).getMap().get(\"name\"));\n \n \n }", "public abstract ArrayList<DrawingComponent> getAnnotationList();", "protected void createSegmentAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Segment\";\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "public static List<String> GetShortAnnotations(String pathToAnnFile) throws FileNotFoundException {\r\n\r\n\r\n List<String> originalList = GetFullAnnotations(pathToAnnFile);\r\n List<String> finalList = new ArrayList<>(); // create new list to return\r\n\r\n for (String anno : originalList) {\r\n String[] split_anno = anno.split(\"\\t\"); // split each line\r\n String annoWord = split_anno[2]; // extract word\r\n String annoType;\r\n\r\n // determine the category of the annotation\r\n if (split_anno[1].contains(\"Person\")) {\r\n annoType = \"Person\";\r\n } else if (split_anno[1].contains(\"Adresse\")) {\r\n annoType = \"Adresse\";\r\n } else if (split_anno[1].contains(\"Organisation\")) {\r\n annoType = \"Organisation\";\r\n } else if (split_anno[1].contains(\"Geschlecht\")) {\r\n annoType = \"Geschlecht\";\r\n } else {\r\n annoType = \"\";\r\n }\r\n\r\n String result = annoType + \":\" + annoWord; // concat type and word\r\n finalList.add(result); // append to final list to return\r\n }\r\n\r\n Collections.sort(finalList);\r\n return finalList;\r\n }", "private static Set<NullnessAnnotation> findAnnotations(final DetailAST ast) {\n final Set<NullnessAnnotation> result = new HashSet<>();\n\n final DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS);\n for (DetailAST child = modifiers.getFirstChild(); child != null; child =\n child.getNextSibling()) {\n if (child.getType() == TokenTypes.ANNOTATION) {\n addNextNullnessAnnotation(result, child);\n }\n }\n\n return result;\n }", "public Builder setAnnotations(final Annotations value) {\n _annotations = value;\n return this;\n }", "public abstract AnnotationCollector mo30681b(Annotation annotation);", "public int getNumberOfAnnotations() {\n\t\treturn numberOfAnnotations & 0xffff;\n\t}", "public void shouldCreateAndReadAnnotations() throws Exception {\n OWLOntologyManager man = OWLManager.createOWLOntologyManager();\n // Load the Koala ontology\n OWLOntology ont = load(man);\n\n df = man.getOWLDataFactory();\n // We want to add a comment to the Quokka class. First, we need to\n // obtain\n // a reference to the class\n System.out.println(\"\\n\\n--->\"+ont.getOntologyID().getOntologyIRI().get() + \"#Quokka\");\n OWLClass quokka = df.getOWLClass(IRI.create(ont.getOntologyID().getOntologyIRI().get() + \"#Quokka\"));\n // Now we create the content of our comment. In this case we simply want\n // a plain string literal. We'll attach a language to the comment to\n // specify that our comment is written in English (en).\n OWLAnnotation commentAnno = df.getOWLAnnotation(df.getRDFSComment(), df.getOWLLiteral(\n \"A class which represents quokkas\", \"en\"));\n // Specify that the class has an annotation - to do this we attach\n // an entity annotation using an entity annotation axiom (remember,\n // classes are entities)\n OWLAxiom ax = df.getOWLAnnotationAssertionAxiom(quokka.getIRI(), commentAnno);\n // Add the axiom to the ontology\n man.applyChange(new AddAxiom(ont, ax));\n // Now lets add a version info annotation to the ontology. There is no\n // 'standard' OWL annotation object for this, like there is for\n // comments and labels, so the creation of the annotation is a bit more\n // involved. First we'll create a constant for the annotation value.\n // Version info should probably contain a version number for the\n // ontology, but in this case, we'll add some text to describe why the\n // version has been updated\n OWLLiteral lit = df.getOWLLiteral(\"Added a comment to the quokka class\");\n // The above constant is just a plain literal containing the version\n // info text/comment we need to create an annotation, which pairs a IRI\n // with the constant\n OWLAnnotation anno = df.getOWLAnnotation(df.getOWLVersionInfo(), lit);\n // Now we can add this as an ontology annotation Apply the change in the\n // usual way\n System.out.println(\"Change applied: \"+man.applyChange(new AddOntologyAnnotation(ont, anno)));\n\n // It is worth noting that literals\n // can be typed or untyped. If literals are untyped then they can have\n // language tags, which are optional - typed literals cannot have\n // language tags. For each class in the ontology, we retrieve its\n // annotations and sift through them. If the annotation annotates the\n // class with a constant which is untyped then we check the language tag\n // to see if it is English. Firstly, get the annotation property for\n // rdfs:label\n OWLAnnotationProperty label = df.getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI());\n\n System.out.println(\"Label: \"+label.toString());\n\n\n\n\n\n\n for (OWLClass cls : ont.getClassesInSignature()) {\n // Get the annotations on the class that use the label property\n\n //System.out.println(\"-------------------------------->classes: \"+cls.toString());\n\n for (OWLOntology o : ont.getImportsClosure()) {\n\n //System.out.println(\"AnnotationAssetationAxioms: \"+o.getAnnotationAssertionAxioms(cls.getIRI()));\n\n //annotationObjects(o.getAnnotationAssertionAxioms(cls.getIRI()),label)\n\n for (OWLAnnotationAssertionAxiom annotationAssertionAxiom : o.getAnnotationAssertionAxioms(cls.getIRI())) {\n //System.out.println(\"Entrou no if do assetation\");\n\n System.out.println(\"AnnotationAssertationAxiom: \"+annotationAssertionAxiom);\n System.out.println(\"Property: \"+annotationAssertionAxiom.getProperty());\n\n\n if (annotationAssertionAxiom.getValue() instanceof OWLLiteral) {\n //System.out.println(\"Entrou no if do annotation get value\");\n OWLLiteral val = (OWLLiteral) annotationAssertionAxiom.getValue();\n //if (val.hasLang(\"en\")) {\n System.out.println(\"Value: \" +\n val.getLiteral());\n //}\n }\n }\n }\n }\n }", "public List<J.Annotation> getAllAnnotations() {\n List<Annotation> allAnnotations = new ArrayList<>(leadingAnnotations);\n for (J.Modifier modifier : modifiers) {\n allAnnotations.addAll(modifier.getAnnotations());\n }\n if (typeExpression != null && typeExpression instanceof J.AnnotatedType) {\n allAnnotations.addAll(((J.AnnotatedType) typeExpression).getAnnotations());\n }\n return allAnnotations;\n }", "protected void createIgnoreAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/ImpactAnalysis/Ignore\";\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "int createAnnotation(int caseID, int authorID, int quoteID, String text);", "public Annotation getAnnotation() {\n return annotation;\n }", "int getAnnotationSentimentValue();", "public String getAnnotation() {\n return annotation;\n }", "protected void createUML2MappingAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/2007/UML2Mapping\";\t\n\t\taddAnnotation\n\t\t (blockArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (blockEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentArchitectureEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedInterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"clientDependency\",\n\t\t\t \"featureOwner\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"interfaceRealization\",\n\t\t\t \"featureOwner\", \"BehavioredClassifier\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractActorEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Property\",\n\t\t\t \"stereotype\", \"eng.PhysicalPart\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (architectureAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (componentAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Component\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Package\",\n\t\t\t \"stereotype\", \"eng.InterfacePkg\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"packagedElement\",\n\t\t\t \"featureOwner\", \"Package\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Interface\",\n\t\t\t \"stereotype\", \"eng.Interface\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"mechanism\",\n\t\t\t \"featureOwner\", \"eng.Interface\",\n\t\t\t \"fromStereotype\", \"true\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"contract\",\n\t\t\t \"umlOppositeReferenceOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceImplementationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"InterfaceRealization\",\n\t\t\t \"stereotype\", \"eng.InterfaceImplementation\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"implementingClassifier\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_ImplementedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"contract\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceUseEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Usage\",\n\t\t\t \"stereotype\", \"eng.InterfaceUse\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"client\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_UsedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (providedInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"InterfaceRealization\",\n\t\t\t \"stereotype\", \"eng.ProvidedInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getProvidedInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"contract\",\n\t\t\t \"featureOwner\", \"InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (requiredInterfaceLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Usage\",\n\t\t\t \"stereotype\", \"eng.RequiredInterfaceLink\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getRequiredInterfaceLink_Interface(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.InterfaceRealization\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (actorCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.ActorCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (systemComponentCapabilityRealizationInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\",\n\t\t\t \"stereotype\", \"eng.SystemComponentCapabilityRealizationInvolvement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deployableElementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"umlOppositeReference\", \"supplier\",\n\t\t\t \"umlOppositeReferenceOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (deploymentTargetEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Namespace\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"clientDependency\",\n\t\t\t \"featureOwner\", \"NamedElement\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (abstractDeploymentLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t\t \"metaclass\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"supplier\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"client\",\n\t\t\t \"featureOwner\", \"Dependency\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"role\",\n\t\t\t \"featureOwner\", \"ConnectorEnd\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"featureName\", \"partWithPort\",\n\t\t\t \"featureOwner\", \"ConnectorEnd\"\n\t\t });\n\t}", "@Deprecated public List<AnnotationRef> getAnnotations(){\n return build(annotations);\n }", "protected void createMimoentslotAnnotations() {\n\t\tString source = \"mimo-ent-slot\";\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContactMech_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContactMech_ContactMech(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContactMech_ContactMechPurposeType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_Content(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_InvoiceContentType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceContent_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_InvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_OverrideGlAccount(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"used to specify the override or actual glAccountId used for the invoice, avoids problems if configuration changes after initial posting, etc\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItem_OverrideOrgParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"help\", \"Used to specify the organization override rather than using the payToPartyId\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemAssocType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_FromDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceIdFrom(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceIdTo(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemSeqIdFrom(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAssoc_InvoiceItemSeqIdTo(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_InvoiceId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemAttribute_InvoiceItemSeqId(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeAttr_InvoiceItemType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeAttr_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeGlAccount_InvoiceItemType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeGlAccount_OrganizationParty(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeMap_InvoiceType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceItemTypeMap_InvoiceItemMapKey(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceNote_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceRole_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceRole_Party(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceRole_RoleType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceStatus_Status(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceStatus_Invoice(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceStatus_StatusDate(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTermAttribute_InvoiceTerm(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTermAttribute_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTypeAttr_InvoiceType(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t\taddAnnotation\n\t\t (getInvoiceTypeAttr_AttrName(),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"key\", \"true\"\n\t\t });\n\t}", "java.util.List<? extends com.google.cloud.videointelligence.v1p3beta1.LabelAnnotationOrBuilder> \n getLabelAnnotationsOrBuilderList();", "public JavaAnnotation getAnnotation( String name );", "protected void createGenModel_1Annotations() {\n\t\tString source = \"http://www.eclipse.org/uml2/1.1.0/GenModel\";\n\t\taddAnnotation\n\t\t (internalFailureOccurrenceDescriptionEClass.getEOperations().get(0),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"body\", \"not self.softwareInducedFailureType__InternalFailureOccurrenceDescription.oclIsTypeOf(ResourceTimeoutFailureType)\"\n\t\t });\n\t\taddAnnotation\n\t\t (recoveryActionEClass.getEOperations().get(0),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"body\", \"self.primaryBehaviour__RecoveryAction <> null\"\n\t\t });\n\t\taddAnnotation\n\t\t (recoveryActionBehaviourEClass.getEOperations().get(0),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"body\", \"not self.recoveryAction__RecoveryActionBehaviour.recoveryActionBehaviours__RecoveryAction->\\r\\n\\texists(x,y:RecoveryActionBehaviour | x<>y\\r\\n\\t\\tand x.failureHandlingAlternatives__RecoveryActionBehaviour->includes(self)\\r\\n\\t\\tand y.failureHandlingAlternatives__RecoveryActionBehaviour->includes(self))\"\n\t\t });\n\t\taddAnnotation\n\t\t (recoveryActionBehaviourEClass.getEOperations().get(1),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"body\", \"not self.failureHandlingAlternatives__RecoveryActionBehaviour->includes(self)\"\n\t\t });\n\t\taddAnnotation\n\t\t (recoveryActionBehaviourEClass.getEOperations().get(2),\n\t\t source,\n\t\t new String[] {\n\t\t\t \"body\", \"not self.failureHandlingAlternatives__RecoveryActionBehaviour->\\r\\n\\texists(x,y:RecoveryActionBehaviour | x<>y and\\r\\n\\tx.failureTypes_FailureHandlingEntity->\\r\\n\\t\\texists(f:mpcm::reliability::FailureType |\\r\\n\\t\\ty.failureTypes_FailureHandlingEntity->includes(f)))\"\n\t\t });\n\t}", "private void addEntityViews(TextAnnotation ta, ACEDocumentAnnotation docAnnotation, File file) {\n SpanLabelView entityView =\n new SpanLabelView(ViewNames.MENTION_ACE,\n ACEReader.class.getCanonicalName(), ta, 1.0f, true);\n CoreferenceView corefHeadView =\n new CoreferenceView(ViewNames.COREF_HEAD, ACEReader.class.getCanonicalName(), ta,\n 1.0f);\n CoreferenceView corefExtentView =\n new CoreferenceView(ViewNames.COREF_EXTENT, ACEReader.class.getCanonicalName(), ta,\n 1.0f);\n\n for (ACEEntity entity : docAnnotation.entityList) {\n List<Constituent> corefMentions = new ArrayList<>(docAnnotation.entityList.size());\n List<Constituent> corefMentionHeads = new ArrayList<>(docAnnotation.entityList.size());\n\n for (ACEEntityMention entityMention : entity.entityMentionList) {\n int extentStartTokenId =\n ta.getTokenIdFromCharacterOffset(entityMention.extentStart);\n int extentEndTokenId = ta.getTokenIdFromCharacterOffset(entityMention.extentEnd);\n\n if (extentStartTokenId < 0 || extentEndTokenId < 0\n || extentStartTokenId > extentEndTokenId + 1) {\n logger.error(\"Incorrect Extent Token Span for mention - \" + entity.id + \" \"\n + entityMention.id);\n continue;\n }\n\n Constituent extentConstituent =\n new Constituent(entity.type, ViewNames.MENTION_ACE, ta, extentStartTokenId, extentEndTokenId + 1);\n extentConstituent.addAttribute(EntityTypeAttribute, entity.type);\n extentConstituent.addAttribute(EntityIDAttribute, entity.id);\n extentConstituent.addAttribute(EntityMentionIDAttribute, entityMention.id);\n extentConstituent.addAttribute(EntityMentionTypeAttribute, entityMention.type);\n extentConstituent.addAttribute(EntityClassAttribute, entity.classEntity);\n\n String entitySubType = (entity.subtype != null) ? entity.subtype : entity.type;\n extentConstituent.addAttribute(EntitySubtypeAttribute, entitySubType);\n\n if (entityMention.ldcType != null) {\n extentConstituent.addAttribute(EntityMentionLDCTypeAttribute, entityMention.ldcType);\n }\n\n // ACE Annotation have character offsets inclusive of start/end.\n // Converting them to a one-after-then-end.\n extentConstituent.addAttribute(EntityHeadStartCharOffset, entityMention.headStart + \"\");\n extentConstituent.addAttribute(EntityHeadEndCharOffset, entityMention.headEnd + 1 + \"\");\n\n entityView.addConstituent(extentConstituent);\n\n Constituent corefExtentConstituent =\n extentConstituent.cloneForNewViewWithDestinationLabel(\n ViewNames.COREF_EXTENT, entity.id);\n corefMentions.add(corefExtentConstituent);\n\n Constituent corefHeadConstituent =\n getEntityHeadForConstituent(corefExtentConstituent, ta,\n ViewNames.COREF_HEAD);\n if (corefHeadConstituent != null) {\n corefMentionHeads.add(corefHeadConstituent);\n }\n }\n\n // Picking the longest mention as the canonical mention\n // as we do not get this information is not present in the dataset.\n Constituent canonicalMention = null;\n double[] scores = new double[corefMentions.size()];\n for (int i = 0; i < corefMentions.size(); i++) {\n Constituent cons = corefMentions.get(i);\n scores[i] = cons.getConstituentScore();\n\n if (canonicalMention == null\n || canonicalMention.getSurfaceForm().length() < cons.getSurfaceForm().length()) {\n canonicalMention = cons;\n }\n }\n\n if (corefMentions.size() > 0) {\n corefExtentView.addCorefEdges(canonicalMention, corefMentions, scores);\n } else {\n logger.error(\"No Entity Mentions found for a given entity - \" + entity.id);\n }\n\n // Processing Coref Head Constituents\n // Picking the longest mention as the canonical mention\n // as we do not get this information is not present in the dataset.\n canonicalMention = null;\n scores = new double[corefMentionHeads.size()];\n for (int i = 0; i < corefMentionHeads.size(); i++) {\n Constituent cons = corefMentionHeads.get(i);\n scores[i] = cons.getConstituentScore();\n\n if (canonicalMention == null\n || canonicalMention.getSurfaceForm().length() < cons.getSurfaceForm().length()) {\n canonicalMention = cons;\n }\n }\n\n if (corefMentionHeads.size() > 0) {\n corefHeadView.addCorefEdges(canonicalMention, corefMentionHeads, scores);\n } else {\n logger.error(\"No Entity Mentions found for a given entity - \" + entity.id);\n }\n }\n\n ta.addView(ViewNames.MENTION_ACE, entityView);\n ta.addView(ViewNames.COREF_HEAD, corefHeadView);\n ta.addView(ViewNames.COREF_EXTENT, corefExtentView);\n }", "protected void createBikeshedAnnotations() {\n\t\tString source = \"https://tabatkins.github.io/bikeshed\";\n\t\taddAnnotation\n\t\t (this,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Abstract-Syntax\"\n\t\t });\n\t\taddAnnotation\n\t\t (elementEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (annotationEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (identifiedElementEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (importEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (instanceEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Instances\"\n\t\t });\n\t\taddAnnotation\n\t\t (axiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (assertionEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Assertions\"\n\t\t });\n\t\taddAnnotation\n\t\t (predicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (argumentEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (literalEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Literals\"\n\t\t });\n\t\taddAnnotation\n\t\t (ontologyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (memberEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (vocabularyBoxEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (descriptionBoxEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Descriptions\"\n\t\t });\n\t\taddAnnotation\n\t\t (vocabularyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (vocabularyBundleEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (descriptionEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Descriptions\"\n\t\t });\n\t\taddAnnotation\n\t\t (descriptionBundleEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Descriptions\"\n\t\t });\n\t\taddAnnotation\n\t\t (statementEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (vocabularyMemberEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (descriptionMemberEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Descriptions\"\n\t\t });\n\t\taddAnnotation\n\t\t (vocabularyStatementEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (descriptionStatementEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Descriptions\"\n\t\t });\n\t\taddAnnotation\n\t\t (termEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (ruleEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (builtInEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (specializableTermEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Vocabularies\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (typeEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Types\"\n\t\t });\n\t\taddAnnotation\n\t\t (relationBaseEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Relations\"\n\t\t });\n\t\taddAnnotation\n\t\t (specializablePropertyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (classifierEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Types\"\n\t\t });\n\t\taddAnnotation\n\t\t (scalarEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Types\"\n\t\t });\n\t\taddAnnotation\n\t\t (entityEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Types\"\n\t\t });\n\t\taddAnnotation\n\t\t (structureEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Types\"\n\t\t });\n\t\taddAnnotation\n\t\t (aspectEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Types\"\n\t\t });\n\t\taddAnnotation\n\t\t (conceptEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Types\"\n\t\t });\n\t\taddAnnotation\n\t\t (relationEntityEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Relations\"\n\t\t });\n\t\taddAnnotation\n\t\t (annotationPropertyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (semanticPropertyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (scalarPropertyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (structuredPropertyEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (relationEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (forwardRelationEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Relations\"\n\t\t });\n\t\taddAnnotation\n\t\t (reverseRelationEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Relations\"\n\t\t });\n\t\taddAnnotation\n\t\t (unreifiedRelationEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Relations\"\n\t\t });\n\t\taddAnnotation\n\t\t (namedInstanceEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Instances\"\n\t\t });\n\t\taddAnnotation\n\t\t (conceptInstanceEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Instances\"\n\t\t });\n\t\taddAnnotation\n\t\t (relationInstanceEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Instances\"\n\t\t });\n\t\taddAnnotation\n\t\t (structureInstanceEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Instances\"\n\t\t });\n\t\taddAnnotation\n\t\t (keyAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (specializationAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (instanceEnumerationAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyRestrictionAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (literalEnumerationAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (classifierEquivalenceAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (scalarEquivalenceAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyEquivalenceAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyRangeRestrictionAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyCardinalityRestrictionAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyValueRestrictionAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertySelfRestrictionAxiomEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Axioms\"\n\t\t });\n\t\taddAnnotation\n\t\t (typeAssertionEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Assertions\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyValueAssertionEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Assertions\"\n\t\t });\n\t\taddAnnotation\n\t\t (unaryPredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (binaryPredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (builtInPredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (typePredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (relationEntityPredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (propertyPredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (sameAsPredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (differentFromPredicateEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Predicates\"\n\t\t });\n\t\taddAnnotation\n\t\t (quotedLiteralEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Literals\"\n\t\t });\n\t\taddAnnotation\n\t\t (integerLiteralEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Literals\"\n\t\t });\n\t\taddAnnotation\n\t\t (decimalLiteralEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Literals\"\n\t\t });\n\t\taddAnnotation\n\t\t (doubleLiteralEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Literals\"\n\t\t });\n\t\taddAnnotation\n\t\t (booleanLiteralEClass,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Literals\"\n\t\t });\n\t\taddAnnotation\n\t\t (separatorKindEEnum,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t\taddAnnotation\n\t\t (rangeRestrictionKindEEnum,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (cardinalityRestrictionKindEEnum,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Properties\"\n\t\t });\n\t\taddAnnotation\n\t\t (importKindEEnum,\n\t\t source,\n\t\t new String[] {\n\t\t\t \"heading\", \"Elements\"\n\t\t });\n\t}", "private void buildTFIDFAnnotations() throws IOException {\n\t\tTFIDFTrendExtractor trendExtractor = new TFIDFTrendExtractor(false, trainingInstances);\n\t\tTFIDFInvestigationMethodExtractor invMExtractor = new TFIDFInvestigationMethodExtractor(false,\n\t\t\t\ttrainingInstances);\n\n\t\tnew File(\"data/annotations/invMTFIDF/\").mkdirs();\n\t\tnew File(\"data/annotations/trendTFIDF/\").mkdirs();\n\n\t\tfor (Instance instance : testInstances) {\n//\t\t\tannotations.putIfAbsent(instance, new HashSet<>());\n\t\t\tSet<DocumentLinkedAnnotation> invAnns = new HashSet<>();\n\t\t\tfor (List<DocumentToken> sentence : instance.getDocument().getSentences()) {\n\t\t\t\tinvAnns.addAll(invMExtractor.getInvestigationMethodForSentence(instance.getDocument(), sentence));\n\t\t\t}\n//\t\t\tannotations.get(instance).addAll(invAnns);\n\t\t\tnew JsonNerlaIO(true).writeNerlas(new File(\"data/annotations/invMTFIDF/\" + instance.getName()), invAnns);\n\t\t\tSet<DocumentLinkedAnnotation> trendAnns = new HashSet<>();\n\t\t\tfor (List<DocumentToken> sentence : instance.getDocument().getSentences()) {\n\t\t\t\ttrendAnns.addAll(trendExtractor.getTrendsForSentence(instance.getDocument(), sentence));\n\t\t\t}\n//\t\t\tannotations.get(instance).addAll(trendAnns);\n\t\t\tnew JsonNerlaIO(true).writeNerlas(new File(\"data/annotations/trendTFIDF/\" + instance.getName()), trendAnns);\n//\t\t\tSystem.out.println(\"SIZE = \" + annotations.get(instance).size());\n\t\t}\n\n//\t\treturn annotations;\n\n\t}", "public static List<SearchAnnotation> getDefaultVisibleAnnotationTypes() {\n\t\tList<SearchAnnotation> annotations = new ArrayList<SearchAnnotation>();\n\t\t\n\t\t{\n\t\t\tSearchAnnotation annotation = new SearchAnnotation();\n\t\t\tannotation.setAnnotationName( PSMAnnotationTypes.PERCOLATOR_ANNOTATION_TYPE_QVALUE );\n\t\t\tannotation.setSearchProgram( Constants.PROGRAM_NAME_PERCOLATOR );\n\t\t\tannotations.add( annotation );\n\t\t}\n\n\t\t{\n\t\t\tSearchAnnotation annotation = new SearchAnnotation();\n\t\t\tannotation.setAnnotationName( PSMAnnotationTypes.PERCOLATOR_ANNOTATION_TYPE_PEP );\n\t\t\tannotation.setSearchProgram( Constants.PROGRAM_NAME_PERCOLATOR );\n\t\t\tannotations.add( annotation );\n\t\t}\n\t\t\n\t\t{\n\t\t\tSearchAnnotation annotation = new SearchAnnotation();\n\t\t\tannotation.setAnnotationName( PSMAnnotationTypes.COMET_ANNOTATION_TYPE_EXPECT );\n\t\t\tannotation.setSearchProgram( Constants.PROGRAM_NAME_COMET );\n\t\t\tannotations.add( annotation );\n\t\t}\n\t\t\n\t\t{\n\t\t\tSearchAnnotation annotation = new SearchAnnotation();\n\t\t\tannotation.setAnnotationName( PSMAnnotationTypes.COMET_ANNOTATION_TYPE_HIT_RANK );\n\t\t\tannotation.setSearchProgram( Constants.PROGRAM_NAME_COMET );\n\t\t\tannotations.add( annotation );\n\t\t}\n\n\t\treturn annotations;\n\t}", "private double[] getMaxAnnotations() {\n \n double[] maxAnnoNo = new double[]{0, 0, 0};\n for (int i = 0; i < 3; ++i) {\n for (String term : annotations.getColumnIdentifiers()) {\n if (this.ontologyFromGOTerm.containsKey(term) && this.ontologyFromGOTerm.get(term) == i) {\n maxAnnoNo[i] = Math.max(maxAnnoNo[i], annotations.countNumberOfGenesForGOTerm(term));\n }\n }\n }\n return maxAnnoNo;\n }", "@Override\r\npublic Object produceValue(Annotation np, Document doc)\r\n{\n SortedSet<Integer> quoteLocations = new TreeSet<Integer>();\r\n Pattern p = Pattern.compile(\"\\\"|''|``|\\u201C|\\u201D\");\r\n\r\n String text = doc.getText();\r\n Matcher m = p.matcher(text);\r\n\r\n boolean inQuote = false;\r\n while (m.find()) {\r\n int start = m.start();\r\n if (inQuote && (text.substring(start).startsWith(\"``\") || text.substring(start).startsWith(\"\\u201C\"))) {\r\n // We have an opening quote; Make sure the previous quote is closed\r\n quoteLocations.add((start - 1));\r\n inQuote = false;\r\n }\r\n quoteLocations.add((start));\r\n inQuote = !inQuote;\r\n }\r\n // System.out.println(\"Quote locations: \"+quoteLocations);\r\n\r\n // Figure out which noun corresponds to which quote\r\n AnnotationSet sent = doc.getAnnotationSet(Constants.SENT);\r\n Iterator<Integer> quoteIter = quoteLocations.iterator();\r\n HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>();\r\n int counter = 1;\r\n while (quoteIter.hasNext()) {\r\n int qStart = quoteIter.next();\r\n if (!quoteIter.hasNext()) {\r\n break;\r\n }\r\n int qEnd = quoteIter.next() + 1;\r\n\r\n AnnotationSet sentences = sent.getOverlapping(qStart, qEnd);\r\n\r\n // Three cases for the size of the sentences set\r\n Annotation match, compMatch;\r\n if (sentences.size() < 1) {\r\n System.out.println(\"Quote is not covered by any sentence:\");\r\n int beg = qStart - 15;\r\n beg = beg < 0 ? 0 : beg;\r\n int en = qStart + 15;\r\n en = en >= text.length() ? text.length() - 1 : en;\r\n System.out.println(Utils.getAnnotText(beg, en, text));\r\n System.out.println(\"Position \" + qStart);\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n // throw new RuntimeException(\"Quote is not covered by any sentence\");\r\n }\r\n else if (sentences.size() == 1) {\r\n Annotation s = sentences.getFirst();\r\n // System.out.println(\"Sent: \"+Utils.getAnnotText(s, text));\r\n if (s.properCovers(qStart, qEnd)) {\r\n match = findReporter(qStart, qEnd, s, doc);\r\n compMatch = findCompany(qStart, qEnd, s, doc);\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n }\r\n else {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n sentReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), compMatch);\r\n }\r\n else {\r\n // The quoted string spans more than one sentence.\r\n Annotation beg = sentences.getFirst();\r\n // System.out.println(\"First sent: \"+Utils.getAnnotText(beg, text));\r\n Annotation end = sentences.getLast();\r\n // System.out.println(\"Last sent: \"+Utils.getAnnotText(end, text));\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n if (beg.getStartOffset() < qStart) {\r\n match = findReporter(qStart, qEnd, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, beg, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) {\r\n match = findReporter(qStart, qEnd, end, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n sentReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), match);\r\n sentReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), compMatch);\r\n compReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), compMatch);\r\n\r\n }\r\n reporters.put(counter, match);\r\n companies.put(counter, compMatch);\r\n counter += 2;\r\n\r\n // System.out.println(\"Quote: \"+Utils.getAnnotText(qStart, qEnd, text));\r\n // if(!match.equals(Annotation.getNullAnnot())){\r\n // System.out.println(\"Match: \"+Utils.getAnnotText(match, text));\r\n // }else{\r\n // System.out.println(\"no match!\");\r\n // }\r\n }\r\n int initial = quoteLocations.size();\r\n\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n for (Annotation a : nps.getOrderedAnnots()) {\r\n int s = a.getStartOffset();\r\n quoteLocations = quoteLocations.tailSet(s);\r\n int numQuotes = initial - quoteLocations.size();\r\n\r\n // System.err.println(numQuotes);\r\n if (numQuotes % 2 == 0) {\r\n a.setProperty(this, -1);\r\n a.setProperty(Property.AUTHOR, Annotation.getNullAnnot());\r\n a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot());\r\n }\r\n else {\r\n a.setProperty(this, numQuotes);\r\n a.setProperty(Property.AUTHOR, reporters.get(numQuotes));\r\n a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes));\r\n // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a,\r\n // text))==1\r\n // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){\r\n // Annotation repo = reporters.get(new Integer(numQuotes));\r\n // if(repo==null||repo.equals(Annotation.getNullAnnot())){\r\n // Annotation thisSent = sent.getOverlapping(a).getFirst();\r\n // System.out.println(\"*** No author in \"+Utils.getAnnotText(thisSent, text+\"***\"));\r\n // }\r\n // }\r\n }\r\n }\r\n // System.out.println(\"End of inquote\");\r\n\r\n return np.getProperty(this);\r\n}", "@Override\n public void setQualifiers(final Annotation[] annos) {\n }" ]
[ "0.70338666", "0.6866439", "0.6680546", "0.6585328", "0.63491", "0.6280137", "0.62465143", "0.62442774", "0.621033", "0.616662", "0.6164187", "0.6090487", "0.60879415", "0.6059033", "0.60497016", "0.6035695", "0.6015469", "0.59974813", "0.5967091", "0.5943262", "0.5921001", "0.59175694", "0.59030414", "0.59030414", "0.5890054", "0.58701545", "0.58409625", "0.58224064", "0.57964146", "0.5791131", "0.5788601", "0.5785444", "0.5777726", "0.5753407", "0.5750477", "0.57352704", "0.5730168", "0.57221097", "0.5702231", "0.5700964", "0.5700932", "0.5667005", "0.56444824", "0.56438184", "0.56438184", "0.56434256", "0.5637344", "0.56357694", "0.56165427", "0.56165427", "0.5611574", "0.5610827", "0.5606025", "0.560295", "0.5600615", "0.5590821", "0.55860454", "0.55790484", "0.5564685", "0.5561437", "0.5558326", "0.55523115", "0.55500144", "0.5541611", "0.5518418", "0.55039686", "0.5493649", "0.5493649", "0.5492718", "0.54768825", "0.5473473", "0.5462165", "0.5456544", "0.5443368", "0.5435757", "0.54344594", "0.54266983", "0.5426052", "0.5421783", "0.54156595", "0.5413876", "0.54109806", "0.54080564", "0.53983086", "0.5390704", "0.53828967", "0.5374013", "0.53629506", "0.5356406", "0.53519344", "0.5335947", "0.53291816", "0.5304167", "0.5304066", "0.53022915", "0.53017145", "0.52916765", "0.5286859", "0.52841735", "0.5272543", "0.5272264" ]
0.0
-1
Annotator function return all concepts within text input
public static Map<String, Integer> getAnnotations(String text) throws IOException, ParseException { Map<String, Integer> concepts = new HashMap<String, Integer>(); String request = URL + URLEncoder.encode(text, "UTF-8") ; ; String jRespond= restcalls.get(request,apikey) ; System.out.println(jRespond); JSONParser parser = new JSONParser(); Object obj = parser.parse(jRespond) ; JSONArray msgs = (JSONArray) obj; Iterator item = msgs.iterator(); // take each value from the json array separately while (item.hasNext()) { JSONObject innerObj = (JSONObject) item.next(); JSONArray msg = (JSONArray) innerObj.get("annotations") ; System.out.println(msg.toString()); Iterator iterator = msg.iterator(); while (iterator.hasNext()) { JSONObject annotinnerObj = (JSONObject) iterator.next(); System.out.println(annotinnerObj.get("matchType").toString()); // if (annotinnerObj.get("matchType").toString().equals("PREF")) { concepts.put(annotinnerObj.get("text").toString(), 1) ; } } } return concepts ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<String> computeDisplayAnnotations(VisualizerInput input,\n Class<? extends SNode> type) {\n if (input == null) {\n return new LinkedList<String>();\n }\n\n SDocumentGraph graph = input.getDocument().getSDocumentGraph();\n\n Set<String> annoPool = SToken.class.isAssignableFrom(type) ?\n getAnnotationLevelSet(graph, null, type)\n : getAnnotationLevelSet(graph, input.getNamespace(), type);\n List<String> annos = new LinkedList<String>(annoPool);\n\n String annosConfiguration = input.getMappings().getProperty(\n MAPPING_ANNOS_KEY);\n if (annosConfiguration != null && annosConfiguration.trim().length() > 0) {\n String[] split = annosConfiguration.split(\",\");\n annos.clear();\n for (String s : split) {\n s = s.trim();\n // is regular expression?\n if (s.startsWith(\"/\") && s.endsWith(\"/\")) {\n // go over all remaining items in our pool of all annotations and\n // check if they match\n Pattern regex = Pattern.compile(StringUtils.strip(s, \"/\"));\n\n LinkedList<String> matchingAnnos = new LinkedList<String>();\n for (String a : annoPool) {\n if (regex.matcher(a).matches()) {\n matchingAnnos.add(a);\n }\n }\n\n annos.addAll(matchingAnnos);\n annoPool.removeAll(matchingAnnos);\n\n } else {\n annos.add(s);\n annoPool.remove(s);\n }\n }\n }\n\n // filter already found annotation names by regular expression\n // if this was given as mapping\n String regexFilterRaw = input.getMappings().getProperty(\n MAPPING_ANNO_REGEX_KEY);\n if (regexFilterRaw != null) {\n try {\n Pattern regexFilter = Pattern.compile(regexFilterRaw);\n ListIterator<String> itAnnos = annos.listIterator();\n while (itAnnos.hasNext()) {\n String a = itAnnos.next();\n // remove entry if not matching\n if (!regexFilter.matcher(a).matches()) {\n itAnnos.remove();\n }\n }\n } catch (PatternSyntaxException ex) {\n log.\n warn(\"invalid regular expression in mapping for grid visualizer\",\n ex);\n }\n }\n return annos;\n }", "Set<String> annotations();", "String getConcept();", "public Map<String, String> partsOfSpeech(String input) {\n Map<String, String> output = new HashMap();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n document.get(CoreAnnotations.TokensAnnotation.class).stream().forEach((token) -> {\n // this is the text of the token\n String word = token.get(CoreAnnotations.TextAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n output.put(word, pos);\n });\n\n return output;\n }", "private List<EntityAnnotation> sciGraphAnnotate(String text) throws AnnotationException\n {\n List<EntityAnnotation> entities;\n try {\n StringReader reader = new StringReader(text);\n EntityFormatConfiguration.Builder builder = new EntityFormatConfiguration.Builder(reader);\n builder.includeCategories(CATEGORIES);\n builder.longestOnly(false);\n builder.includeAbbreviations(false);\n builder.includeAncronyms(false);\n builder.includeNumbers(false);\n entities = wrapper.annotate(builder.get());\n } catch (IOException e) {\n throw new AnnotationException(e.getMessage());\n }\n return entities;\n }", "public List<String> getAllSentences(String input) {\n List<String> output = new ArrayList();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "public String[] prepareText(String text) {\n\n Properties props = new Properties();\n\n props.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner\");\n StanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\n //apply\n Annotation document = new Annotation(text);\n pipeline.annotate(document);\n\n List<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n ArrayList<String> result = new ArrayList<>();\n\n for (CoreMap sentence : sentences) {\n\n for (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n // this is the text of the token\n String word = token.get(CoreAnnotations.LemmaAnnotation.class);\n // this is the POS tag of the token\n String pos = token.get(PartOfSpeechAnnotation.class);\n // this is the NER label of the token\n String ne = token.get(CoreAnnotations.NamedEntityTagAnnotation.class);\n\n if (!StringUtils.isStopWord(word)) {\n result.add(word);\n }\n\n }\n\n }\n String[] result_ar = new String[result.size()];\n\n return result.toArray(result_ar);\n }", "public void getParsed(String text) {\n\t\tAnnotation document = new Annotation(text);\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document);\n\t\tsentences = document.get(SentencesAnnotation.class);\n\t\tsentIt = sentences.iterator();\n\t}", "public interface TextFeature extends Closeable {\n\n /**\n * Get an ID for the feature extractor\n * @return The ID\n */\n String id();\n \n /**\n * Extract features from a feature extractor\n * @param facet The facet to extract features for\n * @return The set of features\n */\n default Feature[] extractFeatures(LensResult facet) {\n return extractFeatures(facet, NaiscListener.DEFAULT);\n }\n \n /**\n * Extract features from a feature extractor\n * @param facet The facet to extract features for\n * @param log The listener\n * @return The set of features\n */\n Feature[] extractFeatures(LensResult facet, NaiscListener log);\n\n /**\n * Get the tags that this feature extractor accepts or null for all\n * @return The set of features accepted or null for all\n */\n Set<String> tags();\n}", "public Set<String> getSentences(String input) {\n Set<String> output = new HashSet();\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // All the sentences in this document\n List<CoreMap> docSentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n for (CoreMap sentence : docSentences) {\n // traverse words in the current sentence\n output.add(sentence.toString());\n }\n\n return output;\n }", "public interface ILinguisticFilter {\n \n \n /**\n * each filter gets a sentence (Tokens) and returns a list of candidates (list of strings)\n * @param pSentence\n * @return\n */\n public List<String> getCandidates(LinkedList<Token> pSentence);\n \n \n \n}", "@Override\r\npublic Object produceValue(Annotation np, Document doc)\r\n{\n SortedSet<Integer> quoteLocations = new TreeSet<Integer>();\r\n Pattern p = Pattern.compile(\"\\\"|''|``|\\u201C|\\u201D\");\r\n\r\n String text = doc.getText();\r\n Matcher m = p.matcher(text);\r\n\r\n boolean inQuote = false;\r\n while (m.find()) {\r\n int start = m.start();\r\n if (inQuote && (text.substring(start).startsWith(\"``\") || text.substring(start).startsWith(\"\\u201C\"))) {\r\n // We have an opening quote; Make sure the previous quote is closed\r\n quoteLocations.add((start - 1));\r\n inQuote = false;\r\n }\r\n quoteLocations.add((start));\r\n inQuote = !inQuote;\r\n }\r\n // System.out.println(\"Quote locations: \"+quoteLocations);\r\n\r\n // Figure out which noun corresponds to which quote\r\n AnnotationSet sent = doc.getAnnotationSet(Constants.SENT);\r\n Iterator<Integer> quoteIter = quoteLocations.iterator();\r\n HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>();\r\n int counter = 1;\r\n while (quoteIter.hasNext()) {\r\n int qStart = quoteIter.next();\r\n if (!quoteIter.hasNext()) {\r\n break;\r\n }\r\n int qEnd = quoteIter.next() + 1;\r\n\r\n AnnotationSet sentences = sent.getOverlapping(qStart, qEnd);\r\n\r\n // Three cases for the size of the sentences set\r\n Annotation match, compMatch;\r\n if (sentences.size() < 1) {\r\n System.out.println(\"Quote is not covered by any sentence:\");\r\n int beg = qStart - 15;\r\n beg = beg < 0 ? 0 : beg;\r\n int en = qStart + 15;\r\n en = en >= text.length() ? text.length() - 1 : en;\r\n System.out.println(Utils.getAnnotText(beg, en, text));\r\n System.out.println(\"Position \" + qStart);\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n // throw new RuntimeException(\"Quote is not covered by any sentence\");\r\n }\r\n else if (sentences.size() == 1) {\r\n Annotation s = sentences.getFirst();\r\n // System.out.println(\"Sent: \"+Utils.getAnnotText(s, text));\r\n if (s.properCovers(qStart, qEnd)) {\r\n match = findReporter(qStart, qEnd, s, doc);\r\n compMatch = findCompany(qStart, qEnd, s, doc);\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n }\r\n else {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n sentReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), compMatch);\r\n }\r\n else {\r\n // The quoted string spans more than one sentence.\r\n Annotation beg = sentences.getFirst();\r\n // System.out.println(\"First sent: \"+Utils.getAnnotText(beg, text));\r\n Annotation end = sentences.getLast();\r\n // System.out.println(\"Last sent: \"+Utils.getAnnotText(end, text));\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n if (beg.getStartOffset() < qStart) {\r\n match = findReporter(qStart, qEnd, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, beg, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) {\r\n match = findReporter(qStart, qEnd, end, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n sentReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), match);\r\n sentReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), compMatch);\r\n compReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), compMatch);\r\n\r\n }\r\n reporters.put(counter, match);\r\n companies.put(counter, compMatch);\r\n counter += 2;\r\n\r\n // System.out.println(\"Quote: \"+Utils.getAnnotText(qStart, qEnd, text));\r\n // if(!match.equals(Annotation.getNullAnnot())){\r\n // System.out.println(\"Match: \"+Utils.getAnnotText(match, text));\r\n // }else{\r\n // System.out.println(\"no match!\");\r\n // }\r\n }\r\n int initial = quoteLocations.size();\r\n\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n for (Annotation a : nps.getOrderedAnnots()) {\r\n int s = a.getStartOffset();\r\n quoteLocations = quoteLocations.tailSet(s);\r\n int numQuotes = initial - quoteLocations.size();\r\n\r\n // System.err.println(numQuotes);\r\n if (numQuotes % 2 == 0) {\r\n a.setProperty(this, -1);\r\n a.setProperty(Property.AUTHOR, Annotation.getNullAnnot());\r\n a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot());\r\n }\r\n else {\r\n a.setProperty(this, numQuotes);\r\n a.setProperty(Property.AUTHOR, reporters.get(numQuotes));\r\n a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes));\r\n // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a,\r\n // text))==1\r\n // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){\r\n // Annotation repo = reporters.get(new Integer(numQuotes));\r\n // if(repo==null||repo.equals(Annotation.getNullAnnot())){\r\n // Annotation thisSent = sent.getOverlapping(a).getFirst();\r\n // System.out.println(\"*** No author in \"+Utils.getAnnotText(thisSent, text+\"***\"));\r\n // }\r\n // }\r\n }\r\n }\r\n // System.out.println(\"End of inquote\");\r\n\r\n return np.getProperty(this);\r\n}", "@Override\r\n public void annotate(Annotation annotation) {\r\n// System.out.println(\"Tokens\");\r\n// for(CoreLabel token : annotation.get(CoreAnnotations.TokensAnnotation.class)){\r\n for(int i=0;i<annotation.get(CoreAnnotations.TokensAnnotation.class).size();i++){\r\n CoreLabel token = annotation.get(CoreAnnotations.TokensAnnotation.class).get(i);\r\n// System.out.println(token.word() +\", tokenIndex = \"+i);\r\n if(token.word().equals(sch)) {\r\n// positions.add(token.index());\r\n token.set(SearchAnnotation.class,i); //index of the token is saved\r\n\r\n }\r\n }\r\n }", "private void checkTextAnnotation(MGraph g, UriRef textAnnotation, String content) {\n Iterator<Triple> selectedTextIterator = g.filter(textAnnotation,\n Properties.ENHANCER_SELECTED_TEXT, null);\n // check if the selected text is added\n assertTrue(selectedTextIterator.hasNext());\n // test if the selected text is part of the TEXT_TO_TEST\n Resource object = selectedTextIterator.next().getObject();\n assertTrue(object instanceof Literal);\n Literal selectedText = (Literal)object;\n object = null;\n assertTrue(content.indexOf(selectedText.getLexicalForm()) >= 0);\n // test if context is added\n //context not present for Zemanta\n// Iterator<Triple> selectionContextIterator = g.filter(textAnnotation,\n// Properties.ENHANCER_SELECTION_CONTEXT, null);\n// assertTrue(selectionContextIterator.hasNext());\n// // test if the selected text is part of the TEXT_TO_TEST\n// object = selectionContextIterator.next().getObject();\n// assertTrue(object instanceof Literal);\n// assertTrue(content.indexOf(((Literal)object).getLexicalForm()) >= 0);\n// object = null;\n //test start/end if present\n Iterator<Triple> startPosIterator = g.filter(textAnnotation,\n ENHANCER_START, null);\n Iterator<Triple> endPosIterator = g.filter(textAnnotation,\n ENHANCER_END, null);\n //start end is optional, but if start is present, that also end needs to be set\n if(startPosIterator.hasNext()){\n Resource resource = startPosIterator.next().getObject();\n //only a single start position is supported\n assertTrue(!startPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral startPosLiteral = (TypedLiteral) resource;\n resource = null;\n int start = LiteralFactory.getInstance().createObject(Integer.class, startPosLiteral);\n startPosLiteral = null;\n //now get the end\n //end must be defined if start is present\n assertTrue(endPosIterator.hasNext());\n resource = endPosIterator.next().getObject();\n //only a single end position is supported\n assertTrue(!endPosIterator.hasNext());\n assertTrue(resource instanceof TypedLiteral);\n TypedLiteral endPosLiteral = (TypedLiteral) resource;\n resource = null;\n int end = LiteralFactory.getInstance().createObject(Integer.class, endPosLiteral);\n endPosLiteral = null;\n //check for equality of the selected text and the text on the selected position in the content\n //System.out.println(\"TA [\"+start+\"|\"+end+\"]\"+selectedText.getLexicalForm()+\"<->\"+content.substring(start,end));\n assertTrue(content.substring(start, end).equals(selectedText.getLexicalForm()));\n } else {\n //if no start position is present, there must also be no end position defined\n assertTrue(!endPosIterator.hasNext());\n }\n }", "public void extractKnowledge()\n {\n }", "public static List<ExtractedEntity> extractEntities(String text){\n\t\tList<ExtractedEntity> extractedConcepts = new ArrayList<ExtractedEntity>();\n\t\tZemanta zem = new Zemanta(ZEMAMTA_API_KEY);\t\n\t\tZemantaResult zemResult = zem.suggest(text);\n\t\tString cid = zemResult.rid;\n\t\tfor(Link link : zemResult.markup.links){\n\t\t\tString term = link.anchor;\n\t\t\tfor(Target target : link.targets){\n\t\t\t\tif(target.url != null && target.url.startsWith(\"http://en.wikipedia.org/wiki/\")){\n\t\t\t\t\tExtractedEntity entity = new AlchemyAnnotator().new ExtractedEntity();\n\t\t\t\t\tentity.name = target.title;\n\t\t\t\t\tentity.type = target.type.name();\n\t\t\t\t\tentity.uri = target.url.replace(\"http://en.wikipedia.org/wiki/\", \"http://dbpedia.org/resource/\");\n\t\t\t\t\tentity.score = new Float(link.confidence).doubleValue();\n\t\t\t\t\tentity.text = link.anchor;\n\t\t\t\t\textractedConcepts.add(entity);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn extractedConcepts;\n\t}", "public abstract List<EventRule> getEventRulesOfSentence();", "@Override\n public void processCas(CAS aCas) throws ResourceProcessException {\nSystem.out.println(\"Retrival evaluator...\");\n JCas jcas;\n try {\n jcas = aCas.getJCas();\n } catch (CASException e) {\n throw new ResourceProcessException(e);\n }\n\n FSIterator it = jcas.getAnnotationIndex(Document.type).iterator();\n \n// if (it.hasNext()) {\n// Document doc = (Document) it.next();\n// cnt++;\n// }\n// log(cnt);\n it = jcas.getAnnotationIndex(Document.type).iterator();\n\n if (it.hasNext()) {\n Document doc = (Document) it.next();\n int queryid = doc.getQueryID();\n int rel = doc.getRelevanceValue();\n // Make sure that your previous annotators have populated this in CAS\n FSList fsTokenList = doc.getTokenList();\n ArrayList<Token> tokenList = Utils.fromFSListToCollection(fsTokenList, Token.class);\n Map<String, Integer> queryVector = new HashMap<String, Integer>();\n Map<String, Integer> docVector = new HashMap<String, Integer>();\n if (rel == 99) {\n for (Token t : tokenList) {\n queryVector.put(t.getText(), t.getFrequency());\n }\n queryVectorlist.add(queryVector);\n } else {\n for (Token t : tokenList) {\n docVector.put(t.getText(), t.getFrequency());\n }\n double cos = computeCosineSimilarity(queryVectorlist.get(queryid - 1), docVector);\n coslist.add(cos);\n\n if (rel == 1) {\n gold = lines;\n goldcos = cos;\n System.out.println(\"goldcos\"+goldcos);\n }\n }\n \n if (qIdList.size() >= 1 && qIdList.get(qIdList.size() - 1) != queryid) {\n// System.out.println(\"lines:\"+lines);\n sortSimilarity(coslist);\n log(coslist);\n int rank=findRank(coslist,goldcos);\n rankList.add(rank);\n coslist = new ArrayList<Double>();\n }\n\n qIdList.add(doc.getQueryID());// 有啥用???\n relList.add(doc.getRelevanceValue());\n\n // Do something useful here\n lines++;\n }\n //log(coslist);\n\n }", "default List<String> assignedConcepts(Source code){\n return assignedConcepts(code, ImmutableSet.of());\n }", "public Taxonomy getInterests();", "<T extends Annotation> IList<Object> getAnnotatedObjects(Class<T> type);", "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public void annotate(Annotation annotation) {\n if (VERBOSE) {\n System.err.print(\"Tokenizing ... \");\n }\n\n if (annotation.has(CoreAnnotations.TextAnnotation.class)) {\n String text = annotation.get(CoreAnnotations.TextAnnotation.class);\n Reader r = new StringReader(text);\n // don't wrap in BufferedReader. It gives you nothing for in-memory String unless you need the readLine() method!\n\n List<CoreLabel> tokens = getTokenizer(r).tokenize();\n // cdm 2010-05-15: This is now unnecessary, as it is done in CoreLabelTokenFactory\n // for (CoreLabel token: tokens) {\n // token.set(CoreAnnotations.TextAnnotation.class, token.get(CoreAnnotations.TextAnnotation.class));\n // }\n\n annotation.set(CoreAnnotations.TokensAnnotation.class, tokens);\n if (VERBOSE) {\n System.err.println(\"done.\");\n System.err.println(\"Tokens: \" + annotation.get(CoreAnnotations.TokensAnnotation.class));\n }\n } else {\n throw new RuntimeException(\"Tokenizer unable to find text in annotation: \" + annotation);\n }\n }", "public Collection<ConceptLabel> processSentence(Sentence sentence, List messages) {\n\t\t// long time = System.currentTimeMillis();\n\t\t// search in lexicon\n\t\tList<Concept> keys = lookupConcepts(sentence);\n\t\t\t\n\t\t// filter out overlapping numbers\n\t\tfilterNumbers(keys);\n\t\tfilterOverlap(keys);\t\t\t\n\t\t\n\t\t// take out concepts that overlap with new concepts\n\t\tList<ReportConcept> reparsedConcepts = new ArrayList<ReportConcept>();\n\t\tfor (ReportConcept c : concepts) {\n\t\t\t// if existing concept intersects this sentence\n\t\t\tif (intersects(c,sentence.getSpan())) {\n\t\t\t\treparsedConcepts.add(c);\n\t\t\t}\n\t\t}\n\n\t\t// take out concepts that will be reparsed anyway\n\t\tconcepts.removeAll(reparsedConcepts);\n\n\t\t// process phrase\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\n\t\tfor (Concept concept : keys) {\n\t\t\t// create new labels\n\t\t\tCollection<ConceptLabel> lbl = createConceptLabels(concept,sentence.getCharOffset());\n\t\t\tlabels.addAll(lbl);\n\n\t\t\t// get entry or create it\n\t\t\tReportConcept entry = createReportConcept(concept);\n\t\t\tentry.addLabels(lbl);\n\n\t\t\t// add to all concepts\n\t\t\tconcepts.add(entry);\n\t\t\t// negatedConcepts.remove(entry);\n\n\t\t\t// process numbers\n\t\t\tfor (ConceptLabel l : lbl)\n\t\t\t\tprocessNumericValues(entry, l);\n\t\t}\n\n\t\t// take care of negation\n\t\tnegex.clear();\n\t\tnegex.process(sentence, keys);\n\t\tlabels.addAll(processNegation(negex, messages));\n\n\t\t// backup concepts so that concepts that were merged outside of parsed\n\t\t// sentence could be removed after processing\n\t\tList<ReportConcept> backup = new ArrayList<ReportConcept>(concepts);\n\t\tbackup.removeAll(reparsedConcepts);\n\t\t\n\t\t// compact concepts to more specific constructs\n\t\tprocessConcepts(concepts);\n\t\n\t\t// at this point we can potentially have a situation where\n\t\t// one concept from this sentence subsumed another from the previous or next \n\t\t// sentence\n\t\tfor(ReportConcept c: backup){\n\t\t\tif(!concepts.contains(c))\n\t\t\t\tremovedConcepts.add(c);\n\t\t}\n\t\t\n\t\t// remove dangling digits and units, cause they are likely to be junk\n\t\tremoveDanglingAttributes();\t\t\n\t\t\n\t\t// now that we may have reparsed some concepts, lets\n\t\t// see if we can retain some of the old data\n\t\tfor (ReportConcept rc : reparsedConcepts) {\n\t\t\t// reparsed concept is in the list, then retain its data, if not\n\t\t\t// then it should be removed\n\t\t\tReportConcept nc = TextHelper.get(concepts, rc);\n\t\t\tif (nc != null) {\n\t\t\t\tnc.setConceptEntry(rc.getConceptEntry());\n\t\t\t} else {\n\t\t\t\tremovedConcepts.add(rc);\n\t\t\t}\n\t\t}\n\n\t\t// negate concepts and proces numbers\n\t\tfor (ReportConcept e : negatedConcepts) {\n\t\t\tReportConcept n = TextHelper.get(concepts, e);\n\t\t\tif (n != null) {\n\t\t\t\tn.setNegation(e.getNegation());\n\t\t\t}\n\t\t}\n\n\t\t// clear negation\n\t\tnegatedConcepts.clear();\n\n\t\t// do eggs\n\t\tEggs.processText(sentence.getOriginalString());\n\t\n\t\t// sync to interface\n\t\tsync();\n\t\t\n\t\treturn labels;\n\t}", "List<String> getTargetClassifications(Observation obs);", "@Test\n public void testEmbeddingAnnotatorWithFilterAnnotation() throws Exception {\n final JCas jCas = JCasFactory.createJCas(\"de.julielab.jcore.types.jcore-morpho-syntax-types\", \"de.julielab.jcore.types.jcore-semantics-biology-types\");\n String sentence1 = \"Dysregulated inflammation leads to morbidity and mortality in neonates.\";\n String sentence2 = \"97 healthy subjects were enrolled in the present study.\";\n jCas.setDocumentText(sentence1 + \" \" + sentence2);\n new Sentence(jCas, 0, sentence1.length()).addToIndexes();\n new Sentence(jCas, sentence1.length() + 1, sentence1.length() + 1 + sentence2.length()).addToIndexes();\n addTokens(jCas);\n new Gene(jCas, 13, 25).addToIndexes();\n // This annotation spans two tokens\n new Gene(jCas, 75, 91).addToIndexes();\n\n final String embeddingPath = \"flair:src/test/resources/gene_small_best_lm.pt\";\n final AnalysisEngine engine = AnalysisEngineFactory.createEngine(\"de.julielab.jcore.ae.fte.desc.jcore-flair-token-embedding-ae\",\n FlairTokenEmbeddingAnnotator.PARAM_EMBEDDING_PATH, embeddingPath,\n FlairTokenEmbeddingAnnotator.PARAM_COMPUTATION_FILTER, \"de.julielab.jcore.types.Gene\");\n\n engine.process(jCas);\n\n final Collection<Token> tokens = JCasUtil.select(jCas, Token.class);\n assertThat(tokens).hasSize(20);\n for (Token t : tokens) {\n if (t.getBegin() == 13 || t.getBegin() == 75 || t.getBegin() == 83) {\n assertThat(t.getEmbeddingVectors()).isNotNull().hasSize(1);\n assertThat(t.getEmbeddingVectors(0).getVector()).hasSize(1024);\n assertThat(t.getEmbeddingVectors(0).getSource()).isEqualTo(embeddingPath);\n } else {\n assertThat(t.getEmbeddingVectors()).isNull();\n }\n }\n engine.collectionProcessComplete();\n }", "Concept getConceptName();", "public ArrayList<Concept> getAllConcepts() {\n \treturn this.concepts.getAllContents();\n }", "@Override\n public Predicate generateOutputStructure(Predicate predicate) {\n Predicate modifiedPredicate = new Predicate(predicate.getPredicateName());\n phrase = nlgFactory.createClause();\n //create phrase using the annotations of each predicate element describing its function in the sentence\n for (PredicateElement element : predicate.getElements()) {\n if (element != null && element.getPredicateElementAnnotation() != null) {\n PredicateElementAnnotation elementAnnotation = element.getPredicateElementAnnotation();\n if (elementAnnotation.equals(PredicateElementAnnotation.subject)) {\n phrase.setSubject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.verb)) {\n phrase.setVerb(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.directObject)) {\n phrase.setObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.indirectObject)) {\n phrase.setIndirectObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.complement)) {\n phrase.setComplement(element.toString());\n }\n }\n }\n //get annotation which affect whole predicate and use them to create correct type of phrase\n if (predicate.getPredicateAnnotations() != null) {\n List<PredicateAnnotation> predicateAnnotations = predicate.getPredicateAnnotations();\n if (predicateAnnotations.contains(PredicateAnnotation.NEGATION)) {\n phrase.setFeature(Feature.NEGATED, true);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.YES_NO)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.YES_NO);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW_MANY)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW_MANY);\n }\n if (predicateAnnotations.contains((PredicateAnnotation.IMPERATIVE))) {\n phrase.setFeature(Feature.FORM, Form.IMPERATIVE);\n }\n }\n //create the output sentence\n String resultString = realiser.realiseSentence(phrase);\n setOutputStructure(resultString);\n //split output structure into its elements\n String resStructure = phrase.getParent().getFeatureAsString((\"textComponents\"));\n resStructure = resStructure.replace(\"[\", \"\");\n resStructure = resStructure.replace(\"]\", \"\");\n ArrayList<String> outputOrderList = new ArrayList<>();\n String[] resSplit = resStructure.split(\",\");\n for (int i = 0; i < resSplit.length; i++) {\n outputOrderList.add(resSplit[i].trim());\n }\n //create new predicate element list\n ArrayList<PredicateElement> modifiedPredicateElementList = new ArrayList<>();\n //use this orderList as new predicate element list -> order important for planning\n boolean elementAlreadyAdded = false;\n for (String outputOrderElement : outputOrderList) {\n //keep old predicate if worldobjectid and type were already set (\"I\", \"you\")\n for(PredicateElement element: predicate.getElements()) {\n if(element.getWorldObjectId() != null && element.toString().equals(outputOrderElement)) {\n modifiedPredicateElementList.add(element);\n elementAlreadyAdded = true;\n break;\n }\n }\n if(elementAlreadyAdded) {\n elementAlreadyAdded = false;\n continue;\n }\n modifiedPredicateElementList.add(new StringPredicateElement(outputOrderElement));\n }\n if(phrase.hasFeature(Feature.INTERROGATIVE_TYPE)) {\n modifiedPredicateElementList.add(new StringPredicateElement(\"?\"));\n }else {\n modifiedPredicateElementList.add(new StringPredicateElement(\".\"));\n }\n //set new elements for the modified predicate\n modifiedPredicate.setElements(modifiedPredicateElementList.toArray(new StringPredicateElement[modifiedPredicateElementList.size()]));\n return modifiedPredicate;\n }", "public static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void addText(IText text) {\n var name = \"Text\"; // TODO should texts have a name? E.g. the filename etc.?\n var textIndividual = ontologyConnector.addIndividualToClass(name, textClass);\n var uuid = ontologyConnector.getLocalName(textIndividual);\n ontologyConnector.addPropertyToIndividual(textIndividual, uuidProperty, uuid);\n\n ImmutableList<IWord> words = text.getWords();\n\n // first add all word individuals\n var wordIndividuals = new ArrayList<Individual>();\n var wordsToIndividuals = new HashMap<IWord, Individual>();\n for (var word : words) {\n var wordIndividual = addWord(word);\n wordIndividuals.add(wordIndividual);\n wordsToIndividuals.put(word, wordIndividual);\n }\n\n // add dependencies to words.\n // We only add outgoing dependencies as ingoing are the same (but viewed from another perspective)\n for (var word : words) {\n var wordIndividual = wordsToIndividuals.get(word);\n for (var dependencyType : DependencyTag.values()) {\n var outDependencies = word.getWordsThatAreDependencyOfThis(dependencyType);\n for (var outDep : outDependencies) {\n var outWordIndividual = wordsToIndividuals.get(outDep);\n addDependencyBetweenWords(wordIndividual, dependencyType, outWordIndividual);\n }\n }\n }\n\n // create the list that is used for the words property\n var olo = ontologyConnector.addList(\"WordsOf\" + name, wordIndividuals);\n var listIndividual = olo.getListIndividual();\n ontologyConnector.addPropertyToIndividual(textIndividual, wordsProperty, listIndividual);\n\n // add coref stuff\n var corefClusters = text.getCorefClusters();\n for (var corefCluster : corefClusters) {\n var representativeMention = corefCluster.getRepresentativeMention();\n var corefClusterIndividual = ontologyConnector.addIndividualToClass(representativeMention, corefClusterClass);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, uuidProperty, \"\" + corefCluster.getId());\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, representativeMentionProperty, representativeMention);\n ontologyConnector.addPropertyToIndividual(textIndividual, hasCorefClusterProperty, corefClusterIndividual);\n\n var counter = 0;\n for (var mention : corefCluster.getMentions()) {\n var id = corefCluster.getId() + \"_\" + counter;\n counter += 1;\n var label = ICorefCluster.getTextForMention(mention);\n\n var mentionIndividual = ontologyConnector.addIndividualToClass(label, corefMentionClass);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, uuidProperty, id);\n ontologyConnector.addPropertyToIndividual(corefClusterIndividual, mentionProperty, mentionIndividual);\n\n var mentionWordsIndividuals = getMentionWordIndividuals(mention, wordsToIndividuals);\n var mentionOlo = ontologyConnector.addList(\"WordsOf Mention \" + id, mentionWordsIndividuals);\n ontologyConnector.addPropertyToIndividual(mentionIndividual, wordsProperty, mentionOlo.getListIndividual());\n }\n }\n\n }", "DataMap getCustomAnnotations();", "private Collection<ConceptLabel> createConceptLabels(Concept concept, int offset) {\n\t\t//int offset = concept.getOffset();\n\t\tList<ConceptLabel> labels = new ArrayList<ConceptLabel>();\n\t\t// add annotation the new way\n\t\tfor(Annotation a: concept.getAnnotations()){\n\t\t\tConceptLabel lbl = new ConceptLabel(a.getText(), offset + a.getOffset());\n\t\t\tlbl.setConcept(concept);\n\t\t\tlbl.setReportPanel(reportInterface);\n\t\t\tlbl.setColor(Color.black);\n\t\t\tlabels.add(lbl);\n\t\t}\n\t\t\n\t\t\n\t\treturn labels;\n\t}", "public String getAnnotation();", "@Override\n\tprotected Map<Object, Object> rawTextParse(CharSequence text) {\n\n\t\tStanfordCoreNLP pipeline = null;\n\t\ttry {\n\t\t\tpipeline = pipelines.take();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tAnnotation document = new Annotation(text.toString());\n\t\tpipeline.annotate(document);\n\t\tMap<Object, Object> sentencesMap = new LinkedHashMap<Object, Object>();//maintain sentence order\n\t\tint id = 0;\n\t\tList<CoreMap> sentences = document.get(CoreAnnotations.SentencesAnnotation.class);\n\n\t\tfor (CoreMap sentence : sentences) {\n\t\t\tStringBuilder processedText = new StringBuilder();\n\t\t\tfor (CoreLabel token : sentence.get(CoreAnnotations.TokensAnnotation.class)) {\n\t\t\t\tString word = token.get(CoreAnnotations.TextAnnotation.class);\n\t\t\t\tString lemma = token.get(CoreAnnotations.LemmaAnnotation.class);\n\t\t\t\tString pos = token.get(CoreAnnotations.PartOfSpeechAnnotation.class);\n\t\t\t\t//todo this should really happen after parsing is done, because using lemmas might confuse the parser\n\t\t\t\tif (config().isUseLowercaseEntries()) {\n\t\t\t\t\tword = word.toLowerCase();\n\t\t\t\t\tlemma = lemma.toLowerCase();\n\t\t\t\t}\n\t\t\t\tif (config().isUseLemma()) {\n\t\t\t\t\tword = lemma;\n\t\t\t\t}\n\t\t\t\tprocessedText.append(word).append(POS_DELIMITER).append(lemma).append(POS_DELIMITER).append(pos).append(TOKEN_DELIM);\n //inserts a TOKEN_DELIM at the end too\n\t\t\t}\n\t\t\tsentencesMap.put(id, processedText.toString().trim());//remove the single trailing space\n\t\t\tid++;\n\t\t}\n\t\ttry {\n\t\t\tpipelines.put(pipeline);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn sentencesMap;\n\t}", "@Test\n public void InternalNLP_annotate_doesAnnotate() {\n ExtractedText extractedText = null;\n\n String fileUri = \"dummyUri\";\n String fileRef = \"src/test/res/Pasta.txt\";\n File file = new File(fileRef);\n try {\n InputStream inputStream = new FileInputStream(file);\n extractedText = mInternalTextProcessor.processFile(inputStream, fileUri, fileRef\n , \"txt\", false);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (FileTypeNotSupportedException e) {\n e.printStackTrace();\n } catch (DocumentNotSupportedException e) {\n e.printStackTrace();\n }\n\n // Annotate\n mInternalNLP.annotate(extractedText);\n\n if(!extractedText.getTitle().isEmpty()) {\n Assert.assertNotNull(extractedText.getTitleAnnotation());\n }\n\n for (Section section: extractedText.getSections()) {\n if(!section.getBody().isEmpty()) {\n Assert.assertNotNull(section.getBodyAnnotation());\n }\n if(!section.getTitle().isEmpty()) {\n Assert.assertNotNull(section.getTitleAnnotation());\n }\n }\n }", "default List<AnnotationContext<?>> allAnnotations() {\n\n return annotations().stream()\n .flatMap(annotation -> annotation.valueType().<Stream<AnnotationContext<?>>>map(valueType -> {\n if (valueType.isArray()) {\n final TypeContext componentType = valueType.arrayComponentType();\n final AnnotationContext<Repeatable> rep = componentType.annotation(Repeatable.class);\n if (rep != null && rep.value().equals(annotation.annotationType())) {\n final Annotation[] repeated = annotation.value();\n return Arrays.stream(repeated).map(AnnotationContext::new);\n }\n }\n return Stream.of(annotation);\n }).orElseGet(() -> Stream.of(annotation)))\n .collect(Collectors.toList());\n }", "public String[] getAnnotationList(String annotationKeyType);", "@Word(word = \"First\", value = 1) \n\t public static void newMethod(){ \n\t\t FullAnnotationProgram obj = new FullAnnotationProgram(); \n\n\t try{ \n\t Class<?> c = obj.getClass(); \n\n\t // Obtain the annotation for newMethod \n\t Method m = c.getMethod(\"newMethod\"); \n\t \n\t // Display the full annotation \n\t Annotation anno = m.getAnnotation(CustomRepeatAnnots.class); \n\t System.out.println(anno); \n\t }catch (NoSuchMethodException e){ \n\t System.out.println(e); \n\t } \n\t }", "public interface IFlexoOntologyConcept<TA extends TechnologyAdapter<TA>> extends IFlexoOntologyObject<TA> {\n\t/**\n\t * Ontology of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntology<TA> getOntology();\n\n\t/**\n\t * Annotation upon Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyAnnotation> getAnnotations();\n\n\t/**\n\t * Container of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntologyConceptContainer<TA> getContainer();\n\n\t/**\n\t * Association with structural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getStructuralFeatureAssociations();\n\n\t/**\n\t * Association with behavioural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getBehaviouralFeatureAssociations();\n\n\t/**\n\t * \n\t * Is this a Super Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSuperConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * \n\t * Is this a Sub Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSubConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Visitor access.\n\t * \n\t * @param visitor\n\t * @return\n\t * \n\t * @pattern visitor\n\t */\n\tpublic <T> T accept(IFlexoOntologyConceptVisitor<T> visitor);\n\n\t/**\n\t * This equals has a particular semantics (differs from {@link #equals(Object)} method) in the way that it returns true only and only if\n\t * compared objects are representing same concept regarding URI. This does not guarantee that both objects will respond the same way to\n\t * some methods.<br>\n\t * This method returns true if and only if objects are same, or if one of both object redefine the other one (with eventual many levels)\n\t * \n\t * @param o\n\t * @return\n\t */\n\tpublic boolean equalsToConcept(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Return all properties accessible in the scope of this ontology object, where declared domain is this object\n\t * \n\t * @return\n\t */\n\n}", "public void process (String text) {\n\t\tProperties props = new Properties();\n\t\tprops.put(\"annotators\", \"tokenize, ssplit, pos, lemma, ner, parse, dcoref\");\n\t\tStanfordCoreNLP pipeline = new StanfordCoreNLP(props);\n\t\tAnnotation document = new Annotation(text);\n\t\tpipeline.annotate(document);\n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\tfor(CoreMap sentence: sentences) {\n\t\t\tsgs.add(sentence.get(CollapsedCCProcessedDependenciesAnnotation.class));\n\t\t}\n\t\tccg = document.get(CorefChainAnnotation.class);\n\t}", "private void findConceptsForInstances() {\n\t\tSet<String> temp = new HashSet<String>();\n\n\t\tfor (String s : taskInput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskInput.clear();\n\t\ttaskInput.addAll(temp);\n\n\t\ttemp.clear();\n\t\tfor (String s : taskOutput)\n\t\t\ttemp.add(taxonomyMap.get(s).parents.get(0).value);\n\t\ttaskOutput.clear();\n\t\ttaskOutput.addAll(temp);\n\n\t\tfor (Node s : serviceMap.values()) {\n\t\t\ttemp.clear();\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tfor (String i : inputs)\n\t\t\t\ttemp.add(taxonomyMap.get(i).parents.get(0).value);\n\t\t\tinputs.clear();\n\t\t\tinputs.addAll(temp);\n\n\t\t\ttemp.clear();\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tfor (String o : outputs)\n\t\t\t\ttemp.add(taxonomyMap.get(o).parents.get(0).value);\n\t\t\toutputs.clear();\n\t\t\toutputs.addAll(temp);\n\t\t}\n\t}", "org.hl7.fhir.CodeableConcept getInterpretation();", "public String lemmatise(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "private List<Concept> getConceptList(String id, Terminology terminology, IncludeParam ip)\n throws JsonMappingException, JsonProcessingException {\n Optional<ElasticObject> esObject = getElasticObject(id, terminology);\n if (!esObject.isPresent()) {\n return Collections.<Concept> emptyList();\n }\n\n List<Concept> concepts = esObject.get().getConcepts();\n return ConceptUtils.applyInclude(concepts, ip);\n }", "Set<? extends Class<? extends Annotation>> annotations();", "public ElementList[] getAnnotations() {\r\n return union.value();\r\n }", "@Override\n public void process(JCas jcas)\n throws AnalysisEngineProcessException\n {\n \tfor (LineAnnotation line : JCasUtil.select(jcas, LineAnnotation.class)) {\n String pText = line.getCoveredText();\n int boundary = pText.length();\n int start = 0;\n int end = 0;\n\n while (start < boundary) {\n while (start < boundary && (Character.isSpaceChar(pText.charAt(start)) || Character.isWhitespace(pText.charAt(start))) ) {\n start++;\n }\n\n for (end = start; end < boundary && !(Character.isSpaceChar(pText.charAt(end)) || Character.isWhitespace(pText.charAt(end))); end++);\n \n if (start < boundary) {\n Token tokenAnnotation = new Token(jcas);\n tokenAnnotation.setBegin(start+line.getBegin());\n tokenAnnotation.setEnd(end+line.getBegin());\n tokenAnnotation.addToIndexes();\n }\n start = end + 1;\n }\n \t}\n }", "@PropertyGetter(role = ANNOTATION)\n\tList<CtAnnotation<? extends Annotation>> getAnnotations();", "private void findConceptsForInstances() {\n\t\tfor (int i = 0; i < INPUT.length; i++)\n\t\t\tINPUT[i] = taxonomyMap.get(INPUT[i]).parent.value;\n\n\t\tfor (int i = 0; i < OUTPUT.length; i++)\n\t\t\tOUTPUT[i] = taxonomyMap.get(OUTPUT[i]).parent.value;\n\n\t\tavailableInputs = new HashSet<String>(Arrays.asList(INPUT));\n\t\trequiredOutputs = new HashSet<String>(Arrays.asList(OUTPUT));\n\n\t\tfor (ServiceNode s : serviceMap.values()) {\n\t\t\tSet<String> inputs = s.getInputs();\n\t\t\tSet<String> newInputs = new HashSet<String>();\n\n\t\t\tfor (String i : inputs)\n\t\t\t\tnewInputs.add(taxonomyMap.get(i).parent.value);\n\t\t\ts.setInputs(newInputs);\n\n\t\t\tSet<String> outputs = s.getOutputs();\n\t\t\tSet<String> newOutputs = new HashSet<String>();\n\n\t\t\tfor (String i : outputs)\n\t\t\t\tnewOutputs.add(taxonomyMap.get(i).parent.value);\n\t\t\ts.setOutputs(newOutputs);\n\t\t}\n\t}", "@Test\n public void testRead() throws Exception {\n String data = \"\\n/*\\n * @Description(value=\\\"Her er en forklaring\\\")\\n\"+\n \"@Parameter(name=\\\"text\\\",type=\\\"String\\\") \\n*/\"+\n \"@Parameter(name=\\\"illegal\\\",type=\\\"String\\\")\";\n System.out.println(\"read\");\n InputStream inputStream = new ByteArrayInputStream(data.getBytes());\n List<ScriptAnnotation.Annotation> result = ScriptAnnotation.read(inputStream);\n \n assertEquals(2, result.size());\n assertEquals(\"Description\", result.get(0).getName());\n assertEquals(\"Parameter\", result.get(1).getName());\n assertEquals(\"text\", result.get(1).getMap().get(\"name\"));\n \n \n }", "private static void iterateInput(){\n boolean isReadingKnowledgeBase = false;\n boolean isReadingProveStatements = false;\n\n String[] kb = readInput().split(\"\\\\r?\\\\n\");\n for(String sentence : kb){\n if(sentence.contains(\"Knowledge Base:\")){\n isReadingKnowledgeBase = true;\n isReadingProveStatements = false;\n } else if(sentence.contains(\"Prove the following sentences by refutation:\")){\n isReadingKnowledgeBase = false;\n isReadingProveStatements = true;\n } else {\n if(isReadingKnowledgeBase && !sentence.isEmpty()) {\n knowledgeBase.add(evalSentence(sentence));\n } else if(isReadingProveStatements && !sentence.isEmpty()){\n proveStatements.add(evalSentence(sentence));\n }\n }\n }\n }", "public static Annotation ruleResolvePronoun(Annotation[] basenps, int num, Document doc)\r\n{\n Annotation np2 = basenps[num];\r\n // Get some properties of the np\r\n FeatureUtils.PRTypeEnum type2 = Pronoun.getValue(np2, doc);\r\n String str2 = doc.getAnnotString(np2);\r\n boolean reflexive = FeatureUtils.isReflexive(str2);\r\n // Get the possible antecedents\r\n ArrayList<Annotation> antes = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums = new ArrayList<Integer>();\r\n if (DEBUG) {\r\n System.err.println(\"Pronoun: \" + doc.getAnnotText(np2));\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.FIRST) {\r\n if (NumberEnum.SINGLE.equals(Number.getValue(np2, doc)))\r\n return ruleResolvePronounI(np2, basenps, num, doc);\r\n else\r\n return ruleResolvePronounWe(np2, basenps, num, doc);\r\n }\r\n if (FeatureUtils.getPronounPerson(str2) == PersonPronounTypeEnum.SECOND)\r\n return ruleResolvePronounYou(np2, basenps, num, doc);\r\n else {\r\n int sentnum = 0;\r\n for (int i = num - 1; i >= 0 && sentnum <= 3; i--) {\r\n Annotation np1 = basenps[i];\r\n sentnum = sentNum(np1, np2, doc);\r\n if (DEBUG) {\r\n System.err.println(\"Possible antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n if (!isNumberIncompatible(np1, np2, doc) && !isGenderIncompatible(np1, np2, doc)\r\n && !isAnimacyIncompatible(np1, np2, doc) && isWNClassComp(np1, np2, doc) && isProComp(np1, np2, doc)\r\n && !Embedded.getValue(np1, doc) && isSyntax(np1, np2, doc)) {\r\n if (DEBUG) {\r\n System.err.println(\"Candidate antecedent: \" + i + \" :\" + doc.getAnnotText(np1));\r\n }\r\n antes.add(0, np1);\r\n nums.add(0, i);\r\n }\r\n }\r\n }\r\n if (antes.size() == 0) return null;\r\n // Check for reflexsives\r\n if (FeatureUtils.isReflexive(doc.getAnnotText(np2))) {\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n if (antes.size() == 1) {\r\n // Rule 1: Unique in discourse\r\n if (DEBUG) {\r\n System.err.println(\"Rule 1 match!!!\");\r\n }\r\n union(nums.get(0).intValue(), num);\r\n return antes.get(0);\r\n }\r\n // Rule 2: Reflexive -- the last possible antecedent\r\n if (reflexive) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 2 match!!!\");\r\n }\r\n union(nums.get(nums.size() - 1).intValue(), num);\r\n return antes.get(antes.size() - 1);\r\n }\r\n // Rule 3: Unique current + Prior\r\n ArrayList<Annotation> antes1 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums1 = new ArrayList<Integer>();\r\n int counter = 0;\r\n for (Annotation np1 : antes) {\r\n if (sentNum(np1, np2, doc) < 2) {\r\n antes1.add(np1);\r\n nums1.add(nums.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes1.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 3 match!!!\");\r\n }\r\n union(nums1.get(0).intValue(), num);\r\n return antes1.get(0);\r\n }\r\n // Rule 4: Possesive Pro\r\n\r\n if (FeatureUtils.isPossesive(str2) && antes1.size() > 0) {\r\n Integer found = null;\r\n Annotation ant = null;\r\n boolean multiple = false;\r\n for (int i = 0; i < antes1.size() && !multiple; i++) {\r\n Annotation np1 = antes1.get(i);\r\n if (doc.getAnnotText(np1).equalsIgnoreCase(str2) && sentNum(np1, np2, doc) == 1) {\r\n if (found == null) {\r\n found = nums1.get(i);\r\n ant = antes1.get(i);\r\n }\r\n else {\r\n multiple = true;\r\n }\r\n }\r\n }\r\n if (!multiple && found != null) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 4 match!!!\");\r\n }\r\n union(found.intValue(), num);\r\n return ant;\r\n }\r\n }\r\n // Rule #5: Unique in the current sentence\r\n ArrayList<Annotation> antes2 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums2 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes1) {\r\n if (sentNum(np1, np2, doc) < 1) {\r\n antes2.add(np1);\r\n nums2.add(nums1.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (antes2.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Rule 5 match!!!\");\r\n }\r\n union(nums2.get(0).intValue(), num);\r\n return antes2.get(0);\r\n }\r\n // Extra Rule: Unique in the current clause (or parent clauses\r\n AnnotationSet parse = doc.getAnnotationSet(Constants.PARSE);\r\n Annotation clause = SyntaxUtils.getClause(np2, parse);\r\n while (clause != null) {\r\n ArrayList<Annotation> antes3 = new ArrayList<Annotation>();\r\n ArrayList<Integer> nums3 = new ArrayList<Integer>();\r\n counter = 0;\r\n for (Annotation np1 : antes2) {\r\n if (clause.covers(np1)) {\r\n antes3.add(np1);\r\n nums3.add(nums2.get(counter));\r\n }\r\n counter++;\r\n }\r\n if (DEBUG) {\r\n System.err.println(antes3.size() + \" antecedents in the clause\");\r\n }\r\n if (antes3.size() == 1) {\r\n if (DEBUG) {\r\n System.err.println(\"Clause rule match!!!\");\r\n }\r\n union(nums3.get(0).intValue(), num);\r\n return antes3.get(0);\r\n }\r\n clause = SyntaxUtils.getParentClause(clause, parse);\r\n }\r\n\r\n // Rule #6: Unique Subject\r\n\r\n // //Look for the subject in the current sentence\r\n // boolean unique = true;\r\n // Annotation subject = null;\r\n // Integer subjectNum = null;\r\n // for(int i=antes.size()-1; i>=0; i--){\r\n // Annotation np1 = antes.get(i);\r\n // if(sentNum(np1, np2, annotations, text)==0){\r\n // if(FeatureUtils.getGramRole(np1, annotations, text).equals(\"SUBJECT\")){\r\n // //&&SyntaxUtils.isMainClause(np1, parse)){\r\n // if(DEBUG)\r\n // System.err.println(\"Rule 6 match!!!\");\r\n // if(subjectNum!=null)\r\n // unique=false;\r\n // subjectNum = nums.get(i);\r\n // subject = antes.get(i);\r\n // }\r\n // }\r\n // }\r\n\r\n // if(subject!=null&&unique){\r\n // union(subjectNum.intValue(), num);\r\n // return subject;\r\n // }\r\n\r\n // Look for the subject in the previous sentence\r\n boolean unique = true;\r\n Annotation subject = null;\r\n Integer subjectNum = null;\r\n if (GramRole.getValue(np2, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np2, parse)){\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 1) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6 match!!!\");\r\n }\r\n if (subjectNum != null) {\r\n unique = false;\r\n }\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null && unique) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n subjectNum = null;\r\n subject = null;\r\n\r\n // One more Rule -- assign possessive pronouns to the last subject\r\n if (type2.equals(FeatureUtils.PRTypeEnum.POSSESSIVE)) {\r\n for (int i = antes.size() - 1; i >= 0; i--) {\r\n Annotation np1 = antes.get(i);\r\n if (sentNum(np1, np2, doc) == 0) {\r\n if (GramRole.getValue(np1, doc).equals(\"SUBJECT\")) {\r\n // &&SyntaxUtils.isMainClause(np1, parse)){\r\n if (DEBUG) {\r\n System.err.println(\"Rule 6a match!!!\");\r\n }\r\n if (subject == null) {\r\n subjectNum = nums.get(i);\r\n subject = antes.get(i);\r\n }\r\n }\r\n }\r\n }\r\n if (subject != null) {\r\n union(subjectNum.intValue(), num);\r\n return subject;\r\n }\r\n }\r\n\r\n return null;\r\n}", "String legalTerms();", "protected void createInputAnnotations() {\n\t\tString source = \"http://www.eclipse.org/ecl/input\";\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getPrint_Input(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getWriteCsvFile_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getSelectColumns_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getReadLines_Uri(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t\taddAnnotation\n\t\t (getSelectRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getExcludeRows_Table(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\t\t\t\t\n\t\taddAnnotation\n\t\t (getAsTableData_Input(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\t\t\n\t}", "public List<Annotation> getAnnotations() {\n return this.annotations.obtainAll();\n }", "public List<TextQuestion> TextQuestions(int aid);", "public ArrayList getAttributeList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n ArrayList adjAtt = new ArrayList();\n int separator = 0;\n List<Tree> leaves;\n String phraseNotation = \"NP([<NNS|NN|NNP]![<JJ|VBG])!$VP\";// !<VBG\";//@\" + phrase + \"! << @\" + phrase;\n\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n int adjectiveExist = 0;\n String adj = \"\";\n String attribute = \"\";\n String b = \"\";\n\n if (innerChild.length > 1) {\n int count = 1;\n\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\") || inChild.value().equals(\",\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).toString();\n if (designEleList.contains(adj)) {\n adj = \"\";\n }\n }\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (count == 1) {\n if (adjectiveExist == 1) {\n attribute = adj + \" \" + leaves.get(0).yieldWords().get(0).word();\n } else {\n attribute = leaves.get(0).yieldWords().get(0).word();\n }\n if (!designEleList.contains(attribute)) {\n String identifiedWord = attribute;\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n\n } else if (count >= 2 && separator == 0) {\n if (!attribute.contains(\"_\")) {\n\n attributeLists.remove(morphology.stem(attribute));\n attributeLists.remove(attribute);\n } else {\n attributeLists.remove(attribute);\n }\n\n attribute += \" \" + (leaves.get(0).yieldWords()).get(0).word();\n attributeLists.add(attribute);\n } else if (count >= 2 && separator == 1) {\n attribute = (leaves.get(0).yieldWords()).get(0).word();\n if (!attribute.contains(\"_\")) {\n attributeLists.add(morphology.stem(attribute));\n } else {\n attributeLists.add(attribute);\n }\n separator = 0;\n }\n count++;\n }\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n attributeLists.add(morphology.stem(identifiedWord));\n } else {\n attributeLists.add(identifiedWord);\n }\n }\n }\n }\n }\n adjAtt = getAdjectiveAttribute();\n if (!adjAtt.isEmpty()) {\n String att = \"\";\n for (int i = 0; i < adjAtt.size(); i++) {\n att = adjAtt.get(i).toString();\n if (!att.isEmpty() || !att.equals(\"\") || !(att.equals(\" \"))) {\n attributeLists.add(att.trim());\n }\n }\n }\n\n System.out.println(\"ATTRIBUTE LIST :\" + attributeLists);\n return attributeLists;\n\n }", "@Override\r\n\tpublic void processInputDetails() {\r\n\t\t// Decorate input details.\r\n\t\tString match = \"\";\r\n\t\tList<String> sentences = id.getSentences();\r\n\r\n\t\tfinal int size = sentences.size();\r\n\t\tfor(int i=0; i<size; i++){\r\n\t\t\tfor(String keyword : listOfKeywords) {\r\n\t\t\t\tmatch = \"(?i)(\\\\b\" + keyword + \"\\\\b)\";\r\n\t\t\t\tsentences.set(i, sentences.get(i).replaceAll(match, (KEYWORD_PREFIX + \"$1\" + KEYWORD_SUFFIX)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Forward to the next decorator, if any.\r\n\t\tif (null != atd) {\r\n\t\t\tatd.processInputDetails();\r\n\t\t}\r\n\t}", "public interface Tokenizer {\n\n List<Token> parse(String text);\n}", "public List<String> tag(List<String> text) {\n\n\t\t// Create a data container for a sentence\n\n\t\tString[] s = new String[text.size() + 1];\n\t\ts[0] = \"root\";\n\t\tfor (int j = 0; j < text.size(); j++)\n\t\t\ts[j + 1] = text.get(j);\n\t\ti.init(s);\n\t\t// System.out.println(EuroLangTwokenizer.tokenize(text));\n\n\t\t// lemmatizing\n\n\t\t// System.out.println(\"\\nReading the model of the lemmatizer\");\n\t\t// Tool lemmatizer = new\n\t\t// Lemmatizer(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.lemmatizer.model\");\n\t\t// // create a lemmatizer\n\n\t\t// System.out.println(\"Applying the lemmatizer\");\n\t\t// lemmatizer.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Lemmata: \"); for (String l : i.plemmas)\n\t\t// System.out.print(l+\" \"); System.out.println();\n\n\t\t// morphologic tagging\n\n\t\t// System.out.println(\"\\nReading the model of the morphologic tagger\");\n\t\t// is2.mtag.Tagger morphTagger = new\n\t\t// is2.mtag.Tagger(\"resources.spanish/CoNLL2009-ST-Spanish-ALL.anna-3.3.morphtagger.model\");\n\n\t\t// System.out.println(\"\\nApplying the morpholoigc tagger\");\n\t\t// morphTagger.apply(i);\n\n\t\t// System.out.print(i.toString());\n\t\t// System.out.print(\"Morph: \"); for (String f : i.pfeats)\n\t\t// System.out.print(f+\" \"); System.out.println();\n\n\t\t// part-of-speech tagging\n\n\t\t// System.out.println(\"\\nReading the model of the part-of-speech tagger\");\n\n//\t\tSystem.out.println(\"Applying the part-of-speech tagger\");\n\t\ttagger.apply(i);\n\t\tList<String> tags = new ArrayList<String>(i.ppos.length - 1);\n\t\tfor (int j = 1; j < i.ppos.length; j++)\n\t\t\ttags.add(i.ppos[j]);\n\t\treturn tags;\n\t\t// System.out.println(\"Part-of-Speech tags: \");\n\t\t// for (String p : i.ppos)\n\t\t// System.out.print(p + \" \");\n\t\t// System.out.println();\n\n\t\t// parsing\n\n\t\t// System.out.println(\"\\nReading the model of the dependency parser\");\n\t\t// Tool parser = new Parser(\"models/prs-spa.model\");\n\n\t\t// System.out.println(\"\\nApplying the parser\");\n\t\t// parser.apply(i);\n\n\t\t// System.out.println(i.toString());\n\n\t\t// write the result to a file\n\n\t\t// CONLLWriter09 writer = new\n\t\t// is2.io.CONLLWriter09(\"example-out.txt\");\n\n\t\t// writer.write(i, CONLLWriter09.NO_ROOT);\n\t\t// writer.finishWriting();\n\n\t}", "default List<String> interestingConcepts(int topK, UnitLocation located,\n Set<Location> irrelevantSet){\n // collect frequent words outside the blacklist of locations\n final TokenIterator extractor = new TokenIterator(irrelevantSet);\n located.getUnitNode().accept(extractor);\n\n final WordCounter wordCounter = new WordCounter(extractor.getItems());\n\n return wordCounter.mostFrequent(topK);\n }", "public ArrayList<String> processText(String text)\r\n\t{\r\n\t\tArrayList<String> terms = new ArrayList<>();\r\n\r\n\t\t// P2\r\n\t\t// Tokenizing, normalizing, stopwords, stemming, etc.\r\n\t\tArrayList<String> tokens = tokenize(text);\r\n\t\tfor(String term: tokens){\r\n\t\t\tString norm = normalize(term);\r\n\t\t\tif(!isStopWord(norm)){\r\n\t\t\t\tString stem = stem(norm);\r\n\t\t\t\tterms.add(stem);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terms;\r\n\t}", "TextWithReferences getTextWithReferences();", "public String getAnnotations() {\n\t\treturn annotations;\n\t}", "public void getTerm()\n\t\t{\n\t\t\t//Open SciencePhrases.txt\n\t\t\tFile f1 = new File(\"SciencePhrases.txt\");\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tspIn = new Scanner(f1);\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Cannot create SciencePhrases.txt to be written \"\n\t\t\t\t\t\t+ \"to.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\t//Storing term at curTerm in the variables term and picTerm\n\t\t\tString cur = new String(\"\");\n\t\t\tfor(int i = 0; i<curTerm; i++)\n\t\t\t{\n\t\t\t\tterm = \"\";\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tpicTerm = cur;\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t{\n\t\t\t\t\tterm += cur;\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "public Vector getSampleAnnotationFieldNames();", "protected void createSemanticAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/semantic\";\t\n\t\taddAnnotation\n\t\t (this, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedStateMachines(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinkCategories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_OwnedAbstractType(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_OwnedExchangeItemAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (exchangeItemAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_SendProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_ReceiveProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatedItem(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_LinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_Categories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizingPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkCategoryEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkCategory_Links(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizedPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizingPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_NextInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathReferenceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizingPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\n\t}", "public interface WordAnalyser {\n\n /**\n * Gets the bounds of all words it encounters in the image\n * \n */\n List<Rectangle> getWordBoundaries();\n\n /**\n * Gets the partial binary pixel matrix of the given word.\n * \n * @param wordBoundary\n * The bounds of the word\n */\n BinaryImage getWordMatrix(Rectangle wordBoundary);\n\n}", "interface Literals\n {\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.DocumentoImpl <em>Documento</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.DocumentoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getDocumento()\n * @generated\n */\n EClass DOCUMENTO = eINSTANCE.getDocumento();\n\n /**\n * The meta object literal for the '<em><b>Path Modelo</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DOCUMENTO__PATH_MODELO = eINSTANCE.getDocumento_PathModelo();\n\n /**\n * The meta object literal for the '<em><b>Path Ocl</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DOCUMENTO__PATH_OCL = eINSTANCE.getDocumento_PathOcl();\n\n /**\n * The meta object literal for the '<em><b>Oraciones</b></em>' containment reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference DOCUMENTO__ORACIONES = eINSTANCE.getDocumento_Oraciones();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OracionImpl <em>Oracion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OracionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOracion()\n * @generated\n */\n EClass ORACION = eINSTANCE.getOracion();\n\n /**\n * The meta object literal for the '<em><b>Contenido</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ORACION__CONTENIDO = eINSTANCE.getOracion_Contenido();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.SimpleImpl <em>Simple</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.SimpleImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getSimple()\n * @generated\n */\n EClass SIMPLE = eINSTANCE.getSimple();\n\n /**\n * The meta object literal for the '<em><b>Determinante</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__DETERMINANTE = eINSTANCE.getSimple_Determinante();\n\n /**\n * The meta object literal for the '<em><b>Atributo</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__ATRIBUTO = eINSTANCE.getSimple_Atributo();\n\n /**\n * The meta object literal for the '<em><b>Sintagma</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__SINTAGMA = eINSTANCE.getSimple_Sintagma();\n\n /**\n * The meta object literal for the '<em><b>Contexto</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__CONTEXTO = eINSTANCE.getSimple_Contexto();\n\n /**\n * The meta object literal for the '<em><b>Obligacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__OBLIGACION = eINSTANCE.getSimple_Obligacion();\n\n /**\n * The meta object literal for the '<em><b>Operacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference SIMPLE__OPERACION = eINSTANCE.getSimple_Operacion();\n\n /**\n * The meta object literal for the '<em><b>Literal</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SIMPLE__LITERAL = eINSTANCE.getSimple_Literal();\n\n /**\n * The meta object literal for the '<em><b>Fin Oracion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SIMPLE__FIN_ORACION = eINSTANCE.getSimple_FinOracion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.DeterminanteImpl <em>Determinante</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.DeterminanteImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getDeterminante()\n * @generated\n */\n EClass DETERMINANTE = eINSTANCE.getDeterminante();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute DETERMINANTE__DESCRIPCION = eINSTANCE.getDeterminante_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.AtributoImpl <em>Atributo</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.AtributoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getAtributo()\n * @generated\n */\n EClass ATRIBUTO = eINSTANCE.getAtributo();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATRIBUTO__NAME = eINSTANCE.getAtributo_Name();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.SintagmaPreposicionalImpl <em>Sintagma Preposicional</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.SintagmaPreposicionalImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getSintagmaPreposicional()\n * @generated\n */\n EClass SINTAGMA_PREPOSICIONAL = eINSTANCE.getSintagmaPreposicional();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute SINTAGMA_PREPOSICIONAL__DESCRIPCION = eINSTANCE.getSintagmaPreposicional_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ObligacionImpl <em>Obligacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ObligacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getObligacion()\n * @generated\n */\n EClass OBLIGACION = eINSTANCE.getObligacion();\n\n /**\n * The meta object literal for the '<em><b>Negacion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OBLIGACION__NEGACION = eINSTANCE.getObligacion_Negacion();\n\n /**\n * The meta object literal for the '<em><b>Obligacion Deber</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference OBLIGACION__OBLIGACION_DEBER = eINSTANCE.getObligacion_ObligacionDeber();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ObligacionDeberImpl <em>Obligacion Deber</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ObligacionDeberImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getObligacionDeber()\n * @generated\n */\n EClass OBLIGACION_DEBER = eINSTANCE.getObligacionDeber();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OBLIGACION_DEBER__DESCRIPCION = eINSTANCE.getObligacionDeber_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.NegacionImpl <em>Negacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.NegacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getNegacion()\n * @generated\n */\n EClass NEGACION = eINSTANCE.getNegacion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NEGACION__DESCRIPCION = eINSTANCE.getNegacion_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OperacionImpl <em>Operacion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OperacionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOperacion()\n * @generated\n */\n EClass OPERACION = eINSTANCE.getOperacion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OPERACION__DESCRIPCION = eINSTANCE.getOperacion_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ClaseImpl <em>Clase</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ClaseImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getClase()\n * @generated\n */\n EClass CLASE = eINSTANCE.getClase();\n\n /**\n * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CLASE__NAME = eINSTANCE.getClase_Name();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.CompuestaImpl <em>Compuesta</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.CompuestaImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getCompuesta()\n * @generated\n */\n EClass COMPUESTA = eINSTANCE.getCompuesta();\n\n /**\n * The meta object literal for the '<em><b>Simple Inicial</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__SIMPLE_INICIAL = eINSTANCE.getCompuesta_SimpleInicial();\n\n /**\n * The meta object literal for the '<em><b>Nexo</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__NEXO = eINSTANCE.getCompuesta_Nexo();\n\n /**\n * The meta object literal for the '<em><b>Simple Final</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPUESTA__SIMPLE_FINAL = eINSTANCE.getCompuesta_SimpleFinal();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.NexoImpl <em>Nexo</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.NexoImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getNexo()\n * @generated\n */\n EClass NEXO = eINSTANCE.getNexo();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute NEXO__DESCRIPCION = eINSTANCE.getNexo_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ComplejaImpl <em>Compleja</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ComplejaImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getCompleja()\n * @generated\n */\n EClass COMPLEJA = eINSTANCE.getCompleja();\n\n /**\n * The meta object literal for the '<em><b>Determinante</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__DETERMINANTE = eINSTANCE.getCompleja_Determinante();\n\n /**\n * The meta object literal for the '<em><b>Atr</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR = eINSTANCE.getCompleja_Atr();\n\n /**\n * The meta object literal for the '<em><b>Sintagma</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__SINTAGMA = eINSTANCE.getCompleja_Sintagma();\n\n /**\n * The meta object literal for the '<em><b>Contexto</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONTEXTO = eINSTANCE.getCompleja_Contexto();\n\n /**\n * The meta object literal for the '<em><b>Conect</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONECT = eINSTANCE.getCompleja_Conect();\n\n /**\n * The meta object literal for the '<em><b>Operacion Coleccion</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPERACION_COLECCION = eINSTANCE.getCompleja_OperacionColeccion();\n\n /**\n * The meta object literal for the '<em><b>Determinante1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__DETERMINANTE1 = eINSTANCE.getCompleja_Determinante1();\n\n /**\n * The meta object literal for the '<em><b>Clase</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CLASE = eINSTANCE.getCompleja_Clase();\n\n /**\n * The meta object literal for the '<em><b>Conect1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONECT1 = eINSTANCE.getCompleja_Conect1();\n\n /**\n * The meta object literal for the '<em><b>Atr1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR1 = eINSTANCE.getCompleja_Atr1();\n\n /**\n * The meta object literal for the '<em><b>Ope3</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE3 = eINSTANCE.getCompleja_Ope3();\n\n /**\n * The meta object literal for the '<em><b>Lit1</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT1 = eINSTANCE.getCompleja_Lit1();\n\n /**\n * The meta object literal for the '<em><b>Atr2</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR2 = eINSTANCE.getCompleja_Atr2();\n\n /**\n * The meta object literal for the '<em><b>Ope4</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE4 = eINSTANCE.getCompleja_Ope4();\n\n /**\n * The meta object literal for the '<em><b>Atr4</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR4 = eINSTANCE.getCompleja_Atr4();\n\n /**\n * The meta object literal for the '<em><b>Ope5</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE5 = eINSTANCE.getCompleja_Ope5();\n\n /**\n * The meta object literal for the '<em><b>Lit2</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT2 = eINSTANCE.getCompleja_Lit2();\n\n /**\n * The meta object literal for the '<em><b>Atr5</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR5 = eINSTANCE.getCompleja_Atr5();\n\n /**\n * The meta object literal for the '<em><b>Conec1</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__CONEC1 = eINSTANCE.getCompleja_Conec1();\n\n /**\n * The meta object literal for the '<em><b>Ope Col</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE_COL = eINSTANCE.getCompleja_OpeCol();\n\n /**\n * The meta object literal for the '<em><b>Ope6</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__OPE6 = eINSTANCE.getCompleja_Ope6();\n\n /**\n * The meta object literal for the '<em><b>Lit3</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__LIT3 = eINSTANCE.getCompleja_Lit3();\n\n /**\n * The meta object literal for the '<em><b>Atr3</b></em>' containment reference feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference COMPLEJA__ATR3 = eINSTANCE.getCompleja_Atr3();\n\n /**\n * The meta object literal for the '<em><b>Fin Oracion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute COMPLEJA__FIN_ORACION = eINSTANCE.getCompleja_FinOracion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.ConectorImpl <em>Conector</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.ConectorImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getConector()\n * @generated\n */\n EClass CONECTOR = eINSTANCE.getConector();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute CONECTOR__DESCRIPCION = eINSTANCE.getConector_Descripcion();\n\n /**\n * The meta object literal for the '{@link org.xtext.tesis.gramatica.gramatica.impl.OperacionColeccionImpl <em>Operacion Coleccion</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see org.xtext.tesis.gramatica.gramatica.impl.OperacionColeccionImpl\n * @see org.xtext.tesis.gramatica.gramatica.impl.GramaticaPackageImpl#getOperacionColeccion()\n * @generated\n */\n EClass OPERACION_COLECCION = eINSTANCE.getOperacionColeccion();\n\n /**\n * The meta object literal for the '<em><b>Descripcion</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute OPERACION_COLECCION__DESCRIPCION = eINSTANCE.getOperacionColeccion_Descripcion();\n\n }", "public String stem(String input) {\n String output = \"\";\n // create an empty Annotation just with the given text\n document = new Annotation(input);\n // run all Annotators on this text\n pipeline.annotate(document);\n // traverse words in the document\n for (CoreLabel token : document.get(CoreAnnotations.TokensAnnotation.class)) {\n output = output + token.lemma() + \" \";\n }\n\n return output.trim();\n }", "@Test\n public void testSpecies() throws IOException, UIMAException {\n /*String Text = \"In this text we talk about humans and mice. Because a mouse is no killifish nor a caenorhabditis elegans. Thus, c. elegans is now abbreviated as well as n. furzeri .\";\n\n JCas jCas = JCasFactory.createText(Text);\n\n //AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n AnalysisEngineDescription engine = createEngineDescription(LinnaeusSpecies.class);\n SimplePipeline.runPipeline(jCas, engine);\n\n String[] casSpecies = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(a -> a.getCoveredText()).toArray(String[]::new);\n //String[] casID = (String[]) JCasUtil.select(jCas, Organism.class).stream().map(b -> b.getId()).toArray(String[]::new);\n\n String[] testSpecies = new String[] {\"humans\", \"mice\", \"mouse\", \"killifish\", \"caenorhabditis elegans\", \"c. elegans\", \"n. furzeri\"};\n //String[] testID = new String[] {\"9606\", \"10090\", \"10090\", \"34780\", \"6239\", \"6239\", \"105023\"};\n\n assertArrayEquals(testSpecies, casSpecies);*/\n //assertArrayEquals(testID, casID);\n }", "public List<String> extractIllnesses(String description) {\n\t\tList<String> newSentences = this.getSentences(description);\n\t\t\n\t\t// For each sentence, generate valid word sequences\n\t\tList<String> allValidWordSequences = new ArrayList<String>();\n\t\tnewSentences.forEach(s -> allValidWordSequences.addAll(this.getWordCombinations(s)));\n\n\t\tSicknessMap medicalRecords = SicknessMap.getInstance();\n\t\tList<String> results = allValidWordSequences.stream()\n\t\t\t\t.filter(potentialIllness -> medicalRecords.contains(potentialIllness))\n\t\t\t\t.map(actualIllness -> medicalRecords.getByKey(actualIllness))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn results;\n\t}", "public void processCas(CAS cas) {\n\n FSIndex<AnnotationFS> sentenceAnnotations = cas.getAnnotationIndex(mSentenceType);\n\n for (AnnotationFS sentence : sentenceAnnotations) {\n process(cas, sentence);\n }\n }", "ImmutableList<SchemaOrgType> getTextList();", "public interface IWord2Spell {\r\n String word2spell();\r\n}", "public interface RawAnnotationSet<V> extends ReadableAnnotationSet<V> {\n\n /**\n * @see NindoCursor#begin()\n */\n void begin();\n\n /**\n * @see NindoCursor#finish()\n */\n void finish();\n\n /**\n * Content has been inserted into the document being annotated\n *\n * @param insertSize\n */\n void insert(int insertSize);\n\n String getInherited(String key);\n\n /**\n * Content has been removed from the document being annotated\n *\n * @param deleteSize\n */\n void delete(int deleteSize);\n\n /**\n */\n void skip(int skipSize);\n\n /**\n * @see ModifiableDocument#startAnnotation(String, String)\n */\n void startAnnotation(String key, V value);\n\n /**\n * @see ModifiableDocument#endAnnotation(String)\n */\n void endAnnotation(String key);\n\n /**\n * @return a live updated set of the known keys\n */\n ReadableStringSet knownKeysLive();\n\n public abstract class AnnotationEvent {\n final int index;\n final String key;\n\n private AnnotationEvent(int index, String key) {\n this.index = index;\n this.key = key;\n }\n\n abstract String getChangeKey();\n abstract String getChangeOldValue();\n abstract String getEndKey();\n }\n\n public final class AnnotationStartEvent extends AnnotationEvent {\n final String value;\n AnnotationStartEvent(int index, String key, String value) {\n super(index, key);\n// assert !Annotations.isLocal(key);\n this.value = value;\n }\n\n @Override\n String getChangeKey() {\n return key;\n }\n\n @Override\n String getChangeOldValue() {\n return value;\n }\n\n @Override\n String getEndKey() {\n return null;\n }\n\n @Override\n public String toString() {\n return \"AnnotationStart \" + key + \"=\" + value + \" @\" + index;\n }\n }\n\n public final class AnnotationEndEvent extends AnnotationEvent {\n AnnotationEndEvent(int index, String key) {\n super(index, key);\n }\n\n\n @Override\n String getChangeKey() {\n return null;\n }\n\n @Override\n String getChangeOldValue() {\n return null;\n }\n\n @Override\n String getEndKey() {\n return key;\n }\n\n @Override\n public String toString() {\n return \"AnnotationEndEvent \" + key + \" @\" + index;\n }\n }\n\n}", "public interface Interpretation<ConstantName,Constant,ConceptName,Concept,AttributeName,Attribute, DataTypeName, DataType> {\n\n /** maps constant names to constants\n *\n * @param constantName the applicationName to be mapped to a constant.\n * @return the default value (the applicationName itself)*/\n default Constant getConstant(ConstantName constantName) {return (Constant) constantName;}\n\n /** put the applicationName-constant tuple into the interpretation.\n *\n * @param constantName the applicationName of the concept\n * @param constant the actual concept\n */\n default void putConstant(ConstantName constantName, Constant constant) {};\n\n /** maps concept names to concepts\n *\n * @param conceptName the applicationName to be mapped to a concept\n * @return the default value (the applicationName itself)*/\n default Concept getConcept(ConceptName conceptName) {return (Concept) conceptName;}\n\n /** put the applicationName-concept tuple into the interpretation.\n *\n * @param name the applicationName of the concept\n * @param concept the actual concept\n */\n default void putConcept(ConceptName name, Concept concept) {};\n\n /** maps attribute names to attributes.\n *\n * @param attributeName the applicationName of an attribute\n * @return the default value (the applicationName itself)*/\n default Attribute getAttribute(AttributeName attributeName) {return (Attribute) attributeName;}\n\n /** inserts the (identifier, attribute)-pair into the interpretation.\n *\n * @param name the identifier of the attribute\n * @param attribute the attribute.\n */\n default void putAttribute(ConceptName name, Attribute attribute) {};\n\n /** maps data type names to data types\n *\n * @param id the identifier for a data type\n * @return the default value (the applicationName itself)*/\n default DataType getDataType(DataTypeName id) {return (DataType)this;}\n\n /** inserts a data type into the interpretation\n *\n * @param id the identifier for the data type\n * @param dataType the datatype itself.\n */\n default void putDataType(DataTypeName id, DataType dataType) {}\n\n\n\n}", "@Override\n public void visit(Tree.AnnotationList al) {\n }", "@DISPID(1610940430) //= 0x6005000e. The runtime will prefer the VTID if present\n @VTID(36)\n Collection annotationSets();", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "public String getConcept() {\n\t\treturn concept;\n\t}", "public String getGrammarText();", "public Term[] getTerms() { return terms; }", "public Element[] getAnnotations() {\r\n return union.value();\r\n }", "public abstract Annotations mo30682c();", "public List<Annotation> getAnnotations() {\r\n\t\treturn rootAnnotations;\r\n\t}", "public abstract Annotations getClassAnnotations();", "InstrumentedType withAnnotations(List<? extends AnnotationDescription> annotationDescriptions);", "@Override\n\tpublic Set<String> getAnnotations(OWLEntity cpt) {\n\t\treturn new HashSet<String>();\n\t}", "public Annotations getAnnotations() {\n\t\treturn annotations;\n\t}", "protected abstract String[] summarize();", "ImmutableList<SchemaOrgType> getLearningResourceTypeList();", "public static List<String> GetWordsOnly(String pathToAnnFile) throws FileNotFoundException {\r\n\r\n\r\n List<String> originalList = GetFullAnnotations(pathToAnnFile);\r\n List<String> finalList = new ArrayList<>();\r\n\r\n for (String anno : originalList) {\r\n String[] split_anno = anno.split(\"\\t\"); // split each line\r\n String annoWord = split_anno[2]; // extract word\r\n finalList.add(annoWord); // append word to list\r\n }\r\n return finalList;\r\n }", "public interface DocumentRelatedTermsSearcher {\n List<ScoredTerm> getDocumentRelatedTerms(int docId, String term) throws SearchException;\n}", "Stream<List<Term>> toSentences(List<Integer> intText, List<Term> termText);", "public void process(MutableAnnotation data, Properties parameters) {\n\t\tOmniFatFunctions.applyAuthorNameRules(data, this.getDataSet(data, parameters));\n\t\t\n//\t\t//\tget positives\n//\t\tQueriableAnnotation[] taxonNames = data.getAnnotations(\"taxonName\");\n//\t\t\n//\t\t//\tcollect author names from positives\n//\t\tStringVector docAuthorNameParts = new StringVector();\n//\t\tStringVector docAuthorNames = new StringVector();\n//\t\tfor (int t = 0; t < taxonNames.length; t++) {\n//\t\t\tString source = ((String) taxonNames[t].getAttribute(\"source\", \"\"));\n//\t\t\tQueriableAnnotation[] epithets = taxonNames[t].getAnnotations(\"epithet\");\n//\t\t\tfor (int e = 0; e < epithets.length; e++)\n//\t\t\t\tif (source.indexOf(epithets[e].getAnnotationID()) != -1) {\n////\t\t\t\t\tString epithet = ((String) epithets[e].getAttribute(\"string\"));\n////\t\t\t\t\tAnnotation[] authorNames = epithets[e].getAnnotations(\"authorName\");\n////\t\t\t\t\tfor (int a = 0; a < authorNames.length; a++)\n////\t\t\t\t\t\tif (TokenSequenceUtils.indexOf(authorNames[a], epithet) == -1) {\n////\t\t\t\t\t\t\tdocAuthorNameParts.addContentIgnoreDuplicates(TokenSequenceUtils.getTextTokens(authorNames[a]));\n////\t\t\t\t\t\t\tdocAuthorNames.addElementIgnoreDuplicates(authorNames[a].getValue());\n////\t\t\t\t\t\t}\n//\t\t\t\t\tString epithetSource = ((String) epithets[e].getAttribute(\"source\", \"\"));\n//\t\t\t\t\tAnnotation[] epithetAuthorNames = epithets[e].getAnnotations(\"authorName\");\n//\t\t\t\t\tfor (int a = 0; a < epithetAuthorNames.length; a++)\n//\t\t\t\t\t\tif (epithetSource.indexOf(epithetAuthorNames[a].getAnnotationID()) != -1) {\n//\t\t\t\t\t\t\tdocAuthorNameParts.addContentIgnoreDuplicates(TokenSequenceUtils.getTextTokens(epithetAuthorNames[a]));\n//\t\t\t\t\t\t\tdocAuthorNames.addElementIgnoreDuplicates(epithetAuthorNames[a].getValue());\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t}\n//\t\t\n//\t\t//\tclean author names (anything shorter than 3 letters is too dangerous)\n//\t\tfor (int a = 0; a < docAuthorNameParts.size(); a++)\n//\t\t\tif (docAuthorNameParts.get(a).length() < 3)\n//\t\t\t\tdocAuthorNameParts.remove(a--);\n//\t\tfor (int a = 0; a < docAuthorNames.size(); a++)\n//\t\t\tif (docAuthorNames.get(a).length() < 3)\n//\t\t\t\tdocAuthorNames.remove(a--);\n//\t\t\n////\t\tif (DEBUG) System.out.println(\"Author names:\\n - \" + docAuthorNames.concatStrings(\"\\n - \"));\n//\t\t\n//\t\t//\texpoit author names\n//\t\tQueriableAnnotation[] taxonNameCandidates;\n//\t\t\n//\t\t//\tremove candidates with sure positive author name in epithet position\n//\t\ttaxonNameCandidates = data.getAnnotations(\"taxonNameCandidate\");\n//\t\tfor (int c = 0; c < taxonNameCandidates.length; c++) {\n//\t\t\tif (taxonNameCandidates[c] == null)\n//\t\t\t\tcontinue;\n//\t\t\t\n//\t\t\tString source = ((String) taxonNameCandidates[c].getAttribute(\"source\", \"\"));\n//\t\t\tAnnotation[] epithets = ((QueriableAnnotation) taxonNameCandidates[c]).getAnnotations(\"epithet\");\n//\t\t\tAnnotation killEpithet = null;\n//\t\t\tfor (int e = 0; e < epithets.length; e++)\n//\t\t\t\tif ((source.indexOf(epithets[e].getAnnotationID()) != -1) && docAuthorNameParts.contains((String) epithets[e].getAttribute(\"string\"))) {\n//\t\t\t\t\tkillEpithet = epithets[e];\n//\t\t\t\t\te = epithets.length;\n//\t\t\t\t}\n//\t\t\t\n//\t\t\tif (killEpithet != null) {\n//\t\t\t\tif (DEBUG) System.out.println(\"Removing for author name epithet '\" + killEpithet.toXML() + \"':\\n \" + taxonNameCandidates[c].toXML());\n//\t\t\t\tdata.removeAnnotation(taxonNameCandidates[c]);\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\t//\tpromote epithets with known author names\n//\t\ttaxonNameCandidates = data.getAnnotations(\"taxonNameCandidate\");\n//\t\tfor (int c = 0; c < taxonNameCandidates.length; c++) {\n//\t\t\tString source = ((String) taxonNameCandidates[c].getAttribute(\"source\", \"\"));\n//\t\t\tQueriableAnnotation[] epithets = taxonNameCandidates[c].getAnnotations(\"epithet\");\n//\t\t\tfor (int e = 0; e < epithets.length; e++)\n//\t\t\t\tif (source.indexOf(epithets[e].getAnnotationID()) != -1) {\n//\t\t\t\t\tif (\"positive\".equals(epithets[e].getAttribute(\"state\")))\n//\t\t\t\t\t\tcontinue;\n//\t\t\t\t\t\n//\t\t\t\t\tString epithetSource = ((String) epithets[e].getAttribute(\"source\", \"\"));\n//\t\t\t\t\tAnnotation[] authorNames = epithets[e].getAnnotations(\"authorName\");\n//\t\t\t\t\tfor (int a = 0; a < authorNames.length; a++)\n//\t\t\t\t\t\tif ((epithetSource.indexOf(authorNames[a].getAnnotationID()) != -1) && docAuthorNames.contains(authorNames[a].getValue())) {\n//\t\t\t\t\t\t\tif (DEBUG) System.out.println(\"Promoting epithet for known author name '\" + authorNames[a].toXML() + \"':\\n \" + epithets[e].toXML());\n//\t\t\t\t\t\t\tepithets[e].setAttribute(\"state\", \"positive\");\n//\t\t\t\t\t\t\tepithets[e].setAttribute(\"evidence\", \"author\");\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t}\n\t}", "public interface SourceAnnotation {\n\n void annotate(AnnotationHolder holder, Document document, int sourceOffset);\n\n}", "String getSynonyms();", "@Override\r\n\tpublic void process(TextInstance input) {\n\t\tList<Token> tokens = input.getTokens();\r\n\t\tfor (AnnotatedSegment segment : input.getTargetAnnotation()) {\r\n\t\t\tint length = 0;\r\n\t\t\tfor (int tokenIndex = 0; tokenIndex < tokens.size(); tokenIndex++) {\r\n\t\t\t\tif (segment.overlaps(tokens.get(tokenIndex))) {\r\n\t\t\t\t\tlength++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (length > maxLength) {\r\n\t\t\t\tmaxLength = length;\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.6085043", "0.6080948", "0.6021754", "0.5969714", "0.59543616", "0.5749153", "0.56787705", "0.5669952", "0.5582413", "0.55671763", "0.55661064", "0.5550288", "0.55438125", "0.5469024", "0.5466536", "0.5460225", "0.5393422", "0.5381145", "0.53249913", "0.5300529", "0.5300497", "0.5297139", "0.52901673", "0.5285449", "0.5281953", "0.52749", "0.5240038", "0.5166105", "0.5159422", "0.515763", "0.5157212", "0.5152044", "0.5151376", "0.51504284", "0.51435417", "0.5136091", "0.5126749", "0.51255095", "0.51212376", "0.5117669", "0.5117431", "0.5105602", "0.51027983", "0.5098404", "0.50979924", "0.5095123", "0.5093817", "0.5088066", "0.50875616", "0.50748634", "0.5073003", "0.5068046", "0.50671715", "0.50648344", "0.5055586", "0.5049274", "0.5048829", "0.5048183", "0.50465333", "0.5042836", "0.50337696", "0.50074357", "0.5007266", "0.499838", "0.49908754", "0.4988795", "0.49867913", "0.49836144", "0.49814957", "0.4980788", "0.4971073", "0.49691516", "0.4967464", "0.49633303", "0.49621406", "0.49617288", "0.4957699", "0.49572212", "0.49549925", "0.49500138", "0.49490693", "0.49370167", "0.49330124", "0.49329904", "0.49294516", "0.49286085", "0.4927939", "0.49273106", "0.49240854", "0.49200463", "0.49188966", "0.4908452", "0.49081844", "0.4907175", "0.49063823", "0.4902636", "0.4902331", "0.4895024", "0.48949102", "0.489098" ]
0.6295138
0
/ ParseMessage is the main method used for figuring out what to do with a JSONObject sent from the frontend app to the backend through the WebSocketEndpoint. Here, other functions are called based on the "message". Input JSON "message",_____ Output JSON object sent back to frontend
public void parseMessage(JSONObject message, Session session, WebSocketEndpoint wsep) { Connection conn = null; Statement st = null; ResultSet rs = null; response = new JSONObject(); // transNotif = new JSONObject(); try { Class.forName("com.mysql.jdbc.Driver"); conn = DriverManager.getConnection("jdbc:mysql://localhost/Sanity?user=root&password=root&useSSL=false"); st = conn.createStatement(); JSONObject r = new JSONObject(); if (!message.get("message").equals("signup") && !message.get("message").equals("login") && !message.get("message").equals("changePassword")) { r = notifyPeriod(message, session, conn); } else { r = null; } if (r!=null) { wsep.sendToSession(session, toBinary(r)); } response = new JSONObject(); // System.out.println(message.toString()); if (message.get("message").equals("signup")) { wsep.sendToSession(session, toBinary(signUp(message, conn))); } else if (message.get("message").equals("getHistory")) { wsep.sendToSession(session, toBinary(getHistory(message, session, conn))); } else if (message.get("message").equals("editBigBudgetAttributes")) { wsep.sendToSession(session, toBinary(editBigBudgetAttributes(message, session, conn))); } else if (message.get("message").equals("refreshdata")) { wsep.sendToSession(session, toBinary(refreshData(message, session, conn))); } else if (message.get("message").equals("refreshdatacategory")) { wsep.sendToSession(session, toBinary(refreshDataCategory(message, session, conn))); } else if (message.get("message").equals("refreshdatatransaction")) { wsep.sendToSession(session, toBinary(refreshDataTransaction(message, session, conn))); } else if (message.get("message").equals("refreshdatahistory")) { wsep.sendToSession(session, toBinary(refreshDataHistory(message, session, conn))); } else if (message.get("message").equals("login")) { wsep.sendToSession(session, toBinary(signIn(message, session, conn))); // if (r!=null) { // wsep.sendToSession(session, toBinary(r)); // } } else if (message.get("message").equals("createBigBudget")) { wsep.sendToSession(session, toBinary(createBigBudget(message, session, conn))); } else if (message.get("message").equals("createBudget")) { wsep.sendToSession(session, toBinary(createBudget(message, session, conn))); } else if (message.get("message").equals("editBigBudget")) { wsep.sendToSession(session, toBinary(editBigBudget(message, session, conn))); } else if (message.get("message").equals("editCategory")) { wsep.sendToSession(session, toBinary(editBudget(message, session, conn))); } else if (message.get("message").equals("deleteBigBudget")) { wsep.sendToSession(session, toBinary(deleteBigBudget(message, session, conn))); } else if (message.get("message").equals("deleteCategory")) { wsep.sendToSession(session, toBinary(deleteBudget(message, session, conn))); } else if (message.get("message").equals("editUser")) { // wsep.sendToSession(session, toBinary(refreshData(message, conn))); } else if (message.get("message").equals("changePassword")) { wsep.sendToSession(session, toBinary(editProfile(message, session, conn))); // wsep.sendToSession(session, toBinary(editProfile(message, conn))); } else if (message.get("message").equals("addTransaction")) { wsep.sendToSession(session, toBinary(addTransaction(message, session, conn))); } else if (message.get("message").equals("editTransactionDescription")) { wsep.sendToSession(session, toBinary(renameTransaction(message, session, conn))); } else if (message.get("message").equals("deleteTransaction")) { wsep.sendToSession(session, toBinary(deleteTransaction(message, session, conn))); } else if (message.get("message").equals("deleteAllTransactions")) { wsep.sendToSession(session, toBinary(deleteAllTransactions(message, session, conn))); } else if (message.get("message").equals("getAnalytics")) { } //clear database in each test function before running it else if (message.get("message").equals("logintest")) { wsep.sendToSession(session, toBinary(signInTest(message, session, conn))); } else if (message.get("message").equals("signuptest")) { //return signupsuccesstest, signupfailtest // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(signUpTest(message, session, conn))); } else if (message.get("message").equals("changePasswordTest")) { //return passwordSuccessTest, passwordFailTest // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(changePasswordTest(message, session, conn))); } else if (message.get("message").equals("addToBudgetTest")) { //return addToBudgetSuccessTest/fail //creates budget, category and adds transaction // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(addToBudgetTest(message, session, conn))); } else if (message.get("message").equals("subtractFromBudgetTest")) { //return subtractFromBudgetSuccessTest, success when category/budget amount has decreased //same as addToBudgetTest, sends -100 in amountToAdd // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(subtractFromBudgetTest(message, session, conn))); } else if (message.get("message").equals("transactionHistoryTest")) { //return transactionHistorySuccessTest if pull from transaction table is not 0 //create budget, create category, add transaction, check that it is not empty // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(transactionHistoryTest(message, session, conn))); } else if (message.get("message").equals("locationTest")) { //return locationSuccessTest if pull from transaction table is not 0 //create budget, create category, add transaction with location markerLatitude, markerLongitude // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(locationTest(message, session, conn))); } else if (message.get("message").equals("limitNotificationTest")) { //return limitNotificationSuccessTest if pull from transaction table is not 0 //create budget, category, and transaction (if under 20% left, send successs notification message) // // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(limitNotificationTest(message, session, conn))); } else if (message.get("message").equals("createBigBudgetTest")) { //return createBigBudgetSuccessTest, passwordFailTest //return success if budget amount is negative, is over 1000000 and not created in database //success if exception caught // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(createBigBudgetTest(message, session, conn))); } else if (message.get("message").equals("createBudgetTest")) { //return createBudgetSuccessTest, passwordFailTest // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(createBudgetTest(message, session, conn))); } else if (message.get("message").equals("deleteBigBudgetTest")) { //return deleteBigBudgetSuccessTest, passwordFailTest // deleteAll(conn); createUser(conn, session); wsep.sendToSession(session, toBinary(deleteBigBudgetTest(message, session, conn))); } //budget: bigBudgetName, bigBudgetAmount, userID, totalAmountSpent, totalAmountAdded, resetFrequency, resetStartDate //category: budgetName, budgetAmount, bigBudgetID //transaction: amountToAdd, budgetID, markerLatitude, markerLongitude } catch (ClassNotFoundException | SQLException | JSONException e) { //JSONObject response = new JSONObject(); try { response.put("SQLFail", "SQL connection could not be made."); } catch (JSONException e1) { e1.printStackTrace(); } e.printStackTrace(); wsep.sendToSession(session, toBinary(response)); } finally { try { if (rs != null) { rs.close(); } if (st != null) { st.close(); } if (conn != null) { conn.close(); } } catch (SQLException sqle) { System.out.println(sqle.getMessage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onMessageReceived(String receivedMessage) {\n try {\n JSONObject jsonFromString = new JSONObject(receivedMessage);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void parseMessage(String message) {\n\t\tJSONObject msg = (JSONObject) JSONValue.parse(message);\n\t\tswitch(msg.get(\"type\").toString()){\n\t\t\tcase \"join_match\":\n\t\t\t\tint id = Integer.parseInt(msg.get(\"match_id\").toString());\n\t\t\t\ttry {\n\t\t\t\t\tgetServerLobby().joinMatch(this, id);\n\t\t\t\t} catch (TooManyPlayersException e) {\n\t\t\t\t\tthis.alert(\"Cannot join match: match is full\");\n\t\t\t\t} catch (MatchAlreadyStartedException e) {\n\t\t\t\t\tthis.alert(\"Cannot join match: match already started\");\n\t\t\t\t} catch (PlayerAlreadyExistsException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (PlayerNotExistsException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"create_match\":\n\t\t\t\tint maxPlayers = Integer.parseInt(msg.get(\"max_players\").toString());\n\t\t\t\tint maxDeaths = Integer.parseInt(msg.get(\"max_deaths\").toString());\n\t\t\t\tint turnDuration = Integer.parseInt(msg.get(\"turn_duration\").toString());\n\t\t\t\tint mapID = Integer.parseInt(msg.get(\"map_id\").toString());\n\t\t\t\ttry {\n\t\t\t\t\tgetServerLobby().hostMatch(this,maxPlayers,maxDeaths,turnDuration,mapID);\n\t\t\t\t} catch (TooManyMatchesException e) {\n\t\t\t\t\tthis.alert(\"Cannot create match: server is full\");\n\t\t\t\t} catch (PlayerNotExistsException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (MatchAlreadyStartedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (PlayerAlreadyExistsException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (TooManyPlayersException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"ready\":\n\t\t\t\tgetCurrentMatch().setPlayerReady(this, true);\n\t\t\t\tbreak;\n\t\t\tcase \"not_ready\":\n\t\t\t\tgetCurrentMatch().setPlayerReady(this, false);\n\t\t\t\tbreak;\n\t\t\tcase \"update_lobby\":\n\t\t\t\tif(getServerLobby()!=null) {\n\t\t\t\t\tthis.updateLobby(getServerLobby().lobby);\n\t\t\t\t} else {\n\t\t\t\t\toutput.print(\"NOT_IN_LOBBY\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"back_to_lobby\":\n\t\t\t\ttry {\n\t\t\t\t\tthis.backToLobby();\n\t\t\t\t} catch (MatchAlreadyStartedException | PlayerNotExistsException e) {\n\t\t\t\t\talert(\"Error leaving waiting room\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t}\n\t}", "private void processMessage(Message message, JsonObject payload) {\n switch(message.getEvent()) {\n case \"registerCustomer\":\n registerCustomer(message, payload);\n break;\n case \"removeCustomer\":\n removeCustomer(message, payload);\n break;\n case \"requestTokensResponse\":\n requestTokensResponse(message, payload);\n break;\n case \"getCustomerByID\":\n getCustomerById(message, payload);\n break;\n case \"receiveReport\":\n receiveReport(message, payload);\n break;\n case \"requestRefundResponse\":\n requestRefundResponse(message, payload);\n break;\n default:\n System.out.println(\"Event not handled: \" + message.getEvent());\n }\n\n }", "private MessageType processMessage(MessageType message) {\n\t\tJSONObject messageJSON = (JSONObject) message;\n\t\tJSONObject timestamp = messageJSON.getJSONObject(\"timestamp\");\n\t\t\n\t\t//complete timestamp\n\t\tint globalState = messagequeue.size();\n\t\tDate nowDate = new Date();\n\t\tString globalClock = String.valueOf(nowDate.getTime());\n\t\ttimestamp.element(\"srn\", globalState);\n\t\ttimestamp.element(\"globalClock\", globalClock);\n\t\t\n\t\tmessageJSON.element(\"timestamp\", timestamp);\n\t\treturn (MessageType) messageJSON;\n\t}", "@Override\n public void handleTextMessage(WebSocketSession session, TextMessage message) throws IOException{\n Map data = new Gson().fromJson(message.getPayload(),Map.class);\n\n // see what type of message\n final String type = getValueFromMessage(message,\"type\");\n\n switch (type){\n case \"name\":\n // payload from frontend\n String username = getValueFromMessage(message,\"payload\");\n\n log.info(\"receive name: \"+ username);\n\n // build message to json\n TextMessage retJson = setJson(\"name\", \"Hi, \"+username);\n\n session.sendMessage(retJson);\n }\n }", "public static void parseMessage(String jsonString) {\n\t\n\t\tJSONRPC2Message msg;\n\t\t\n\t\ttry {\n\t\t\tmsg = JSONRPC2Message.parse(jsonString);\n\t\t\t\n\t\t} catch (JSONRPC2ParseException e) {\n\t\t\tSystem.err.println(e);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (msg instanceof JSONRPC2Request) {\n\t\t\tSystem.out.println(\"The message is a Request\");\n\t\t}\n\t\telse if (msg instanceof JSONRPC2Notification) {\n\t\t\tSystem.out.println(\"The message is a Notification\");\n\t\t}\n\t\telse if (msg instanceof JSONRPC2Response) {\n\t\t\tSystem.out.println(\"The message is a Response\");\n\t\t}\n\t}", "@Override\n public void handle(Message<JsonObject> message) {\n logger.info(\"Handling event conjoiner.simplevertical\");\n\n // Start by deserializing the message back into a Object\n try {\n TransponderMessage msg = new TransponderMessage().messageToObject(message);\n logger.info(\"Decoded message: \" + msg.toJsonString());\n\n } catch (DataFormatException e) {\n e.printStackTrace();\n logger.warning(\"Unable to deserialize this\");\n }\n\n }", "private Message onMessageReceived(String message, DecentSocket origin) {\n\t\tGson gson = new Gson();\n\t\tJsonObject messageObj = JsonParser.parseString(message).getAsJsonObject();\n\t\t//Timestamp member required for all messages\n\t\tif(messageObj.has(\"timestamp\")) {\n\t\t\tString type = messageObj.get(\"type\").getAsString();\n\t\t\tswitch(type) {\n\t\t\t\tcase \"chat\":\n\t\t\t\t\tchatMessageCallback.apply(gson.fromJson(message, ChatMessage.class), origin);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"peerAsk\":\n\t\t\t\t\treturn onPeerAskMessageReceived(gson.fromJson(message, PeerAskMessage.class), origin);\n\t\t\t\tcase \"peers\":\n\t\t\t\t\treturn onPeersMessageReceived(gson.fromJson(message, PeersMessage.class), origin);\n\t\t\t\tcase \"ping\":\n\t\t\t\t\treturn onPingMessageReceived(gson.fromJson(message, PingMessage.class), origin);\n\t\t\t\tcase \"pong\":\n\t\t\t\t\treturn onPongMessageReceived(gson.fromJson(message, PongMessage.class), origin);\n\t\t\t\tcase \"historyAsk\":\n\t\t\t\t\treturn onHistoryAskMessageReceived(gson.fromJson(message, HistoryAskMessage.class), origin);\n\t\t\t\tcase \"history\":\n\t\t\t\t\treturn onHistoryMessageReceived(gson.fromJson(message, HistoryMessage.class), origin);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "void processMessage(JSONObject msg, InetAddress addr, int port);", "protected void dosomething(Channel channel, NettyMessage message,\n JsonParser parser) throws UnsupportedEncodingException\n {\n for (Map.Entry<String, RecivMessageCallBack> entry : callBackMap\n .entrySet())\n {\n RecivMessageCallBack callBack = entry.getValue();\n if (callBack != null\n && AppServerType.contains(message.getHeader(), callBack))\n {\n callBack.onRecivMessage(channel,\n message,\n entry.getKey(),\n parser);\n }\n }\n\n }", "private void handleMessageFromServer(String theMessage) {\n //Some contants that will come from the server in the message itself:\n final String DIRECTION_JSON_KEY = \"DIRECTION\";\n final String FINAL_PRICE_JSON_KEY = \"FINAL_PRICE\";\n final String THE_FOLLOW_JSON_KEY = \"THEFOLLOW\";\n //and those are the possible values for the 'direction' key\n final String UP_VALUE = \"UP\";\n final String DOWN_VALUE = \"DOWN\";\n\n if(!isJson(theMessage)){\n handleSimpleMessageFromServer(theMessage);\n }\n\n\n //Let's start by parsing the message\n try {\n JSONObject theMessageInJson = new JSONObject(theMessage);\n String direction = theMessageInJson.getString(DIRECTION_JSON_KEY);\n double finalPrice = theMessageInJson.getDouble(FINAL_PRICE_JSON_KEY);\n String theFollowString = theMessageInJson.getString(THE_FOLLOW_JSON_KEY);\n Gson gson = new GsonBuilder().registerTypeAdapter(Date.class, new gsonUTCdateAdapter()).create();\n Follow theFollow = gson.fromJson(theFollowString, Follow.class);\n double [] followParams=theFollow.getFollowParams();\n double lowValue=followParams[0];\n double highValue=followParams[1];\n\n\n NotificationManager mNotificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent launchSecurityShow=new Intent(this, SecurityPresent.class);\n launchSecurityShow.putExtra(SecurityPresent.THE_SECURITY,theFollow.getTheSecurity());\n launchSecurityShow.putExtra(SecurityPresent.MODE,SecurityPresent.NOTIFIED);\n //launchSecurityShow.putExtra(SecurityPresent.THE_FOLLOW_AND_STATUS,theFollow);\n PendingIntent contentIntent =\n PendingIntent.getActivity(this, 0, launchSecurityShow, PendingIntent.FLAG_ONE_SHOT);\n FollowAndStatus theFollowWhichWasReceived=new FollowAndStatus();\n theFollowWhichWasReceived.setFollow(theFollow);\n ContentValues valuesToUpdate=new ContentValues();\n valuesToUpdate.put(FollowEntry.COLUMN_FINAL_PRICE,finalPrice);\n Timestamp now=new Timestamp(System.currentTimeMillis());\n valuesToUpdate.put(FollowEntry.COLUMN_DATE_EXPIRY,now.toString());\n valuesToUpdate.put(FollowEntry.COLUMN_STATUS,FollowAndStatus.STATUS_NOTIFIED);\n //TODO: take the following off the main thread\n UtilityForDatabase.updateFollowInDatabase(this,theFollowWhichWasReceived,valuesToUpdate);\n\n int drawableArrow= direction.equals(UP_VALUE)?R.drawable.uparrow:R.drawable.downarrow;\n int iconArrow=direction.equals(UP_VALUE)?R.drawable.ic_stat_uparrow:R.drawable.ic_stat_downarrow;\n int notificationColor=direction.equals(UP_VALUE)?Color.GREEN:Color.RED;\n\n\n String title=theFollow.getTheSecurity().getName()+\" IS \"+direction+\"!\";\n String content=title+\" at \"+finalPrice+\". You wanted me to notify you at (\"+lowValue+','+highValue+\")\";\n\n // Notifications using both a large and a small icon (which yours should!) need the large\n // icon as a bitmap. So we need to create that here from the resource ID, and pass the\n // object along in our notification builder. Generally, you want to use the app icon as the\n // small icon, so that users understand what app is triggering this notification.\n Bitmap largeIcon = BitmapFactory.decodeResource(getResources(), drawableArrow);\n NotificationCompat.Builder mBuilder =\n new NotificationCompat.Builder(this)\n .setSmallIcon(iconArrow)\n .setLargeIcon(largeIcon)\n .setContentTitle(title)\n .setStyle(new NotificationCompat.BigTextStyle().bigText(content))\n .setContentText(content)\n .setLights(notificationColor, 1000, 1000)\n .setPriority(NotificationCompat.PRIORITY_HIGH);\n mBuilder.setContentIntent(contentIntent);\n mNotificationManager.notify(FOLLOW_NOTIFICATION_ID, mBuilder.build());\n } catch(JSONException e){}\n }", "@Override\n public void handle(Message<JsonObject> message) {\n sendOK(message);\n }", "public List<Message> parse(String message) {\n msg = new JSONObject(message);\n data = msg.getJSONArray(\"data\");\n List<Message> msgArray = new ArrayList<Message>();\n for (int i=0; i<data.length(); i++){\n Message tmpmsg = new Message();\n JSONObject tmpObj = data.getJSONObject(i);\n tmpmsg.setKey(tmpObj.getString(\"deviceId\"));\n tmpmsg.setEventTimestamp(Instant.parse(tmpObj.getString(\"time\")));\n tmpmsg.setResponseBody(tmpObj.toString());\n msgArray.add(tmpmsg);\n }\n return msgArray;\n }", "@OnMessage\n public void onMessage(Session session, String jsonStr) throws IOException, EncodeException {\n //TODO: add send message.\n // See how to parse JSON strings into Java objects: https://www.baeldung.com/fastjson\n Message newMessage = JSON.parseObject(jsonStr, Message.class);\n\n System.out.println(\"WebSocketChatServer - Message \" + jsonStr + \" received from client with username \" + newMessage.getUsername() + \", message \" + newMessage.getMsg() + \", type \" + newMessage.getType() + \", onlineCount \" + newMessage.getOnlineCount() + \" and session \" + session);\n\n sendMessageToAll(newMessage);\n }", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "@Override\n public void onMessage(String channel, String message) {\n if (redisHandler.isAuth()) redisHandler.getJedisPool().getResource().auth(redisHandler.getPassword());\n if (!channel.equalsIgnoreCase(redisHandler.getChannel())) return;\n\n executor.execute(() -> {\n String[] strings = message.split(\"///\");\n\n System.out.println(strings[1]);\n System.out.println(strings[0]);\n\n Object jsonObject = null;\n try {\n jsonObject = redisHandler.getGson().fromJson(strings[0], Class.forName(strings[1]));\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n RedisPacket redisPacket = (RedisPacket) jsonObject;\n\n if (redisPacket == null) {\n System.out.println(\"The redis packet received seems to be null!\");\n return;\n }\n\n redisPacket.onReceived();\n });\n }", "void interpretMessage(final Message message);", "public void processMessage(String message);", "private void HandleMessage(Message message)\n\t{\n\t\tswitch (message.messageType) {\n\t\tcase disconnect: ApplicationManager.Instance().Disconnect();\n\t\t\tbreak;\n\t\tcase log: PrintLogMessageOnTextChat((String)message.message);\n\t\t\tbreak;\n\t\tcase message: PrintMessageOnTextChat((MessageWithTime)message.message);\n\t\t\tbreak;\n\t\tcase UserJoinChannel: UserJoinChannel((ClientData)message.message);\n\t\t\tbreak;\n\t\tcase UserDisconnectChannel: UserDisconnectChannel((ClientData)message.message);\n\t\t\tbreak;\n\t\tcase changeChannel: OnChannelChanged((ChannelData)message.message);\n\t\t\tbreak;\n\t\tcase serverData: data = (ServerData) message.message; \n\t\t\t\t\t\t ApplicationManager.channelsList.DrawChannels(data);\n\t\t\t\tbreak;\n\t\tcase channelInfo: clientsData = (ClientsOnChannelData)message.message;\n\t\t\t\t\t\t ApplicationManager.informationsList.ShowInfo(clientsData);\n\t\t \t\tbreak;\n\t\tcase sendMessageToUser: ApplicationManager.textChat.write((MessageToUser)message.message);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "public void onTextMessage(WebSocket websocket, String message) {\n if(message.contains(\"ticker\")) {\n List<Object> decodeMessage = GSON.fromJson(message, new TypeToken<List<Object>>() {}.getType());\n if (decodeMessage.size() == 4) {\n val ticker = decodeMessage.get(2);\n if (ticker instanceof String && ((String) ticker).equalsIgnoreCase(\"ticker\")) {\n Map<String, List<Object>> ticks = (Map<String, List<Object>>) decodeMessage.get(1);\n val ask = Double.parseDouble((String) ticks.get(\"a\").get(0));\n val bid = Double.parseDouble((String) ticks.get(\"b\").get(0));\n val krakenCurrencyPair = (String)decodeMessage.get(3);\n val currencyPair = CurrencyPair.of(krakenCurrencyPair.substring(0,3), krakenCurrencyPair.substring(4,7));\n outBoundBus.post(PriceUpdateEvent.of(BidAsk.of(bid,ask),currencyPair, Exchange.KRAKEN));\n }\n }\n\n }\n }", "public void processMessage(byte[] message) {\n try {\n Object receivedMessage = Serializer.deserialize(message);\n processMessage(receivedMessage);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void processMessage(Message message) {\n log(\"\");\n log(\"\");\n// log(\"recon list: \" + reconciliation);\n log(\"message\", message);\n\n switch (message.type) {\n // Response from server when registering\n case \"accepted\":\n accepted = true;\n\n // lobby leader, this user sets the info for all users.\n if (message.stringData != null && message.stringData.equals(\"leader\")) {\n\n LobbySettings lobbySettings = new LobbySettings();\n if (requestedGameType != null)\n lobbySettings.updateType(requestedGameType);\n log(\"req points\", requestedMapCntrlPoints);\n lobbySettings.setMap(requestedMapCntrlPoints);\n\n sendLobbySettingsToServer(lobbySettings);\n }\n\n if (message.name != name) {\n name = message.name;\n System.out.println(\"Name rejected. New name: \" + name);\n }\n\n break;\n // Resend register message\n case \"rejected\":\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n sendRegisterMessage();\n break;\n // the first game message from the server\n case \"initialUpdate\":\n EntityHandler eh = message.entityHandler;\n game.entityHandler = eh;\n game.modelLayer.setEntities(eh);\n game.lobbySettings = message.lobbySettings;\n game.timeRemaining = message.timeRemaining;\n game.teamsList = message.teamsList;\n game.tankID = message.stringData;\n game.teamID = message.teamID;\n tankToUsernameMap = message.tankToNameMap;\n log(String.format(\"We are '%s' on team %d.\", message.stringData, message.teamID));\n\n // TODO this is the shit\n game.map.loadMap(message.lobbySettings.getMap());\n game.setupTerrainFlag = true;\n\n started = true;\n\n game.postConnect();\n log(\"game started!!\");\n break;\n // main update case\n case \"update\":\n if (!started)\n return;\n\n log(\"received new entity handler\");\n\n EntityHandler serverEntityHandler = message.entityHandler;\n game.entityHandler = serverEntityHandler;\n tankToHeldLength = message.tankToHeldLength;\n game.modelLayer.setEntities(serverEntityHandler);\n\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainCrates(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n\n game.timeRemaining = message.timeRemaining;\n\n double serverPacketNumber = message.packetNum;\n log(\"server packet:\" + serverPacketNumber + \", last packet we sent:\" + packetNum);\n\n int i = 0;\n while (i < reconciliation.size()) {\n Message reconMessage = reconciliation.get(i);\n\n if (reconMessage.packetNum <= serverPacketNumber) {\n log(\"reconcile!, m packet:\" + reconMessage.packetNum + \"<= server packet:\" + serverPacketNumber);\n reconciliation.remove(i);\n } else {\n log(\"server lagging behind, apply inputs again for packet: \" + reconMessage.packetNum);\n\n Integer[] keysPressed = reconMessage.keysPressed;\n double mouseHeldTime = reconMessage.mouseHeldTime;\n reconciliationUpdate(keysPressed, mouseHeldTime);\n i++;\n }\n }\n break;\n case \"endUpdate\":\n if (!started)\n return;\n\n log(\"received final entity handler\");\n accepted = false;\n started = false;\n ended = true;\n game.entityHandler = message.entityHandler;\n game.modelLayer.setEntities(message.entityHandler);\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n game.setEndOfGame(); // assuming we are in online mode\n break;\n case \"debug\":\n String str = message.stringData;\n log(str);\n testMessages.add(message);\n break;\n default:\n error(\"unknown type: \" + message.type);\n break;\n }\n }", "@Override\n public void handleTextMessage(WebSocketSession session, TextMessage message) throws IOException {\n// \tlogger.info(\"Server received text: {}\", message.getPayload());\n \tMessage msg = messageEncoderDecoder.deserialize(message.getPayload(), Message.class);\n\t\tlogger.info(\"Message received: {}\", msg.getClass().getSimpleName());\n\n \tif (msg instanceof MapCreateRequested)\n \t{\n \t\tlogger.info(\"MapCreateRequested received!\");\n \t\tmaps.registerNewMap(new WebSocketClient(session), \"initName\");\n \t}\n \telse if (msg instanceof GenericMapUpdateRequested)\n \t{\n \t\tlogger.info(\"MapUpdateRequested received!\");\n \t\tGenericMapUpdateRequested msgMapUpdateRequested = (GenericMapUpdateRequested)msg;\n \t\tGenericUpdateBlockCompleted updateBlockCompleted = msgMapUpdateRequested.update();\n\n \t\tmaps.processMapUpdates(new WebSocketClient(session), updateBlockCompleted);\n \t}\n }", "@OnMessage\n public void onMessage(String message, Session session) throws TwitterException, IOException, InterruptedException, ExecutionException, JSONException {\n if (WebsocketServer.session == session) {\n System.out.println(\"Message from \" + session.getId() + \": \" + message);\n \n JSONObject data = new JSONObject(message);\n String messageType = data.getString(\"message\");\n\n switch(messageType) {\n case \"startStreaming\":\n // Initialize application's access token.\n streaming.initializeToken();\n break;\n case \"accessTokenPin\":\n streaming.createApplicationAccessToken(data.getString(\"pin\"));\n break;\n case \"stopStreaming\":\n streaming.stopStreaming();\n break;\n }\n }\n }", "public EventMsgProcessJob(SocketConnection connection, JSONObject message) {\n if (message == null) {\n throw new IllegalArgumentException(\n \"The given request JSON object is NULL.\");\n }\n\n this.message = message;\n this.connection = connection;\n }", "public void handleMessage(Message message);", "private void decode_message(String receivedMessage) {\n String[] messageComponents = receivedMessage.split(\"##\");\n String actionName = messageComponents[0];\n int actionType = caseMaps.get(actionName);\n\n switch (actionType) {\n case 1:\n String nodeToConnect = messageComponents[1];\n break;\n case 2:\n String receivedPrevNode = messageComponents[1].split(\"&&\")[0];\n String receivedNextNode = messageComponents[1].split(\"&&\")[1];\n break;\n case 3:\n String key = messageComponents[1].split(\"&&\")[0];\n String value = messageComponents[1].split(\"&&\")[1];\n insertIntoDB(key,value);\n break;\n case 4:\n String portRequested = messageComponents[1].split(\"&&\")[0];\n String AllMessages = messageComponents[1].split(\"&&\")[1];\n break;\n case 5:\n String portRequestedSelect = messageComponents[1].split(\"&&\")[0];\n String selection = messageComponents[1].split(\"&&\")[1];\n break;\n case 6:\n String selectionDelete = messageComponents[1];\n DeleteKeys(selectionDelete);\n break;\n default:\n }\n\n }", "public String parsePayloadToJSON(ContrailMessage message) throws XMLStreamException, JsonProcessingException {\r\n\t\tLOGGER.info(\"Parsing payload\");\r\n\t\tif (CANDE_PAYLOAD_TYPE.equals(message.getPayloadType())) {\r\n\t\t\t// name of the file\r\n\t\t\tXMLString fileName = new XMLString();\r\n\t\t\t// Object URL in contentdelivery bucket\r\n\t\t\tXMLString s3Uri = new XMLString();\r\n\t\t\t// productId=LIVE to identify live feed or migration\r\n\t\t\tXMLString productId = new XMLString();\r\n\r\n\t\t\tnew XMLParser().getInnerTextFor(\"/ContentDeliveryData/fileTickets/fileTicket/fileName\", fileName::set)\r\n\t\t\t\t\t.getInnerTextFor(\"/ContentDeliveryData/fileTickets/fileTicket/s3Uri\", s3Uri::set)\r\n\t\t\t\t\t.getInnerTextFor(\"/ContentDeliveryData/fileTickets/fileTicket/directory\", productId::set)\r\n\t\t\t\t\t.parse((String) message.getPayloadData());\r\n\r\n\t\t\tthis.payloadMap.put(\"fileName\", fileName.get());\r\n\t\t\tthis.payloadMap.put(\"s3Uri\", s3Uri.get());\r\n\t\t\tthis.payloadMap.put(\"productId\", productId.get());\r\n\r\n\t\t\tString transformedPayload = new ObjectMapper().writeValueAsString(this.payloadMap);\r\n\t\t\tLOGGER.info(\"Parsed payload: \" + transformedPayload);\r\n\t\t\t// converts the map to json string\r\n\t\t\treturn transformedPayload;\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tthrow new IllegalStateException(\r\n\t\t\t\t\t\"Unidentified Message Payload: \" + Strings.nullToEmpty(message.getPayloadType()));\r\n\t\t}\r\n\r\n\t}", "abstract public Object handleMessage(Object message) throws Exception;", "@OnMessage\n\tpublic void handleMessage(String message, Session session) {\n\t\tSystem.out.println(\"Received: \" + message);\n\n\t\ttry{\n\t\t\t// We always expect a single json object - all our commands are routed in via this mechanism, with each command having a different root json object name\n\t\t\tJsonReader jsonReader = Json.createReader(new StringReader(message));\n\t\t\tJsonObject o = jsonReader.readObject();\n\t\t\t\n\t\t\t// Every command should have an auth value on it...\n\t\t\tString auth = o.getString(\"auth\");\n\t\t\t//System.out.println(\"Auth is \" + auth);\n\t\t\tif (!sessionHandler.validAccounts.contains(auth))\n\t\t\t{\n\t\t\t\tsession.getBasicRemote().sendText(\"{\\\"noauth\\\":true}\");\n\t\t\t\tthrow new Exception(\"Invalid auth\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// See what command the client has sent me - the name of the object denotes the command\n\t\t\tJsonObject console = o.getJsonObject(\"console\");\n\t\t\tif (null != console)\n\t\t\t{\n\t\t\t\tConsoleInfo ci = new ConsoleInfo();\n\t\t\t\tci.name = console.getString(\"name\");\n\t\t\t\tsessionHandler.addConsoleInfo(session, ci);\n\t\t\t}\t\t\t\n\t\t\tJsonObject reset = o.getJsonObject(\"reset\");\n\t\t\tif (null != reset)\n\t\t\t{\n\t\t\t\tif (reset.getString(\"type\").equals(\"full\"))\n\t\t\t\t{\n\t\t\t\t\t// Clear out the registered devices\n\t\t\t\t\tDevices.d.removeAll();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDevices.d.remove(reset.getString(\"number\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject deleteaudio = o.getJsonObject(\"deleteaudio\");\n\t\t\tif (null != deleteaudio)\n\t\t\t{\n\t\t\t\t// remove this audio\n\t\t\t\tAudios.a.remove(deleteaudio.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject addaudiofolder = o.getJsonObject(\"addfolder\");\n\t\t\tif (null != addaudiofolder)\n\t\t\t{\n\t\t\t\t// Create a folder on disk\n\t\t String folder = addaudiofolder.getString(\"folder\");\n\t\t String newName = addaudiofolder.getString(\"name\");\n\t\t File uploads = new File(Settings.s.uploadDiskPath + \"/\" + (folder.length()==0?\"\" : folder + \"/\") + newName);\n\t\t // Prevent traversals\n\t\t if (!uploads.getParentFile().toPath().startsWith(new File(Settings.s.uploadDiskPath).toPath()))\n\t\t {\n\t\t \t// Naughty!\n\t\t \tthrow new ServletException(\"Cannot save to \" + uploads.getParentFile().toPath()); \t\n\t\t }\n\t\t // Create the folder if necessary\n\t\t if (!uploads.exists())\n\t\t {\n\t\t \tuploads.mkdirs();\n\t\t }\n\t\t // And tell everyone about it...\n\t\t\t\tAudios.a.add(uploads.toString(), newName, folder, true);\n\t\t\t}\n\t\t\tJsonObject playaudio = o.getJsonObject(\"playaudio\");\n\t\t\tif (null != playaudio)\n\t\t\t{\n\t\t\t\t// Play this audio to the listed devices\n\t\t\t\tString audio = playaudio.getString(\"audio\");\n\t\t\t\tJsonArray devices = playaudio.getJsonArray(\"devices\");\n\t\t\t\tAudio a = Audios.a.get(audio);\n\t\t\t\tif (null != a)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// TODO - pass the array to Plivo instead of looping here, as I think the play API can take an array...\n\t\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t\t{\n\t\t\t\t\t\tDevice d = Devices.d.get(device.toString());\n\t\t\t\t\t\t// Is this a folder? If so, pick a random child audio, preferring one that this device has not had\n\t\t\t\t\t\tif (a.isFolder)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ta = Audios.a.getRandomChild(a, d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We should be able to handle ringing calls here\n\t\t\t\t\t\tif (null != d)\n\t\t\t\t\t\t\td.MakeCall(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject patch = o.getJsonObject(\"patch\");\n\t\t\tif (null != patch)\n\t\t\t{\n\t\t\t\t// Connect this active device to an idle device, or connect 2 idle devices together\n\t\t\t\tJsonArray devices = patch.getJsonArray(\"devices\");\n\t\t\t\tDevices.patch(devices.get(0).toString(), devices.get(1).toString());\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject playtext = o.getJsonObject(\"playtext\");\n\t\t\tif (null != playtext)\n\t\t\t{\n\t\t\t\t// As playAudio, but for sms - and the text can be edited in the console and not saved...\n\t\t\t\tString text = playtext.getString(\"text\");\n\t\t\t\tString activetext = playtext.getString(\"activetext\");\n\t\t\t\tText atext = Texts.t.get(activetext);\n\t\t\t\tJsonArray devices = playtext.getJsonArray(\"devices\");\n\t\t\t\tif (!text.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t\t{\n\t\t\t\t\t\tDevice d = Devices.d.get(device.toString());\n\t\t\t\t\t\tif (null != d)\n\t\t\t\t\t\t\td.Sms(text, atext);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject ignore = o.getJsonObject(\"ignore\");\n\t\t\tif (null != ignore)\n\t\t\t{\n\t\t\t\tJsonArray devices = ignore.getJsonArray(\"devices\");\n\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t{\n\t\t\t\t\tDevices.hangup(device.toString(),\"failed\",\"Request from console\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject deletetext = o.getJsonObject(\"deletetext\");\n\t\t\tif (null != deletetext)\n\t\t\t{\n\t\t\t\tTexts.t.remove(deletetext.getString(\"name\"));\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject savetext = o.getJsonObject(\"savetext\");\n\t\t\tif (null != savetext)\n\t\t\t{\n\t\t\t\tTexts.t.add(savetext.getString(\"label\"),savetext.getString(\"name\"));\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject updatestatus = o.getJsonObject(\"updatestatus\");\n\t\t\tif (null != updatestatus)\n\t\t\t{\n\t\t\t\tDevices.updateStatus();\n\t\t\t}\n\t\t\tJsonObject savedevice = o.getJsonObject(\"savedevice\");\n\t\t\tif (null != savedevice)\n\t\t\t{\n\t\t\t\tDevices.updateName(savedevice.getString(\"number\"), savedevice.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject saveprogress = o.getJsonObject(\"saveprogress\");\n\t\t\tif (null != saveprogress)\n\t\t\t{\n\t\t\t\tDevices.updateProgress(saveprogress.getString(\"number\"), saveprogress.getString(\"progress\"));\n\t\t\t}\n\n\t\t\t\n\t\t\tJsonObject setmessagesread = o.getJsonObject(\"setmessagesread\");\n\t\t\tif (null != setmessagesread)\n\t\t\t{\n\t\t\t\tDevices.setMessagesRead(setmessagesread.getString(\"number\"));\n\t\t\t}\n\t\t\tJsonObject savegoal = o.getJsonObject(\"savegoal\");\n\t\t\tif (null != savegoal)\n\t\t\t{\n\t\t\t\tGoals.add(savegoal);\n\t\t\t}\n\t\t\tJsonObject deletegoal = o.getJsonObject(\"deletegoal\");\n\t\t\tif (null != deletegoal)\n\t\t\t{\n\t\t\t\tGoals.remove(deletegoal.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject uncue = o.getJsonObject(\"uncue\");\n\t\t\tif (null != uncue)\n\t\t\t{\n\t\t\t\tDevices.uncue(uncue.getString(\"number\"));\n\t\t\t}\n\t\t\tJsonObject register = o.getJsonObject(\"register\");\n\t\t\tif (null != register)\n\t\t\t{\n\t\t\t\tDevices.d.add(register.getString(\"number\"),\"console\");\n\t\t\t}\n\t\t\t\n\t\t\t// IVR commands from the console\t\t\t\n\t\t\tJsonObject saveivrstep = o.getJsonObject(\"saveivrstep\");\n\t\t\tif (null != saveivrstep)\n\t\t\t{\n\t\t\t\tIvrSteps.i.add(saveivrstep).saveToDisk();\n\t\t\t}\n\t\t\tJsonObject deleteivrstep = o.getJsonObject(\"deleteivrstep\");\n\t\t\tif (null != deleteivrstep)\n\t\t\t{\n\t\t\t\tIvrSteps.i.remove(deleteivrstep.getString(\"name\"));\n\t\t\t}\n\t\t\t// System-wide settings\n\t\t\tJsonObject setting = o.getJsonObject(\"setting\");\n\t\t\tif (null != setting)\n\t\t\t{\n\t\t\t\tSwitchboard.s.parseJson(setting);\n\t\t\t\tSwitchboard.s.persist();\n\t\t\t\t\n\t\t\t\t// Tell everyone about this...\n\t\t\t\tsessionHandler.Broadcast(o);\n\t\t\t\t\n\t\t\t\t// And do any heartbeat changes that I need\n\t\t\t\tSwitchboard.s.setupHeartbeat(true);\n\t\t\t}\n\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed to parse \" + message + \" with error \" + e.getMessage());\n\t\t}\n\t}", "public void handleStringMessage(String message) {\n\n }", "@Override\n public void handleMessage(Message message) {}", "void handleMessage(byte messageType, Object message);", "private void retrieveFromJSON(String message) {\n try {\n JSONObject jsonObject = new JSONObject(message);\n access_token = jsonObject.getString(\"access_token\");\n status = \"succeeded\";\n } catch (Exception e) {\n e.printStackTrace();\n status = \"failed\";\n }\n }", "@Override\n\tpublic void readMessage(Message message) {\n\t\t\n\t}", "@Override\n\tpublic void processMessage(byte[] message) {\n\t}", "@Override\n public void handleTextMessage(WebSocketSession client, TextMessage message) throws IOException {\n System.out.println(\"connecting\");\n String [] parseMessage = message.getPayload().split(\" \",2);\n boolean found = false;\n System.out.println(parseMessage[0]);\n System.out.println(parseMessage[0].equals(\"join\"));\n if (parseMessage[0].equals(\"join\")) {\n System.out.println(\"joinning\");\n for (Room room: rooms) {\n System.out.println(room.name);\n if (room.name.equals(parseMessage[1])) {\n System.out.println(\"room found\");\n room.addClient(client);\n\n found = true;\n }\n }\n if (found == false) {\n System.out.println(\"making new room\");\n Room newRoom = new Room(parseMessage[1], client);\n rooms.add(newRoom);\n }\n TextMessage newMessage;\n String json = \"{\\\"user\\\" : \\\"\" + parseMessage[0] + \"\\\", \\\"message\\\": \\\"\"\n + parseMessage[1] + \"\\\"}\";\n newMessage = new TextMessage(json);\n client.sendMessage(newMessage);\n\n }else{\n for (Room room: rooms) {\n if(room.clientInRoom(client))\n System.out.println(\"send message\");\n room.forwardMessage(message);\n }\n\n\n }\n }", "protected Object extractMessage(Message message) {\n\t\tif (serializer != null) {\n\t\t\treturn serializer.deserialize(message.getBody());\n\t\t}\n\t\treturn message.getBody();\n\t}", "public void processMessage(JsonObject messagetJsonObject, ServerSessionFactory factory,\n ResponseSender responseSender, String internalSessionId) throws IOException {\n\n if (messagetJsonObject.has(Request.METHOD_FIELD_NAME)) {\n processRequestMessage(factory, messagetJsonObject, responseSender, internalSessionId);\n } else {\n processResponseMessage(messagetJsonObject, internalSessionId);\n }\n }", "public void onMessage(String message) {\n\t\t\t\t\tCometMessage msg = deserializeMessage(message);\n\t\t\t\t\tif(msg != null)\n\t\t\t\t\t\tlistener.onMessage(msg);\n\t\t\t\t}", "public void parse(String aMessage) {\r\n \r\n assert aMessage!=null;\r\n assert fBuffer!=null;\r\n \r\n iMessage=aMessage;//set parse string\r\n iIndex=0;//start parsing at first character\r\n iRootElement=parseRoot();//parse message\r\n \r\n }", "public void handleMessage(String message) {\n\t\tinternalHandleMessage(message);\n\t}", "@Override\n\tpublic boolean willDecode(String jsonMessage) {\n\t\ttry {\n\t\t\t// Check if incoming message is valid JSON\n\t\t\tJson.createReader(new StringReader(jsonMessage)).readObject();\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "void consumeMessage(String message);", "@Override\n public void handleMessage(Message message) {\n stopProgressDialog();\n swipeRefreshLayout.setRefreshing(false);\n switch (message.what) {\n case Flinnt.SUCCESS:\n try {\n //Helper.showToast(\"Success\", Toast.LENGTH_SHORT);\n if (LogWriter.isValidLevel(Log.INFO))\n LogWriter.write(\"SUCCESS_RESPONSE : \" + message.obj.toString());\n if (message.obj instanceof WishResponse) {\n updateCourseList((WishResponse) message.obj);\n }\n } catch (Exception e) {\n LogWriter.err(e);\n }\n\n break;\n case Flinnt.FAILURE:\n try {\n if (LogWriter.isValidLevel(Log.INFO))\n LogWriter.write(\"FAILURE_RESPONSE : \" + message.obj.toString());\n } catch (Exception e) {\n LogWriter.err(e);\n }\n\n break;\n default:\n super.handleMessage(message);\n }\n }", "private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) pong = true;\n else if (buffer.getPing()) send(\"<pong/>\");\n else {\n try {\n clientController.onReceivedMessage(buffer.get());\n } catch (EmptyBufferException e) {\n System.out.println(\"[CLIENT] The buffer is empty!\");\n }\n }\n }\n\n }", "public static final void parseMessage(String message) {\r\n if (message == null) return;\r\n String[] msg = message.split(\" \");\r\n user = getUser(msg[0]);\r\n \r\n if (msg[1].equals(\"PRIVMSG\")) {\r\n addUserToViewerList(user);\r\n msg[3] = msg[3].substring(1);\r\n \r\n /**\r\n * Write the input to console.\r\n */\r\n String s = \"\";\r\n for (int i = 3; i < msg.length - 1; i++) {\r\n s += msg[i] + \" \";\r\n }\r\n s += msg[msg.length - 1];\r\n Console.writeLine(user + \": \" + s);\r\n \r\n if (msg[3].equals(\"\") || msg[3].charAt(0) != cmd.getFlag()) {\r\n //Do some moderator functions if possible\r\n if (db.getUserLevel(user).getLevel() <= UserLevel.SUBSCRIBER.getLevel() && (canMod || db.getUserLevel(nick).getLevel() == UserLevel.OWNER.getLevel())) {\r\n String[] split = s.split(\" \");\r\n if (capsFilter && TwitchFilters.capsFilter(s, capsMinLength, capsTolerance) ) {\r\n purge(user, user + \", http://i.imgur.com/QApFb.jpg\");\r\n }\r\n else if (linksFilter && TwitchFilters.urlFilter(split)) {\r\n purge(user, user + \", links are disabled in this chat.\");\r\n }\r\n else if (bannedWordsFilter && TwitchFilters.bannedWordsFilter(split, TEST_WORDS)) {\r\n purge(user, user + \", HEEEEEEEY YOU SAID THE SECRET WORD!\");\r\n }\r\n else if (!emotes.isEmpty() && TwitchFilters.emotesFilter(split, emotes, emoteTolerance)) {\r\n purge(user, user + \", I have nothing witty to say here.\");\r\n }\r\n else if (symbolFilter && TwitchFilters.symbolFilter(s, symbolTolerance)) {\r\n purge(user, user + \" the spam is real.\");\r\n }\r\n }\r\n else if (user.equals(\"Jtv\") && message.contains(\"moderators of this room\")) {\r\n String mods = \"\";\r\n for (int i = 9; i < msg.length; i++) {\r\n mods += capName(msg[i]).replace(\",\", \"\") + \" \";\r\n }\r\n db.initMod(mods.trim().split(\" \"));\r\n canMod = db.getUserLevel(capName(nick)).getLevel() >= UserLevel.MODERATOR.getLevel();\r\n }\r\n return;\r\n }\r\n \r\n msg[3] = msg[3].substring(1);\r\n if (msg[3].equals(Commands.ADD_COMMAND)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.MODERATOR.getLevel()) {\r\n sendMessage(user + \" does not have permission to add commands.\");\r\n return;\r\n }\r\n String com = \"\";\r\n try {\r\n if (msg.length >= 5 && msg[4].charAt(0) == cmd.getFlag()) {\r\n\t\t\tint i;\r\n\t\t\tfor (i = 5; i < msg.length; i++) {\r\n com += msg[i] + \" \";\r\n\t\t\t}\r\n sendMessage(cmd.addCommand(msg[4].replace(\"\" + cmd.getFlag(), \"\"), com.trim()));\r\n }\r\n else {\r\n sendMessage(\"Invalid parameters for !addcommand. Syntax is !addcommand ![Command Name] [Message]\");\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !addcommand. Syntax is !addcommand ![Command Name] [Message]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.ADD_TIMER)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.MODERATOR.getLevel()) {\r\n sendMessage(user + \" does not have permission to add timers.\");\r\n return;\r\n }\r\n try {\r\n String name = msg[4];\r\n int delay = Integer.parseInt(msg[5]);\r\n String output = \"\";\r\n for (int i = 6; i < msg.length; i++) {\r\n output += msg[i] + \" \";\r\n }\r\n sendMessage(tc.addCommand(name, output, delay));\r\n }\r\n catch (ArrayIndexOutOfBoundsException | NumberFormatException e) {\r\n sendMessage(\"Invalid parameters for !addtimer. Syntax is !addtimer [Name of timer] [Delay in minutes] [Message]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.EDIT_COMMAND)) {\r\n\r\n }\r\n else if (msg[3].equals(Commands.EDIT_TIMER)) {\r\n\r\n }\r\n else if (msg[3].equals(Commands.REMOVE_COMMAND)) {\r\n try {\r\n s = cmd.removeCommand(msg[4], db.getUserLevel(user)).replace(Commands.USER_FLAG, user);\r\n sendMessage(s);\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !removecommand. Syntax is !rmcmd ![Command Name]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.REMOVE_TIMER)) {\r\n try {\r\n sendMessage(tc.removeCommand(msg[4]));\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !removetimer. Syntax is !rmcmd [Name of timer]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.DISABLE_TIMERS)) {\r\n tc.stopCommands();\r\n sendMessage(\"Timers have been disabled\");\r\n }\r\n else if (msg[3].equals(Commands.START_TIMERS)) {\r\n if (tc.isRunning()) {\r\n sendMessage(\"Timers are already running.\");\r\n }\r\n else {\r\n tc.startCommands();\r\n sendMessage(\"Timers have been started.\");\r\n }\t\r\n }\r\n else if (msg[3].equals(Commands.GREETING)) {\r\n try {\r\n switch (msg[4]) {\r\n case \"on\":\r\n case \"true\":\r\n case \"enable\":\r\n case \"enabled\":\r\n greetingOn = true;\r\n sendMessage(String.format(\"Greeting is set to %b\", greetingOn));\r\n break;\r\n case \"off\":\r\n case \"false\":\r\n case \"disable\":\r\n case \"disabled\":\r\n greetingOn = false;\r\n sendMessage(String.format(\"Greeting is set to %b\", greetingOn));\r\n break;\r\n case \"status\":\r\n sendMessage(String.format(\"Greeting is set to %b\", greetingOn));\r\n break;\r\n case \"message\":\r\n sendMessage(greeting);\r\n break;\r\n case \"test\":\r\n sendMessage(String.format(greeting, user));\r\n break;\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !greeting. Syntax is !greeting [on,true,enabled,off,false,disabled,status,message]\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.LINKS)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.MODERATOR.getLevel()) return;\r\n try {\r\n switch(msg[4]) {\r\n case \"on\":\r\n case \"true\":\r\n case \"enable\":\r\n case \"enabled\":\r\n sendMessage(\"Links are enabled in this channel.\");\r\n linksFilter = false;\r\n break;\r\n case \"off\":\r\n case \"false\":\r\n case \"disable\":\r\n case \"disabled\":\r\n sendMessage(\"Links are disabled in this channel.\");\r\n linksFilter = true;\r\n break;\r\n case \"status\":\r\n sendMessage(String.format(\"Links are set to %b\", linksFilter));\r\n break;\r\n default:\r\n sendMessage(\"Invalid parameters for !links.\");\r\n break;\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"Invalid parameters for !links.\");\r\n }\r\n }\r\n /* Figure out how to implement this cleaner */\r\n else if (msg[3].equals(\"lookup\")) {\r\n String lookup = capName(msg[5]);\r\n sendMessage(String.format(\"User: %s %s: %d User Level: %s Is a regular: %b\",\r\n lookup, currency, db.getPoints(lookup), db.getUserLevel(lookup).toString().toLowerCase(), db.isRegular(lookup)));\r\n }\r\n else if (msg[3].equals(\"set\")) {\r\n if (db.getUserLevel(user).getLevel() <= UserLevel.MODERATOR.getLevel() && !user.equals(\"Genodragon_sc\")) return;\r\n try {\r\n switch (msg[4]) {\r\n case \"level\":\r\n db.setUserLevel(capName(msg[6]), UserLevel.valueOf(msg[7].toUpperCase()));\r\n ObjectIO.writeObjectToFile(dbPath, db);\r\n break;\r\n case \"points\":\r\n db.changePoints(capName(msg[6]), Integer.parseInt(msg[7]));\r\n break;\r\n case \"regular\":\r\n db.setRegular(msg[6], Boolean.parseBoolean(capName(msg[7]))); //Boolean parse doesn't work\r\n break;\r\n default:\r\n throw new Exception(\"WHOS THAT POKEMON\");\r\n }\r\n }\r\n catch (Exception e) {\r\n sendMessage(\"Invalid parameters for set.\");\r\n }\r\n }\r\n else if (msg[3].equals(\"die\")) {\r\n sendMessage(\"T_T Goodbye.\");\r\n disconnect();\r\n }\r\n else if (msg[3].equals(Commands.IS_FOLLOWER)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.ADMIN.getLevel()) return;\r\n try {\r\n if (TwitchAPI.isFollower(msg[4], admin)) {\r\n sendMessage(capName(msg[4]) + \" is a follower of \" + admin + \".\");\r\n }\r\n else {\r\n sendMessage(capName(msg[4]) + \" is not a follower of \" + admin + \".\");\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"You goofed didn't you?\");\r\n }\r\n }\r\n else if (msg[3].equals(Commands.IS_SUBSCRIBER)) {\r\n if (db.getUserLevel(user).getLevel() < UserLevel.ADMIN.getLevel()) return;\r\n try {\r\n if (TwitchAPI.isSubscriber(msg[4], admin)) {\r\n sendMessage(capName(msg[4]) + \" is a subscriber of \" + admin + \".\");\r\n }\r\n else {\r\n sendMessage(capName(msg[4]) + \" is not a subscriber of \" + admin + \".\");\r\n }\r\n }\r\n catch (ArrayIndexOutOfBoundsException e) {\r\n sendMessage(\"You goofed didn't you?\");\r\n }\r\n }\r\n else if (msg[3].equals(\"sudo\")) {\r\n if (db.getUserLevel(user).getLevel() <= UserLevel.MODERATOR.getLevel() || !user.equals(\"Genodragon_sc\")) return;\r\n String com = \"\";\r\n for (int i = 4; i < msg.length; i++) {\r\n com += msg[i] + \" \";\r\n }\r\n sendMessage(com.trim());\r\n }\r\n else if (cmd.contains(msg[3])) {\r\n String output = cmd.getCommand(msg[3]);\r\n output = output.replace(Commands.USER_FLAG, user);\r\n sendMessage(output);\t\r\n }\r\n }\r\n else if (msg[1].equals(\"JOIN\")) {\r\n addUserToViewerList(user);\r\n if (greetingOn) {\r\n String greet = greeting.replace(Commands.USER_FLAG, user);\r\n sendMessage(greet);\r\n }\r\n Console.writeLine(msg[1] + \" \" + user);\r\n }\r\n else if (msg[1].equals(\"PART\")) {\r\n removeUserFromViewerList(user);\r\n Console.writeLine(msg[1] + \" \" + user);\r\n }\r\n else if (msg[0].equals(\"PING\")) {\r\n sendRaw(\"PONG \" + msg[1]);\r\n }\r\n }", "public void receive()\n {\n //Client receives a message: it finds out which type of message is and so it behaves differently\n //CHAT message: prints the message in the area\n //CONNECT message: client can't receive a connect message from the server once it's connected properly\n //DISCONNECT message: client can't receive a disconnect message from the server\n //USER_LIST message: it shows the list of connected users\n try\n {\n String json = inputStream.readLine();\n\n switch (gson.fromJson(json, Message.class).getType())\n {\n case Message.CHAT:\n ChatMessage cmsg = gson.fromJson(json, ChatMessage.class);\n\n if(cmsg.getReceiverClient() == null)\n ChatGUI.getInstance().getChatHistory().append(cmsg.getSenderClient() + \" (TO ALL): \" + cmsg.getText() + \"\\n\");\n else\n ChatGUI.getInstance().getChatHistory().append(cmsg.getSenderClient() + \" (TO YOU): \" + cmsg.getText() + \"\\n\");\n break;\n case Message.CONNECT:\n //Send login nickname and wait for permission to join\n //if message code is 1, nickname is a duplicate and must be changed, then login again\n //(send call is inside button event)\n ConnectMessage comsg = gson.fromJson(json, ConnectMessage.class);\n\n if(comsg.getCode() == 1)\n {\n //Show error\n ChatGUI.getInstance().getLoginErrorLabel().setVisible(true);\n }\n else\n {\n //Save nickname\n nickname = ChatGUI.getInstance().getLoginField().getText();\n\n //Hide this panel and show main panel\n ChatGUI.getInstance().getLoginPanel().setVisible(false);\n ChatGUI.getInstance().getMainPanel().setVisible(true);\n }\n break;\n case Message.USER_LIST:\n UserListMessage umsg2 = gson.fromJson(json, UserListMessage.class);\n fillUserList(umsg2);\n break;\n }\n } \n catch (JsonSyntaxException | IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }", "public void handleMessage(Message message) {\r\n\r\n\t try { \r\n\t \t//only authenticate if you are trying to write to the db... \r\n\t \tHttpServletRequest req = (HttpServletRequest) message.get(\"HTTP.REQUEST\");\r\n\t \tString method = req.getMethod();\r\n\t \t\r\n\t \tif (method!=HttpMethod.GET && method!=HttpMethod.OPTIONS && method!=HttpMethod.HEAD){\r\n \t \r\n\t\t \tAuthorizationPolicy policy = apiUserService.getCurrentAuthPolicy();\r\n\t\t \tString accessKey = policy.getUserName();\r\n\t\t \tString secret = policy.getPassword();\r\n\t\t \r\n\t\t\t\tif (accessKey==null || accessKey.length()==0\r\n\t\t\t\t\t\t|| secret==null || secret.length()==0)\t{\r\n\t\t\t \tthrow new RMapTransformApiException(ErrorCode.ER_NO_USER_TOKEN_PROVIDED);\r\n\t\t\t\t}\t\t\r\n\t\t\t\r\n\t\t\t\tapiUserService.validateKey(accessKey, secret);\r\n\t \t}\r\n\t \t\r\n\t } catch (RMapTransformApiException ex){ \r\n\t \t//generate a response to intercept default message\r\n\t \tRMapTransformApiExceptionHandler exceptionhandler = new RMapTransformApiExceptionHandler();\r\n\t \tResponse response = exceptionhandler.toResponse(ex);\r\n\t \tmessage.getExchange().put(Response.class, response); \t\r\n\t }\r\n\t\t\r\n }", "@Override\n public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) {\n listener.update(String.valueOf(message.getPayload()));\n }", "protected abstract boolean startParsing(String message);", "private String getValueFromMessage(TextMessage message, String key){\n Map data = new Gson().fromJson(message.getPayload(),Map.class);\n return (String) data.get(key);\n }", "protected void handleMessage(Message msg) {}", "@Override\n public void sendMessage(Message<JsonPayload> message) throws IOException {\n System.out.println(\"Trying to send a message...\");\n outputMessageStream.write(message.getContent().getJson());\n outputMessageStream.newLine();\n outputMessageStream.flush();\n socket.shutdownOutput();\n }", "public static void parseMessage(String json, Handler handler) throws InvalidProtocolBufferException {\n CommerceProtos.Message.Builder builder = CommerceProtos.Message.newBuilder();\n JsonFormat.parser().merge(json, builder);\n handleMessage(builder.build(), handler);\n }", "public synchronized void parseMessage(GameMessage message) {\t\n\t\tswitch(message.getType()) {\n\t\tcase CardGameMessage.PLAYER_LIST:\n\t\t\tthis.playerID = message.getPlayerID();\n\t\t\tif(playerName == \"Guest\") playerName += \" \" + this.playerID;\n\t\t\tplayerList.get(this.playerID).setName(playerName);\n\t\t\ttable.setActivePlayer(playerID);\n\t\t\ttable.isPresent(this.playerID, true);\n\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\tif(i==this.playerID)continue;\n\t\t\t\t\n\t\t\t\tString s = ((String[])message.getData())[i];\n\t\t\t\tif (s != null) {\n\t\t\t\t\tplayerList.get(i).setName(s);\n\t\t\t\t\ttable.isPresent(i, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttable.repaint();\n\t\t\tsendMessage(new CardGameMessage(CardGameMessage.JOIN, -1, playerName));\n\t\t\tbreak;\n\t\t\t\n\t\tcase CardGameMessage.JOIN:\n\t\t\t\n\t\t\tif(message.getPlayerID() == playerID) {\n\t\t\t\tsendMessage(new CardGameMessage(CardGameMessage.READY, -1, null));\n\t\t\t} else {\n\t\t\t\tplayerList.get(message.getPlayerID()).setName((String)message.getData());\n\t\t\t\ttable.isPresent(message.getPlayerID(), true);\n\t\t\t\ttable.repaint();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase CardGameMessage.FULL:\n\t\t\ttable.printMsg(\"Cannot Join. Server /\" + serverIP + \":\" + serverPort + \" is full.\");\n\t\t\ttable.repaint();\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t\tsock = null;\n\t\t\t} catch(Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.QUIT:\n\t\t\ttable.printMsg(playerList.get(message.getPlayerID()).getName() + \" (\" +(String)message.getData() + \") quit the game.\\n\\n\");\n\t\t\tplayerList.get(message.getPlayerID()).setName(\"\");\n\t\t\ttable.isPresent(message.getPlayerID(), false);\n\t\t\tif(!endOfGame()) {\n\t\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\t\tplayerList.get(i).removeAllCards();\n\t\t\t\t}\n\t\t\t\ttable.disable();\n\t\t\t}\n\t\t\ttable.repaint();\n\t\t\tsendMessage(new CardGameMessage(CardGameMessage.READY, -1, null));\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.READY:\n\t\t\ttable.printMsg(playerList.get(message.getPlayerID()).getName() + \" is Ready.\");\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.START:\n\t\t\tstart((BigTwoDeck)message.getData());\n\t\t\ttable.printMsg(\"Game has started.\\n\\n\");\n\t\t\ttable.printMsg(playerList.get(currentIdx).getName() + \"'s turn:\");\n\t\t\tif(playerID == currentIdx) table.enable();\n\t\t\telse table.disable();\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.MOVE:\n\t\t\tcheckMove(message.getPlayerID(),(int[]) message.getData());\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t\n\t\tcase CardGameMessage.MSG:\n\t\t\ttable.chatMsg((String)message.getData());\n\t\t\ttable.repaint();\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void onMessage(String data) {\n\n log.e(\"ipcChannel received message: [\" + data + \"]\");\n\n try {\n JSONObject json = new JSONObject(data);\n\n onIpcMessage(json);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void messageRequestResultParser(FacebookAdapter adapter,\r\n String response) throws JSONException\r\n {\r\n if (response == null)\r\n return;\r\n String prefix = \"for (;;);\";\r\n if (response.startsWith(prefix))\r\n response = response.substring(prefix.length());\r\n \r\n JSONObject respObjs = new JSONObject(response);\r\n logger.info(\"t: \" + (String) respObjs.get(\"t\"));\r\n if (respObjs.get(\"t\") != null)\r\n {\r\n if (((String) respObjs.get(\"t\")).equals(\"msg\"))\r\n {\r\n JSONArray ms = (JSONArray) respObjs.get(\"ms\");\r\n logger.info(\"Facebook: NO of msges: \" + ms.length());\r\n // Iterator<JSONObject> it = ms..iterator();\r\n int index = 0;\r\n while (index < ms.length())\r\n {\r\n JSONObject msg = ms.getJSONObject(index);\r\n index++;\r\n if (msg.get(\"type\").equals(\"typ\"))\r\n {\r\n // got a typing notification\r\n // for\r\n // (;;);{\"t\":\"msg\",\"c\":\"p_1386786477\",\"ms\":[{\"type\":\"typ\",\"st\":0,\"from\":1190346972,\"to\":1386786477}]}\r\n int facebookTypingState = msg.getInt(\"st\");\r\n Long from = msg.getLong(\"from\");\r\n if (!from.toString().equals(adapter.getUID()))\r\n adapter.promoteTypingNotification(from.toString(),\r\n facebookTypingState);\r\n }\r\n else if (msg.get(\"type\").equals(\"msg\"))\r\n {\r\n // the message itself\r\n JSONObject realmsg = (JSONObject) msg.get(\"msg\");\r\n /*\r\n * {\"text\":\"FINE\", \"time\":1214614165139,\r\n * \"clientTime\":1214614163774, \"msgID\":\"1809311570\"},\r\n * \"from\":1190346972, \"to\":1386786477,\r\n * \"from_name\":\"David Willer\", \"to_name\":\"\\u5341\\u4e00\",\r\n * \"from_first_name\":\"David\", \"to_first_name\":\"\\u4e00\"}\r\n */\r\n FacebookMessage fm = new FacebookMessage();\r\n fm.text = (String) realmsg.get(\"text\");\r\n fm.time = (Number) realmsg.get(\"time\");\r\n fm.clientTime = (Number) realmsg.get(\"clientTime\");\r\n fm.msgID = (String) realmsg.get(\"msgID\");\r\n \r\n // the attributes of the message\r\n fm.from = (Number) msg.get(\"from\");\r\n fm.to = (Number) msg.get(\"to\");\r\n fm.fromName = (String) msg.get(\"from_name\");\r\n fm.toName = (String) msg.get(\"to_name\");\r\n fm.fromFirstName = (String) msg.get(\"from_first_name\");\r\n fm.toFirstName = (String) msg.get(\"to_first_name\");\r\n \r\n if (adapter.isMessageHandledBefore(fm.msgID))\r\n {\r\n logger.trace(\"Omitting a already handled message: msgIDCollection.contains(msgID)\");\r\n continue;\r\n }\r\n adapter.addMessageToCollection(fm.msgID);\r\n \r\n printMessage(fm);\r\n \r\n if (!fm.from.toString().equals(adapter.getUID()))\r\n adapter.promoteMessage(fm);\r\n }\r\n }\r\n }\r\n //refresh means that the session or post_form_id is invalid\r\n else if (((String) respObjs.get(\"t\")).equals(\"refresh\"))\r\n {\r\n logger.trace(\"Facebook: Refresh\");// do nothing\r\n if (((String) respObjs.get(\"seq\")) != null)\r\n {\r\n logger.trace(\"Facebook: refresh seq: \"\r\n + (String) respObjs.get(\"seq\"));\r\n }\r\n }\r\n //continue means that the server wants us to remake the connection\r\n else if (((String) respObjs.get(\"t\")).equals(\"continue\"))\r\n {\r\n logger.trace(\"Facebook: Time out? reconnect...\");// do nothing\r\n }\r\n else\r\n {\r\n logger.warn(\"Facebook: Unrecognized response type: \"\r\n + (String) respObjs.get(\"t\"));\r\n }\r\n }\r\n }", "@Override\n public void onRecivMessage(Channel channel, NettyMessage message,\n String tag, JsonParser parser)\n {\n if (!messageFilter(message))\n {\n Log.e(\"\", \"SDK 已拦截掉指令 \" + message.getHeader());\n return;\n }\n try {\n dosomething(channel, message, parser);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "public void messageArrived(Message message) {\n\t\tJSONObject authentification = new JSONObject(message.getMessageContent());\n\t\tUserAuthenticationMessage uaMessage = new UserAuthenticationMessage(authentification);\n\t\t// switches the type of the authentication to \"login\" or \"register\".\n\t\tswitch (uaMessage.getAuthentificationType()) {\n\t\tcase MIDs.REGISTRATION:\n\t\t\tregister(uaMessage);\n\t\t\tbreak;\n\t\tcase MIDs.LOGIN:\n\t\t\tlogin(uaMessage);\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n public void handleMessage(Message inputMessage) {\n actualMainActivityInstance.putDataOnPage((String)inputMessage.obj);\r\n }", "private synchronized String processMessage(Socket clientSocket, PrintWriter printWriter, String rawMessage)\n {\n Hashtable<Server.TokenType,String> parsedMessage = Server.parseRawMessage(rawMessage);\n String result = \"OK\";\n\n switch (parsedMessage.get(Server.TokenType.ACTION).toUpperCase())\n {\n case \"REGISTER\":\n String rTopic = parsedMessage.get(Server.TokenType.TOPIC);\n if(clientTopicsTable.get(clientSocket).add(rTopic))\n {\n sendToClient(printWriter, \"OK\");\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] Client \" + clientSocket + \" REGISTER \" + rTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"Client \" + clientSocket + \" REGISTER \" + rTopic);\n }\n else\n {\n sendToClient(printWriter, \"ERROR\");\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] ERROR - Client \" + clientSocket + \" REGISTER to existing topic - \" + rTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.ERROR.toString(), \"Client \" + clientSocket + \" REGISTER to existing topic - \" + rTopic);\n }\n break;\n case \"LEAVE\":\n String lTopic = parsedMessage.get(Server.TokenType.TOPIC);\n if(clientTopicsTable.get(clientSocket).remove(lTopic))\n {\n sendToClient(printWriter, \"OK\");\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] Client \" + clientSocket + \" LEAVE \" + lTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"Client \" + clientSocket + \" LEAVE \" + lTopic);\n }\n else\n {\n sendToClient(printWriter, \"ERROR\");\n\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] ERROR - Client \" + clientSocket + \" LEAVE an unregistered topic - \" + lTopic);\n //write to log\n writeToLog(Server.LOG_LEVEL.ERROR.toString(), \"Client \" + clientSocket + \" LEAVE an unregistered topic - \" + lTopic);\n }\n break;\n case \"SEND\":\n String topic = parsedMessage.get(Server.TokenType.TOPIC);\n String content = parsedMessage.get(Server.TokenType.CONTENT);\n\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] Client \" + clientSocket + \" sent \" + content + \" on topic \" + topic);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"Client \" + clientSocket + \" sent \" + content + \" on topic \" + topic);\n String ipPort = clientSocket.getInetAddress() + \":\" + clientSocket.getPort();\n //Send the message to the subscribers\n clientTopicsTable.forEach((client, topics) ->\n {\n if (topics.contains(topic)) {\n try {\n PrintWriter pw = new PrintWriter(client.getOutputStream());\n String output = \"( \" + topic + \" ) \" + ipPort + \" \" + Server.getCurrentTimeStamp() + \" - \" + content;\n\n //send to client\n sendToClient(pw, output);\n\n //print on server\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] FORWARD ( \" + topic + \" ) \" + ipPort + \" \" + Server.getCurrentTimeStamp() + \" - \" + content + \" to client - \" + client);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"FORWARD ( \" + topic + \" ) \" + ipPort + \" \" + Server.getCurrentTimeStamp() + \" - \" + content + \" to client - \" + client);\n } catch (IOException e) {\n System.out.println(\"Error occurred while sending message to client \" + client);\n }\n }\n });\n break;\n case \"CLOSE\":\n System.out.println(\"[\" + Server.getCurrentDateTimeStamp() + \"] CLOSE connection with \" + clientSocket);\n //write to log\n writeToLog(Server.LOG_LEVEL.INFO.toString(), \"CLOSE connection with \" + clientSocket);\n this.stop = true;\n result = \"CLOSE\";\n break;\n }\n return result;\n }", "public void onMessage(WebSocket conn, String message);", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n switch (msg.what) {\n case 0x001:\n Bundle bundle1 = msg.getData();\n String result1 = bundle1.getString(\"result\");\n parseData(result1);\n break;\n default:\n break;\n }\n }", "public void handleMessage(Message inMessage) {\n if (RestApiUtil.checkIfAnonymousAPI(inMessage)) {\n return;\n }\n \n handleRequest(inMessage, null);\n }", "@Override\n protected void managedInputMessage(String message) throws IOException, ClassNotFoundException {\n Message objectResponse;\n try {\n objectResponse = (Message) ois.readObject();\n //System.out.println(\"(\" + ourNode.getName() + \") Object response from \" + connectedNode.getName() + \": \" + objectResponse.getSrc());\n callback.onMessageReceived(objectResponse);\n } catch (Exception e) {\n System.err.println(\"Excepcio en la lectura de l'objecte!\");\n e.printStackTrace();\n }\n }", "public static void messageJSON(Command command, String message) {\n\t\tcommand.getChannel().sendMessage(ConfigManager.getMessage(message)).complete();\n\t}", "public void onMessage(Message message)\n {\n \tObjectMessage om = (ObjectMessage) message;\n\t\tTypeMessage mess;\n\t\ttry {\n\t\t\tmess = (TypeMessage) om.getObject();\n\t\t\tint id = om.getIntProperty(\"ID\");\n\t\t\tview.updatelistTweetFeed(mess, id);\n\t\t\tSystem.out.println(\"received: \" + mess.toString());\n\t\t} catch (JMSException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n }", "@Test\n public void simpleConversion() {\n SimpleBasicMessage arec = new SimpleBasicMessage(\"my msg\");\n String json = arec.toJSON();\n System.out.println(json);\n assertNotNull(\"missing JSON\", json);\n\n SimpleBasicMessage arec2 = AbstractMessage.fromJSON(json, SimpleBasicMessage.class);\n assertNotNull(\"JSON conversion failed\", arec2);\n assertNotSame(arec, arec2);\n assertEquals(arec.getMessage(), arec2.getMessage());\n assertEquals(arec.getDetails(), arec2.getDetails());\n }", "public void onMessageActionOccurredOnMessage(OSInAppMessage oSInAppMessage, JSONObject jSONObject) {\n }", "public boolean validateMessage(String message) {\n try {\n parser.parse(message);\n return true;\n } catch (ParseException ex) {\n Logger.getLogger(JsonObjectProcessing.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n }", "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "Optional<Message> processMessage(Message message) throws MessageHandlerException;", "public void handleMessage(Message message, Socket socket) throws IOException, HandlingException;", "protected Object extractMessage(Message message) {\n\t\tMessageConverter converter = getMessageConverter();\n\t\tif (converter != null) {\n\t\t\treturn converter.fromMessage(message);\n\t\t}\n\t\treturn message;\n\t}", "void handleMessage(String message){\n\t\tString[] parts = message.split(\" \");\n\t\tboolean prevFor = false;\n//\t\tSystem.out.println(\"parts0 = \" + parts[0]);\n\t\tswitch(parts[0]){\n\t\t\tcase \"#quit\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#quit\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#stop\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#stop\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#close\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#close\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#setport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#setport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + parts[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"#getport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#getport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#start\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#start\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#block\":\n\t\t\t\tif(parts.length>1){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#block\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You haven't specified a user to block!\");\n\t\t\t\tbreak;\n\t\t\tcase \"#unblock\":\n\t\t\t\tif(parts.length>0){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#unblock\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t\t\t\t//this also needs to be sent to server to send to all consoles to update block lists\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#whoiblock\":\t\t//simply prints out the arraylist of users that i block\n\t\t\t\tif(blockedList.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people you block is: \");\n\t\t\t\t\tfor(int i=0;i<blockedList.size();i++){\n\t\t\t\t\t\tSystem.out.print(blockedList.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You are not blocking any users\");\n\t\t\t\tbreak;\n\t\t\tcase \"#whoblocksme\":\t//simply prints out the arraylist of users that block me\n\t\t\t\tif(whoBlocksMe.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people who block me is: \");\n\t\t\t\t\tfor(int i=0;i<whoBlocksMe.size();i++){\n\t\t\t\t\t\tSystem.out.print(whoBlocksMe.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"There are no users that are blocking you\");\n\t\t\t\tbreak;\n\t\t\tcase \"#startforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0) {\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))) prevFor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!prevFor) {\n\t\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\t\tSystem.out.println(\"You are now forwarding to user: \"+parts[1]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse System.out.println(\"You are already forwarding to that user!\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\tSystem.out.println(\"You are now forwarding all messages to user: \"+parts[1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to forward to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"cancelforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0){\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))){\n\t\t\t\t\t\t\t\tprevFor = true;\n\t\t\t\t\t\t\t\twhoIForward.remove(i);\n\t\t\t\t\t\t\t\tSystem.out.println(\"You are no longer forwarding to user: \"+parts[1]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!prevFor){\n\t\t\t\t\t\t\tSystem.out.println(\"You were not forwarding to that user!\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse System.out.println(\"You are not currently forwarding to anyone and connot stop forwarding to this user\");\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to stop forwarding to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#private\":\n\t\t\t\tString[] messageArray = Arrays.copyOfRange(parts, 2, parts.length);\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tfor (String value : messageArray) {\n\t\t\t\t builder.append(value + \" \");\n\t\t\t\t}\n\t\t\t\tString messageToSend = builder.toString();\n\t\t\t\tclient.handleMessageFromClientUI(\"#private\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + messageToSend);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault: client.handleMessageFromClientUI(\" \" + \"---\" + client.getUID() + \"---\" + \"*\" + \"---\" + message);\n\t\t}\n\t}", "@Override\n public void onMessage(WebSocket webSocket, String text) {\n Message msg=new Message();\n msg.what=0x666;\n msg.obj=text;\n handler.sendMessage(msg);\n }", "@Override\n public void onMessage(String channel, String message) {\n responseMessage = message;\n onPostExecute(responseMessage);\n }", "@Override\n public void channelRead0(ChannelHandlerContext ctx, String request) throws Exception {\n final JsonObject json = (JsonObject) parser.parse(request);\n if(json.has(\"operation\") && ((json.get(\"operation\").getAsString()).equals(\"data\"))) {\n final DataToProcess obj = GSON.fromJson(json, DataToProcess.class);\n QueuerManager.getInstance().pushPacket(ctx.channel().id().asShortText(), obj);\n// System.out.println(\"REC Data Received \" + ctx.channel().id().asShortText());\n }\n else {\n// System.out.println(\"REC hello packet\");\n }\n }", "@Override\n public void onReceiveDataChannelMessage(final String message) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n JSONObject receive = new JSONObject();\n try {\n receive = new JSONObject(message);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n ContentValues values = new ContentValues();\n String payload = \"\";\n try {\n values.put(\"timestamp\", receive.getString(\"timestamp\"));\n payload = receive.getString(\"payload\");\n values.put(\"data\", payload);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if(!payload.equals(\"\")) {\n sql.insert(values);\n }else {\n Toast.makeText(headerView.getContext(), \"接收到錯誤的資料,請檢查App是否為最新版本\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n NavHostFragment navHostFragment = (NavHostFragment) getSupportFragmentManager().getFragments().get(0);\n try {\n HomeFragment home = (HomeFragment) navHostFragment.getChildFragmentManager().getFragments().get(0);\n home.updateHistory();\n }catch(Exception e) {\n e.printStackTrace();\n }\n\n if(!payload.equals(\"\")) {\n ClipData clip = ClipData.newPlainText(\"message\", payload);\n mClip.setPrimaryClip(clip);\n Toast.makeText(headerView.getContext(), \"剪貼簿已更新\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void handleMessage(Message message, DatagramSocket socket) throws HandlingException, IOException, ClassNotFoundException;", "public FeedEvent processMessage(byte[] message) {\n\t\tif ((message == null) || (message.length < 2))\n\t\t\treturn null;\n\n\t\tDdfMarketBase msg = Codec.parseMessage(message);\n\n\t\tif (msg == null) {\n\t\t\tlog.error(\"DataMaster.processMessage(\" + new String(message) + \") failed.\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn processMessage(msg);\n\t}", "@Override\r\n public void handleMessage(Message msg) {\n }", "public static String parseResponse(String message){\n\t\tchar[] b = message.toCharArray();\n\t\tStringBuffer sb = new StringBuffer();\n\t\t//单行回复\n\t\tif('+'==b[0]){\n\t\t\tsb.append(message.substring(1));\n\t\t}else{\n\t\t\tSystem.out.println(\"格式错误\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public void readMessages() {\n if (!this.isConnectedToClientServer){return;}\n String inputMessage = inputQueue.poll();\n if (inputMessage != null){\n try{\n ClientMessageType messageType = ClientMessageParser.parse(inputMessage);\n if (messageType == ClientMessageType.INCOMING_BALL){\n //parses the message to get a ball, which is then added to the board\n Ball ball = ClientMessageParser.parseIncomingBall(inputMessage);\n board.addBall(ball);\n }\n else if (messageType == ClientMessageType.WALL_INVISIBILITY){\n //parses the messages to find out which boundary to make invisible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallInvisibility(inputMessage, board.neighbors);\n board.makeInvisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.WALL_VISIBILITY){\n //parses the messages to find out which boundary to make visible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallVisibility(inputMessage, board.neighbors);\n board.makeVisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.DISCONNECT_CLIENT){\n disconnectFromClientAndServer();\n }\n } catch (IncorrectFormatException e){\n //don't do anything --> message is not parsed, but play on this board still continues\n }\n }\n }", "@Test\n public void fullConversion() {\n Map<String, String> details = new HashMap<String, String>();\n details.put(\"key1\", \"val1\");\n details.put(\"secondkey\", \"secondval\");\n\n SimpleBasicMessage arec = new SimpleBasicMessage(\"my msg\", details);\n arec.setMessageId(new MessageId(\"12345\"));\n arec.setCorrelationId(new MessageId(\"67890\"));\n String json = arec.toJSON();\n System.out.println(json);\n assertNotNull(\"missing JSON\", json);\n\n SimpleBasicMessage arec2 = SimpleBasicMessage.fromJSON(json, SimpleBasicMessage.class);\n assertNotNull(\"JSON conversion failed\", arec2);\n assertNotSame(arec, arec2);\n assertNull(\"BasicMessage ID should not be encoded in JSON\", arec2.getMessageId());\n assertNull(\"Correlation ID should not be encoded in JSON\", arec2.getCorrelationId());\n assertEquals(\"my msg\", arec2.getMessage());\n assertEquals(2, arec2.getDetails().size());\n assertEquals(\"val1\", arec2.getDetails().get(\"key1\"));\n assertEquals(\"secondval\", arec2.getDetails().get(\"secondkey\"));\n assertEquals(arec.getMessage(), arec2.getMessage());\n assertEquals(arec.getDetails(), arec2.getDetails());\n }", "@Handler\r\n public void onMessage(Message message, Session sessionI) throws Exception {\r\n log.info(\"inside generic message handler - message =: \" + message.toString());\r\n MsgType msgType = new MsgType();\r\n message.getHeader().getField(msgType);\r\n log.info(\"inside generic message handler - msgtype =: \" + msgType.toString());\r\n// log.info(\"inside generic message handler - message =: \"+ message.toString());\r\n }", "@Override\n\tpublic void visit(Message message) {\n\t}", "private void handleApplicationDataMessage(IOSMessage message) {\n }", "@Override\n\t\t\t\tpublic void messageArrived(MqttTopic topicName,\n\t\t\t\t\t\tMqttMessage message) throws Exception {\n\t\t\t\t\tSystem.out.println(\"messageArrived----------\");\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 1;\n\t\t\t\t\tmsg.obj = message.toString();\n\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t}", "@Override\r\n public void onMessage(Message message) {\r\n LOG.info(\"Message received\");\r\n\r\n try {\r\n if (message instanceof TextMessage) {\r\n LOG.debug(\"Process TextMessage\");\r\n TextMessage tMsg = (TextMessage) message;\r\n LOG.debug(\"Message content is: \" + tMsg.getText());\r\n String[] param = tMsg.getText().split(\";\");\r\n\r\n if (param[0] != null && param[1] != null && !param[0].isEmpty() && !param[1].isEmpty()) {\r\n LOG.debug(\"DELETE from \" + param[0] + \" to \" + param[1]);\r\n atl.deleteBetween(param[0], param[1]);\r\n }\r\n else {\r\n LOG.warn(\"Message has wrong content\");\r\n }\r\n }\r\n else if (message instanceof ObjectMessage) {\r\n LOG.debug(\"Process ObjectMessage\");\r\n\r\n if (((ObjectMessage) message).getObject() instanceof DtIntervalMessage) {\r\n DtIntervalMessage dtiMsg = (DtIntervalMessage) ((ObjectMessage) message).getObject();\r\n\r\n if (!dtiMsg.getFrom().isEmpty() && !dtiMsg.getTo().isEmpty()) {\r\n LOG.debug(\"DELETE from \" + dtiMsg.getFrom() + \" to \" + dtiMsg.getTo());\r\n atl.deleteBetween(dtiMsg.getFrom(), dtiMsg.getTo());\r\n }\r\n else {\r\n LOG.warn(\"Message has wrong content\");\r\n }\r\n }\r\n else if (((ObjectMessage) message).getObject() instanceof KickMessage) {\r\n LOG.info(\"Kick message does nothing ;-)\");\r\n }\r\n else {\r\n LOG.warn(\"Message of wrong class:\" + ((ObjectMessage) message).getObject().getClass().getName());\r\n }\r\n }\r\n if (message != null) {\r\n LOG.error(\"Message of wrong type: \" + message.getClass().getName());\r\n }\r\n else {\r\n LOG.error(\"message == null\");\r\n }\r\n }\r\n catch (JMSException jmse) {\r\n LOG.fatal(\"\", jmse);\r\n mdc.setRollbackOnly();\r\n }\r\n\r\n LOG.info(\"Message processed\");\r\n }", "@Override\n\tpublic void handleJs(JavaScriptObject message) {\n\t\t\n\t}", "private void parseMessages() {\n\n // Find the first delimiter in the buffer\n int inx = rx_buffer.indexOf(DELIMITER);\n\n // If there is none, exit\n if (inx == -1)\n return;\n\n // Get the complete message\n String s = rx_buffer.substring(0, inx);\n\n // Remove the message from the buffer\n rx_buffer = rx_buffer.substring(inx + 1);\n\n // Send to read handler\n sendToReadHandler(s);\n\n // Look for more complete messages\n parseMessages();\n }", "@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}", "public void handleMessage(Message message, DatagramSocket socket, DatagramPacket packet) throws HandlingException, IOException, ClassNotFoundException;", "void onNewMessage(String message);", "void handleMessage(EndpointPort from, EndpointPort to, Object message);", "@Override\n public void handleMessage(Message msg){\n switch (msg.what) {\n case PSensor.MESSAGE_STATE_CHANGE:\n break;\n case PSensor.MESSAGE_WRITE:\n break;\n case PSensor.MESSAGE_READ:\n PSensor.sensorData.parseInput((byte[])msg.obj);//parseInput((byte[])msg.obj);\n multiGauge.handleSensor(PSensor.sensorData.boost);\n multiGaugeVolts.handleSensor(PSensor.sensorData.batVolt);\n break;\n case PSensor.MESSAGE_DEVICE_NAME:\n break;\n case PSensor.MESSAGE_TOAST:\n break;\n default:\n break;\n }\n }", "@Override\n public Optional<TcpMessage> consumeMessage() throws IOException {\n System.out.println(\"Trying to consume a message...\");\n var json = inputMessageStream.readJson();\n\n socket.shutdownInput();\n if (json.isEmpty()) {\n return Optional.empty();\n }\n return Optional.of(new TcpMessage(JsonPayload.of(json)));\n // return Optional.of(new Message<>(new JsonPayload(json)));\n }", "public void processMessage(Chat chat, Message message)\n {\n }" ]
[ "0.7084562", "0.69849586", "0.69179803", "0.6804357", "0.671985", "0.6634088", "0.66124517", "0.6582515", "0.6520414", "0.6418108", "0.63775575", "0.63575035", "0.6350898", "0.63225275", "0.6307549", "0.6301633", "0.62764907", "0.627276", "0.6261855", "0.6258161", "0.6245119", "0.6241845", "0.62348133", "0.62325877", "0.6231929", "0.6213633", "0.62099415", "0.6198294", "0.61236274", "0.6105339", "0.60691476", "0.60581696", "0.60407233", "0.6036927", "0.60299873", "0.60240865", "0.6009358", "0.5999393", "0.5941255", "0.5917999", "0.5907184", "0.5907114", "0.59040827", "0.5897816", "0.5895366", "0.58870894", "0.5862806", "0.58476704", "0.5831859", "0.582096", "0.580859", "0.5798631", "0.57671076", "0.57588565", "0.57559675", "0.57478726", "0.57373923", "0.5727376", "0.571836", "0.5704693", "0.5699915", "0.5689157", "0.56862193", "0.56857914", "0.56840664", "0.5660342", "0.564232", "0.56415343", "0.5624369", "0.56207347", "0.56018174", "0.56000686", "0.5578767", "0.5575102", "0.55708826", "0.5568199", "0.5557923", "0.55555654", "0.5553364", "0.55386215", "0.5531403", "0.5529792", "0.55095464", "0.550443", "0.55044097", "0.5502246", "0.5501567", "0.5499306", "0.54960304", "0.54904765", "0.54875433", "0.5486557", "0.5481289", "0.54805094", "0.54702294", "0.5469442", "0.5464484", "0.546126", "0.5461203", "0.5460921" ]
0.75662625
0
/ When a user enters all of their information and clicks sign up, the data is then sent here. Input "message","signup" "firstname",___ "lastname",___ "password",___ "age",___ "email",___ "picture",___ Output "message","signupsuccess"/"signupfail" if signupfail > "signupfail",reason User data returned along with feed data in JSON
public JSONObject signUp(JSONObject message, Connection conn) { //JSONObject response = new JSONObject(); try { Statement st = conn.createStatement(); ResultSet rs = null; String signupemail = (String) message.get("email"); if (signupemail.length() > 0) { rs = st.executeQuery("SELECT * from TotalUsers"); while (rs.next()) { if (rs.getString("Email").equals(signupemail)) { response = getData(conn, rs.getInt("userID")); response.put("message", "signupfail"); response.put("signupfail", "Account already exists."); return response; //return failed sign up message } } String signupfirstname = message.getString("firstname"); String signuplastname = message.getString("lastname"); String signuppassword = (String)message.get("password"); signuppassword.replaceAll("\\s+",""); int s = hash(signuppassword); if (signupfirstname.equals("") || signuplastname.equals("") || signuppassword.equals("") || signupemail.equals("")) { response.put("message", "signupfail"); response.put("signupfail", "Please fill in all of the fields."); return response; //return failed sign up message } //Account has successful inputs and is now entered into the database. String addUser = "('" + signupfirstname + "', '" + signuplastname + "', " + s + ", '" + signupemail + "')"; // String addUser = "('" + signupfirstname + "', '" + signuplastname + "', " + signuppassword + "', '" + signupemail + "')"; st.execute(Constants.SQL_INSERT_USER + addUser + ";"); ResultSet rs3 = st.executeQuery("SELECT * FROM TotalUsers WHERE Email='" + signupemail + "';"); if (rs3.next()) { int id = rs3.getInt("userID"); Statement st1 = conn.createStatement(); DateFormat df = new SimpleDateFormat("MM/dd/yyyy"); Date date = new Date(); String newDate = df.format(date); System.out.println(newDate); String addBigBudget = "(" + id + ", 'Annual Savings', 1, 0, 0, 0, 0, 365, '" + newDate + "', 365, '', '', '50');"; st1.execute(Constants.SQL_INSERT_BIGBUDGET + addBigBudget); response = getData(conn, id); response.put("userID", id); } // emailSessions.put(signupemail, session); response.put("message", "signupsuccess"); response.put("signupsuccess", "Account was made."); response.put("email", signupemail); response.put("firstName", signupfirstname); response.put("lastName", signuplastname); return response; } else { response.put("message", "signupfail"); response.put("signupfail", "Please enter an email."); return response; //return failed sign up message } } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "signupfail"); response.put("signupfail", "Sign up failed."); } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e1) { e1.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void signUpEvt() {\n String emailRegex = \"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])\";\n // Get User Details\n String fullname = this.view.getWelcomePanel().getSignUpPanel().getFullnameText().getText().trim();\n String email = this.view.getWelcomePanel().getSignUpPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignUpPanel().getPasswordText().getPassword()).trim();\n\n if (!fullname.equals(\"\") && !email.equals(\"\") && !password.equals(\"\")) {\n if (email.matches(emailRegex)) {\n if (model.getSudokuDB().registerUser(fullname, email, password)) {\n view.getWelcomePanel().getCardLayoutManager().next(view.getWelcomePanel().getSlider());\n // Clear Fields\n view.getWelcomePanel().getSignUpPanel().clear();\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"Your registration was successful!\\n You can now sign in to your account.\", \"Successful Registration\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"Your registration was unsuccessful!\\nBe sure not to create a duplicate account.\", \"Unsuccessful Registration\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n // Email doesn't meet requirement\n Object[] options = {\"I will correct that\"};\n JOptionPane.showOptionDialog(this, \"You must provide a valid email address.\", \"Invalid Email Address\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n // Empty Fields\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to register, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "private void RegisterFacebookSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\tasName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\tasValue.add(data.GetS(LocalData.LINK));\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\n\t\t\tString sURL = StringURLs.FACEBOOK_LOGIN;\n\t\t\t// getQuery(StringURLs.FACEBOOK_LOGIN, asName, asValue);\n\n\t\t\tConnectServerParam connectServer = new ConnectServerParam();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setParams(asName, asValue);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "public void signUp() {\n presenter.signup(username.getText().toString(), password.getText().toString());\n }", "public void signup(){\n\t\tboolean result = SignUpForm.display(\"Chocolate Chiptunes - Sign Up\", \"Sign-Up Form\");\n\t\tSystem.out.println(result);\n\t}", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "public static void signUp() {\n\t\t//donor's full name\n\t\tboolean flag = true;\n \tdo {\n \t\ttry{\n \t\t\tfullname = JOptionPane.showInputDialog(null,\"Enter your full name: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n \t\t\tif (fullname.equals(\"null\")) {\n \t\t\t\tthrow new NullPointerException();\n \t\t\t}\n \t\t\t\tflag = false;\n \t\t} catch (InputMismatchException e) {\n \t\t\tJOptionPane.showMessageDialog(null, \"Please enter a valid name.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n \t\tflag = true;\n \t\t} catch (NullPointerException e) {\n \t\t\tJOptionPane.showMessageDialog(null, \"Please enter your name.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n \t\tflag = true;\n \t\t}\n\t\t}while (flag);\n\t\t\n //donor's username\n \tflag = true;\n \tdo {\n \t\ttry {\n \t\t\tusername = JOptionPane.showInputDialog(null,\"Enter your username: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n \t\t\tif (username.equals(\"null\")) {\n \t\t\t\tthrow new NullPointerException();\n \t }\n \t\t\tflag = false;\n \t\t} catch (NullPointerException e) {\n \t\t\tJOptionPane.showMessageDialog(null, \"Please enter a username.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n \t flag = true;\n \t\t}\t\n \t}while (flag);\n \t\n\t\t//donor's email\n \t \tflag = true;\n \t \tdo {\n \t \t\ttry {\n \t \t\t\temail = JOptionPane.showInputDialog(null,\"Enter your email: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n \t \t\t\tif (email.equals(\"null\")) {\n \t\t\t\tthrow new NullPointerException();\n \t\t\t}\n \t\t\tflag = false;\n \t \t\t} catch (NullPointerException e) {\n \t \t\t\tJOptionPane.showMessageDialog(null, \"Please enter your email\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n \t \t\t}\t\n \t}while (flag);\n\n\t \t//donor's gender\n \t \tflag = false;\n \t \tObject[] opt = {\"Male\", \"Female\"};\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tint g = JOptionPane.showOptionDialog(null,\"Choose your gender: \", \"SIGN UP\", JOptionPane.YES_NO_OPTION,JOptionPane.PLAIN_MESSAGE, null, opt, null);\n\t\t\t\tif (g == 0) {\n\t\t\t\t\tgender = \"male\";\n\t\t\t\t} else if (g == 1){\n\t\t\t\t\tgender = \"female\";\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\t\t\t\tflag = true;\n\t\t\t} catch (NullPointerException e1) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose your gender\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t}\n\t\t}while (flag == false);\n\t\t\t\n\t\t//donor's bloodtype\n\t\tflag = true;\n\t\twhile (flag) {\n\t\t\tbloodtype = (String) JOptionPane.showInputDialog(null, \"Choose your blood type\", \"SIGN UP\", JOptionPane.PLAIN_MESSAGE, null, bloodtypes, \"O+\" );\n\t\t\ttry {\n\t\t\t\tif (bloodtype.equals(null)) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t} else {\n\t\t\t\t\tflag = false;\n\t\t\t\t}\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose your blood type.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//donor's SSN\n\t\tflag = true;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tSSN = JOptionPane.showInputDialog(null,\"Enter your SSN: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\tif (SSN.length() == 11) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t JOptionPane.showMessageDialog(null, \"Please enter a valid SSN (11 digits)\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\tif (SSN.equals(null)) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter your SSN\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t}while (flag);\n\t\t\t\n\t\t//donor's region\n\t\tflag = true;\n\t\tObject[] possibilities = {\"Attica\",\"South Aegean Sea\",\"North Aegean Sea\",\"Central Greece\",\"West Greece\",\n\t\t\t \"Ionian Islands\",\"Thessaly\",\"Peloponnese\",\"Epirus\",\"Eastern Macedonia and Thrace\",\n\t\t\t \"Central Macedonia\",\"West Macedonia\",\"Crete\"};\n\t\twhile (flag) {\n\t\t\tregion = (String)JOptionPane.showInputDialog(null, \"Choose your region\", \"SIGN UP\", JOptionPane.PLAIN_MESSAGE, null, possibilities, \"Attica\" );\n\t\t\ttry {\n\t\t\t\tif (region.equals(null)) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t} else {\n\t\t\t\t\tflag = false;\n\t\t\t\t}\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please choose your region.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t} \n\t\t}\n\t\t\n\t\t//donor's password\n\t\tflag = true;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tpassword = JOptionPane.showInputDialog(null,\"Enter your password: \", \"SIGN UP\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\tif (password.matches(\"^.*(?=.{4,10})(?=.*\\\\d)(?=.*[a-zA-Z]).*$\")) {\n\t\t\t\t\tflag = false;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your password must contain both numbers and letters.\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t\tif (password.equals(null)) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\t\t\t} catch (NullPointerException e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter your password\", \"ALERT MESSAGE\", JOptionPane.WARNING_MESSAGE);\n\t\t\t}\n\t\t\t\n\t\t}while(flag);\n\n\t\t//insert user's data into data base\n\t\ttry {\n\t\t\tint rs = Messages.connect().executeUpdate(\"INSERT INTO BloodDonor (B_Name, B_Username, B_email, B_password, Gender, BloodType, SSN, Region)\" + \n\t\t\t\t\"VALUES ('\" + fullname + \"', '\" + username + \"', '\" + email + \"', '\" + password + \"', '\" + gender + \"', '\" + bloodtype + \"', '\" + SSN + \"', '\" + region + \"')\");\n\t\t\tMessages.connect().close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\t//insertAnswers(username);\n\t}", "private void SignUp(String email, String password) {\n if (TextUtils.isEmpty(email) || TextUtils.isEmpty(password) ) {\n\n }else {\n msignInDialog.setTitle(\"Creating New User\");\n msignInDialog.setMessage(\"Please wait while DevChat creates your new Account...\");\n msignInDialog.setCanceledOnTouchOutside(false);\n msignInDialog.show();\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(ActivityRegister.this, \"User Account Created!\", Toast.LENGTH_SHORT).show();\n createUser(et_username.getText().toString());\n msignInDialog.dismiss();\n Intent chatBoxIntent = new Intent(ActivityRegister.this, Chatbox_Activity.class);\n Bundle bundle = new Bundle();\n bundle.putStringArray(\"values\", values);\n chatBoxIntent.putExtras(bundle);\n startActivity(chatBoxIntent);\n } else {\n msignInDialog.dismiss();\n Toast.makeText(ActivityRegister.this, \"Error Creating New User Account!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }", "void signUp(SignUpRequest signupRequest);", "public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please fill out all fields!\";\n\t\t} else if(regview.findUser(uid)!=User.NULL_USER){\n\t\t\ttext = \"The username already exsit, please try another one!\";\n\t\t} else {\n\t\t\tregview.addUser(new User(uid,pw,na,em));\n\t\t\tregview.goLoginPage();\n\t\t}\n\t\tregview.setRegisterText(text);\n\t}", "public void signupPressed(View view) {\n // fetch the values\n usernameSignup = (EditText) findViewById(R.id.usernameSignupFragment);\n emailSignup = (EditText) findViewById(R.id.emailSignupFragment);\n passwordSignup = (EditText) findViewById(R.id.passwordSignupFragment);\n reenterPasswordSignup = (EditText) findViewById(R.id.reenterPasswordSignupFragment);\n\n String username = usernameSignup.getText().toString();\n String email = emailSignup.getText().toString();\n String password1 = passwordSignup.getText().toString();\n String password2 = reenterPasswordSignup.getText().toString();\n\n // input validation\n if (username.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Please enter a username.\", Toast.LENGTH_SHORT).show();\n } else if (password1.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Please enter a password.\", Toast.LENGTH_SHORT).show();\n } else if (!validatePassword(password1, password2)) {\n Toast.makeText(getApplicationContext(), \"Passwords do not match, try again.\", Toast.LENGTH_SHORT).show();\n } else if (!passwordLongEnough(password1)) {\n Toast.makeText(getApplicationContext(), \"Password too short - must be minimum 8 characters.\", Toast.LENGTH_SHORT).show();\n } else try {\n if (emailAlreadyExists(email)) {\n Toast.makeText(getApplicationContext(), \"Account already exists with this email.\", Toast.LENGTH_SHORT).show();\n } else if (!validateEmail(email)) {\n Toast.makeText(getApplicationContext(), \"Please enter a valid email.\", Toast.LENGTH_SHORT).show();\n } else try {\n if (!usernameAvailable(username)) {\n Toast.makeText(getApplicationContext(), \"Sorry, username already taken.\", Toast.LENGTH_SHORT).show();\n } else {\n // setup a user object with the given attributes, save and enter the app\n final TipperUser user = new TipperUser();\n user.setUsername(username);\n\n // hash password with salt\n String hashed = BCrypt.hashpw(password1, BCrypt.gensalt());\n user.setPassword(hashed);\n\n user.setEmail(email);\n user.setGoogleUser(false);\n user.setFacebookUser(false);\n user.setUuidString();\n\n user.save();\n app.setCurrentUser(user);\n user.pinInBackground();\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "public JSONObject signUpTest(JSONObject message, Session session, Connection conn) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = null;\n\t\t\tString signupemail = (String) message.get(\"email\");\n\t\t\tif (signupemail.length() > 0) {\n\t\t\t\trs = st.executeQuery(\"SELECT * from TotalUsers\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tif (rs.getString(\"Email\").equals(signupemail)) {\n\t\t\t\t\t\tresponse = getData(conn, rs.getInt(\"userID\"));\n\t\t\t\t\t\tresponse.put(\"message\", \"signupfailtest\");\n\t\t\t\t\t\tresponse.put(\"signupfailtest\", \"Account already exists.\");\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t\t//return failed sign up message\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString signupfirstname = message.getString(\"firstname\");\n\t\t\t\tString signuplastname = message.getString(\"lastname\");\n\t\t\t\tString signuppassword = (String)message.get(\"password\");\n\t\t\t\tsignuppassword.replaceAll(\"\\\\s+\",\"\");\n\t\t\t\t\n\t\t\t\tint s = hash(signuppassword);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif (signupfirstname.equals(\"\") || signuplastname.equals(\"\") || signuppassword.equals(\"\") || signupemail.equals(\"\")) {\n\t\t\t\t\tresponse.put(\"message\", \"signupfailtest\");\n\t\t\t\t\tresponse.put(\"signupfailtest\", \"Please fill in all of the fields.\");\n\t\t\t\t\treturn response;\n\t\t\t\t\t//return failed sign up message\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t//Account has successful inputs and is now entered into the database.\n\t\t\t\t\n\t\t\t\tString addUser = \"('\" + signupfirstname + \"', '\" + signuplastname + \"', \" + s + \", '\" + signupemail + \"')\";\n//\t\t\t\tString addUser = \"('\" + signupfirstname + \"', '\" + signuplastname + \"', \" + signuppassword + \"', '\" + signupemail + \"')\";\n\t\t\t\tst.execute(Constants.SQL_INSERT_USER + addUser + \";\");\n//\t\t\t\temailSessions.put(signupemail, session);\n\t\t\t\tresponse.put(\"message\", \"signupsuccesstest\");\n\t\t\t\tresponse.put(\"signupsuccesstest\", \"Account was made.\");\n\t\t\t\tresponse.put(\"email\", signupemail);\n\t\t\t\tresponse.put(\"firstName\", signupfirstname);\n\t\t\t\tresponse.put(\"lastName\", signuplastname);\n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresponse.put(\"message\", \"signupfailtest\");\n\t\t\t\tresponse.put(\"signupfailtest\", \"Please enter an email.\");\n//\t\t\t\treturn response;\n\t\t\t\t//return failed sign up message\n\t\t\t}\n\t\t} catch (SQLException sqle) {\n\t\t\ttry {\n\t\t\t\tsqle.printStackTrace();\n\t\t\t\tresponse.put(\"message\", \"signupfailtest\");\n\t\t\t\tresponse.put(\"signupfailtest\", \"Sign up failed.\");\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n//\t\t\treturn response;\n\t } catch (JSONException e1) {\n\t\t\te1.printStackTrace();\n\t\t\t\n\t\t}\n\t\tdeleteAll(conn);\n\t\treturn response;\n\t}", "private void sign_up() {\n final String name = nameET.getText().toString().trim();\n final String cell = cellET.getText().toString().trim();\n final String division = divisionET.getText().toString().trim();\n final String address = addressEt.getText().toString().trim();\n final String password = passwordET.getText().toString().trim();\n final String account_type = accouttypeET.getText().toString().trim();\n final String status=\"Pending\";\n\n\n //Checking field/validation\n if (name.isEmpty()) {\n nameET.setError(\"Please enter name !\");\n requestFocus(nameET);\n }\n else if (cell.length()!=11) {\n\n cellET.setError(\"Please enter valid phone number !\");\n requestFocus(cellET);\n\n }\n\n else if (division.isEmpty()) {\n\n divisionET.setError(\"Please select division !\");\n requestFocus(divisionET);\n Toasty.error(this, \"Please select division !\", Toast.LENGTH_SHORT).show();\n }\n else if (address.isEmpty()) {\n\n addressEt.setError(\"Please enter full address !\");\n requestFocus(addressEt);\n }\n else if (account_type.isEmpty()) {\n\n accouttypeET.setError(\"Please select account type !\");\n requestFocus(accouttypeET);\n Toasty.error(this, \"Please select account type !\", Toast.LENGTH_SHORT).show();\n }\n else if (password.isEmpty()) {\n\n passwordET.setError(\"Please enter password !\");\n requestFocus(passwordET);\n }\n else if (password.length() < 4) {\n\n passwordET.setError(\"Password should be more than 3 characters!\");\n requestFocus(passwordET);\n }\n\n else\n {\n loading = new ProgressDialog(this);\n loading.setIcon(R.drawable.wait_icon);\n loading.setTitle(\"Sign up\");\n loading.setMessage(\"Please wait....\");\n loading.show();\n\n\n StringRequest stringRequest=new StringRequest(Request.Method.POST, Constant.SIGNUP_URL, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n //for track response in logcat\n Log.d(\"RESPONSE\", response);\n\n if (response.equals(\"success\")) {\n loading.dismiss();\n Intent intent = new Intent(RegisterActivity.this, LoginActivity.class);\n Toasty.success(RegisterActivity.this, \"Registration successful\", Toast.LENGTH_SHORT).show();\n startActivity(intent);\n } else if (response.equals(\"exists\")) {\n\n Toasty.warning(RegisterActivity.this, \"User already exists!\", Toast.LENGTH_SHORT).show();\n loading.dismiss();\n\n }\n\n else if (response.equals(\"failure\")) {\n\n Toasty.error(RegisterActivity.this, \"Registration Failed!\", Toast.LENGTH_SHORT).show();\n loading.dismiss();\n\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n Toasty.error(RegisterActivity.this, \"No Internet Connection or \\nThere is an error !!!\", Toast.LENGTH_SHORT).show();\n loading.dismiss();\n }\n }\n\n ){\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<>();\n //Adding parameters to request\n\n params.put(Constant.KEY_NAME, name);\n params.put(Constant.KEY_CELL, cell);\n params.put(Constant.KEY_DIV, division);\n params.put(Constant.KEY_ADDRESS, address);\n params.put(Constant.KEY_AC_TYPE, account_type);\n params.put(Constant.KEY_PASSWORD, password);\n params.put(Constant.KEY_STATUS, status);\n\n Log.d(\"url_info\",Constant.SIGNUP_URL);\n\n //returning parameter\n return params;\n }\n };\n\n //Adding the string request to the queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(stringRequest);\n }\n }", "private void signUp() {\n final String email = ((EditText) findViewById(R.id.etSignUpEmail))\n .getText().toString();\n final String password = ((EditText) findViewById(R.id.etSignUpPassword))\n .getText().toString();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:success\");\n sendVerificationEmail(mAuth.getCurrentUser());\n updateUI();\n } else {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:failure\");\n Toast.makeText(LoginActivity.this,\n \"Failed to create a new user.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "public void signup() {\n Log.d(TAG, \"Signup\");\n\n if (!validate()) {\n onSignupFailed();\n return;\n }\n\n createProgressDialog(R.string.creating_account);\n\n final String name = _nameText.getText().toString();\n final String email = _emailText.getText().toString();\n final String password = _passwordText.getText().toString();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n createToast(R.string.authentication_failed, Toast.LENGTH_SHORT);\n } else {\n progressDialog.dismiss();\n final FirebaseUser user = mAuth.getCurrentUser();\n mDatabase.child(\"users\").child(user.getUid()).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.getValue() == null) {\n createUserInFirebase(name, email, user.getUid());\n }\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n sendToTrivia();\n }\n\n }\n });\n\n\n new android.os.Handler().postDelayed(\n new Runnable() {\n public void run() {\n // On complete call either onSignupSuccess or onSignupFailed\n // depending on success\n progressDialog.dismiss();\n }\n }, 3000);\n }", "public void UserSignUp(View view)\n {\n // get the data from text fields\n inputName = ((EditText) findViewById(R.id.signUpEditTextName)).getText().toString();\n inputEmail = ((EditText) findViewById(R.id.signUpEditTextEmail)).getText().toString();\n inputPhoneNumber = ((EditText) findViewById(R.id.signUpEditTextPhoneNumber)).getText().toString();\n inputPassword = ((EditText) findViewById(R.id.signUpEditTextPassword)).getText().toString();\n inputRepeatPassword = ((EditText) (findViewById(R.id.signUpEditTextRepeatPassword))).getText().toString();\n\n // If some text fields are empty\n if(inputName.equals(\"\") || inputEmail.equals(\"\") || inputPhoneNumber.equals(\"\")\n || inputPassword.equals(\"\") || inputRepeatPassword.equals(\"\")) {\n Toast.makeText(SignUpActivity.this, \"All fields are required!\", Toast.LENGTH_LONG).show();\n finish();\n startActivity(getIntent());\n }\n // if password and repeat password are matched\n else if(inputPassword.compareTo(inputRepeatPassword) == 0) {\n // if there is internet connection\n if (CheckNetworkConnection.checknetwork(getApplicationContext()))\n new CreateNewUser().execute();\n else\n Toast.makeText(SignUpActivity.this, \"No Internet Connection!\", Toast.LENGTH_LONG).show();\n }\n // if password and repeat password do not matched\n else {\n Toast.makeText(SignUpActivity.this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n finish();\n startActivity(getIntent());\n }\n\n }", "private void doSignup(RoutingContext ctx){\n // Get Data from view\n JsonObject req = ctx.getBodyAsJson();\n String username = req.getString(\"username\");\n String password = req.getString(\"password\");\n\n GoogleAuthenticator authenticator = new GoogleAuthenticator();\n\n //Get Generate Key\n System.out.println(\" Calling Google Authenticator to generate AuthKey\");\n GoogleAuthenticatorKey authKey = authenticator.createCredentials();\n String key = authKey.getKey();\n System.out.println(\" Google Authenticator generated AuthKey\");\n\n //Store Data from Repository\n User user = new User(username,password,key);\n\n //send response to the user\n JsonObject res = new JsonObject().put(\"key\",key);\n ctx.response().setStatusCode(200).end(res.encode());\n }", "@Override\n public void onClick(View v) {\n\n String name = fullname.getText().toString();\n String emailx = email.getText().toString();\n String password1 = password.getText().toString();\n String password2 = password_conf.getText().toString();\n progressDialog.setMessage(\"sign up your data\");\n showDialog();\n\n\n userdata = new UserData(name,emailx,password1,password2);\n Call<UserData> call = createUser.createUser(userdata);\n call.enqueue(new Callback<UserData>() {\n @Override\n public void onResponse(Call<UserData> call, Response<UserData> response) {\n if(response.isSuccessful()){\n Toast.makeText(RegisterActivity.this,\"Sign Up Success\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n finish();\n hideDialog();\n } else {\n Toast.makeText(getApplicationContext(),response.message(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }\n\n @Override\n public void onFailure(Call<UserData> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"Error Connection\", Toast.LENGTH_LONG).show();\n hideDialog();\n }\n });\n }", "@Test(priority=2)\n\tpublic void completeSignUpProcess(){\n\t\tsignup.clearAllFields();\n\t\tsignup.enterId(\"[email protected]\");\n\t\tsignup.enterFirstName(\"Manish Kumar\");\n\t\tsignup.enterLastName(\"Vuttunoori\");\n\t\tsignup.enterPassword(\"qwerty126\");\n\t\tsignup.reenterPassword(\"qwerty126\");\n\t\tsignup.clickSubmit();\n\t\t// must go to home page but wont as the mail id used here is already registered for an account, \n\t\t//so just checking for single error i.e. Email is already registered.\n\t\tAssert.assertEquals(1, signup.getErrors().size());\n\t}", "public void signUp(UserSignUpRequest userSignUpRequest) {\n apiInterface.signUp(\n userSignUpRequest\n )\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n new Observer<Response<ResponseBody>>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(Response<ResponseBody> responseBodyResponse) {\n if (responseBodyResponse.code() == 201) {\n try {\n //noinspection ConstantConditions\n saveUserData(\n new Gson().fromJson(\n responseBodyResponse.body().string(),\n UserData.class\n )\n );\n } catch (IOException e) {\n e.printStackTrace();\n }\n mutableLiveDataSignUpResult.postValue(\n new Event<>(\n new Result(\n Enums.Result.SUCCESS, \"\"\n )\n )\n );\n } else {\n mutableLiveDataSignUpResult.postValue(\n new Event<>(\n new Result(\n Enums.Result.FAIL,\n getErrorMessage(responseBodyResponse.errorBody())\n )\n )\n );\n }\n }\n\n @Override\n public void onError(Throwable e) {\n mutableLiveDataSignUpResult.postValue(\n new Event<>(\n new Result(\n Enums.Result.FAIL,\n getErrorMessage(e)\n )\n )\n );\n }\n\n @Override\n public void onComplete() {\n\n }\n }\n );\n }", "private void userSignUp(final int id, String agentNm, String fName, String sta, String localG, String tow, String phoneNm, String fmMr, String cbRg, String memSiz, String cggNam, String cFarmZz, String fcRg, String inFarm, String riceVarr, String qttyHarr, String afRg,\n String fertTldd, String noRzz, String qtyApll, String alRg, String szLoaa, String srcRicc, String qtyPdyRicc, String majByrss, String comSolcc, String qttyByy, String howMcc, String prcBb, String incDs,\n String reasnn, String hwSpyy, String stRg, String ysSptrr, String fm1, String t11, String cstCs11, String fm2, String t22, String cstCs22, String fm3, String t33, String cstCs33, String infPrcc, String salesDmm,\n String avgQtFcc, String whnCp, String whyCp, String whnEx, String whyExx, String mjCh, String adCh, String timSe, String othSe, String adInn) {\n Call<ResponseBody> call = RetrofitClient2\n .getInstance()\n .getNaSurvey()\n .submitResponse(agentNm, fName, sta, localG, tow, phoneNm, fmMr, cbRg, memSiz, cggNam, cFarmZz, fcRg, inFarm, riceVarr, qttyHarr, afRg, fertTldd, noRzz, qtyApll, alRg, szLoaa, srcRicc, qtyPdyRicc, majByrss, comSolcc, qttyByy, howMcc, prcBb, incDs, reasnn, hwSpyy, stRg, ysSptrr, fm1, t11, cstCs11,\n fm2, t22, cstCs22, fm3, t33, cstCs33, infPrcc, salesDmm, avgQtFcc, whnCp, whyCp, whnEx, whyExx, mjCh, adCh, timSe, othSe, adInn);\n\n call.enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n\n try {\n JSONObject obj = new JSONObject(String.valueOf(response));\n if (!obj.getBoolean(\"error\")) {\n //updating the status in sqlite\n db.updateNameStatus(id, SurveyActivity.SYNC_STATUS_OK);\n\n //sending the broadcast to refresh the list\n context.sendBroadcast(new Intent(SurveyActivity.DATA_SAVED_BROADCAST));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n Map<String, String> params = new HashMap<>();\n params.put(\"agentNm\", agentNm);\n params.put(\"fname\", fName);\n params.put(\"state\", sta);\n params.put(\"lga\", localG);\n params.put(\"town\", tow);\n params.put(\"phoneNm\", phoneNm);\n params.put(\"farmer\", fmMr);\n params.put(\"cogp\", cbRg);\n params.put(\"memsz\", memSiz);\n params.put(\"cgnam\", cggNam);\n params.put(\"cofmsz\", cFarmZz);\n params.put(\"frmcol\", fcRg);\n params.put(\"invfz\", inFarm);\n params.put(\"ricev\", riceVarr);\n params.put(\"qtyhv\", qttyHarr);\n params.put(\"apfert\", afRg);\n params.put(\"ysyld\", fertTldd);\n params.put(\"norz\", noRzz);\n params.put(\"qtyap\", qtyApll);\n params.put(\"aploa\", alRg);\n params.put(\"szloa\", szLoaa);\n params.put(\"srcric\", srcRicc);\n params.put(\"qtypdrc\", qtyPdyRicc);\n params.put(\"majby\", majByrss);\n params.put(\"comso\", comSolcc);\n params.put(\"qtby\", qttyByy);\n params.put(\"hwmch\", howMcc);\n params.put(\"pricbf\", prcBb);\n params.put(\"indcr\", incDs);\n params.put(\"rsn\", reasnn);\n params.put(\"hwspl\", hwSpyy);\n params.put(\"chsp\", stRg);\n params.put(\"yssptr\", ysSptrr);\n params.put(\"frm1\", fm1);\n params.put(\"to1\", t11);\n params.put(\"costc1\", cstCs11);\n params.put(\"frm2\", fm2);\n params.put(\"to2\", t22);\n params.put(\"costcs2\", cstCs22);\n params.put(\"frm3\", fm3);\n params.put(\"to3\", t33);\n params.put(\"costcs3\", cstCs33);\n params.put(\"infpr\", infPrcc);\n params.put(\"salsdm\", salesDmm);\n params.put(\"avqtf\", avgQtFcc);\n params.put(\"wncp\", whnCp);\n params.put(\"wycp\", whyCp);\n params.put(\"wnex\", whnEx);\n params.put(\"wyex\", whyExx);\n params.put(\"majch\", mjCh);\n params.put(\"addch\", adCh);\n params.put(\"timsl\",timSe);\n params.put(\"othsl\",othSe);\n params.put(\"adin\",adInn);\n\n return;\n }\n });\n\n }", "private void attemptSignUp() {\n // Reset errors.\n mName.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(mName.getText().toString())) {\n mName.setError(getString(R.string.error_field_required));\n focusView = mName;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n SQLiteDatabase database = DBHelper.getInstance(this).getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(DBHelper.U_NAME, mName.getText().toString());\n values.put(DBHelper.U_EMAIL, email);\n values.put(DBHelper.U_IMAGE, profileImage);\n values.put(DBHelper.U_PASSWORD, password);\n database.insert(DBHelper.TUSER, null, values);\n database.close();\n\n UserModel userData = new UserModel();\n userData.setId(0);\n userData.setName(mName.getText().toString());\n userData.setImage(profileImage);\n userData.setEmail(email);\n userData.setPassword(password);\n userData.setRememberMe(rememberMe);\n String userDataStr = new Gson().toJson(userData);\n Common.saveStrPref(this, Common.PREF_USER, userDataStr);\n\n startActivity(new Intent(this, HomeActivity.class));\n }\n }", "public void signup(View view){\r\n if(editText1.getText().toString().isEmpty()||editText2.getText().toString().isEmpty()||editText3.getText().toString().isEmpty()\r\n ||editText4.getText().toString().isEmpty()||editText5.getText().toString().isEmpty()){\r\n Toast.makeText(this, \"Παρακαλώ εισάγετε όλα τα απαραίτητα πεδία προκειμένου να εγγραφείτε.\", Toast.LENGTH_SHORT).show();\r\n }\r\n else{\r\n mAuth.createUserWithEmailAndPassword(editText1.getText().toString(), editText2.getText().toString())\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n\r\n if (task.isSuccessful()) {\r\n new_user = mAuth.getCurrentUser();\r\n create_users_list(new_user.getUid());\r\n String userid=new_user.getUid();\r\n String firstname=editText3.getText().toString();\r\n String lastname=editText4.getText().toString();\r\n String address=editText5.getText().toString();\r\n SharedPreferences.Editor editor=pref.edit();\r\n editor.putString(userid+\"firstname\",firstname);\r\n editor.putString(userid+\"lastname\",lastname);\r\n editor.putString(userid+\"address\",address);\r\n editor.apply();\r\n Intent intent = new Intent(getApplicationContext(), MainActivity3.class);\r\n intent.putExtra(\"userid\", new_user.getUid());\r\n\r\n startActivity(intent);\r\n\r\n\r\n } else {\r\n Toast.makeText(getApplicationContext(), task.getException().getMessage(),\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }\r\n }\r\n }\r\n );}}", "void signUpAttempt(String email, String password, String firstName, String lastName);", "private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}", "public int signUp(String email_address, String email_password, String first_name, String last_name)\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\tString query = \"insert into users values (?, ?, ?, ?)\";\r\n\t\t\tpreparedStatement = connect.prepareStatement(query);\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * variables here replaces the question marks in the query\r\n\t\t\t * the numbers before the variables denote what question mark is the variable supposed to replace\r\n\t\t\t * the numbers start at 1 compared to starting at 0\r\n\t\t\t */\r\n\t\t\tpreparedStatement.setString(1, email_address);\r\n\t\t\tpreparedStatement.setString(2, email_password);\r\n\t\t\tpreparedStatement.setString(3, first_name);\r\n\t\t\tpreparedStatement.setString(4, last_name);\r\n\t\t\tpreparedStatement.execute();\t//execute the query above\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * Created an object array which only contains the value of the button to be used in the popup message\r\n\t\t\t * the popup message displays upon successfully registering a user\r\n\t\t\t */\r\n\t\t\tObject[] options = {\"OK\"};\r\n\t\t\tint temp = JOptionPane.showOptionDialog(null, \"You are now registered\", \"Registration\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, options[0]);\r\n\t\t\treturn temp;\r\n\t\t} \r\n\t\tcatch (Exception e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "@OnClick(R.id.register_email_register_button)\n void onClickRegister(){\n if(isInfoValidate()){\n //Call Register Http, first put the information into bundle\n// Bundle bundle = new Bundle();\n// bundle.putString(Constant.REGISTER_PHONE_NUM, mEmailAddress.getText().toString());\n// bundle.putString(Constant.REGISTER_PASSWORD, mPassword.getText().toString());\n// bundle.putInt(Constant.REGISTER_REGION, mRegionSpinner.getSelectedItemPosition());\n//\n// callRegisterHttp(mEmailAddress.getText().toString(),\n// mRegionSpinner.getSelectedItemPosition(),\n// bundle);\n\n //\n\n\n JSONObject jsonParams = new JSONObject();\n JSONObject outerJsonParams = new JSONObject();\n try {\n// jsonParams.put(\"username\", \"michael_firebasechat_1\");\n // String userNameString = mEmailAddress.getText().toString().split(\"@\")[0];\n jsonParams.put(\"username\", mUsername.getText().toString());\n jsonParams.put(\"email\", mEmailAddress.getText().toString());\n jsonParams.put(\"password\", mPassword.getText().toString());\n outerJsonParams.put(\"user\",jsonParams);\n StringEntity entity = new StringEntity(outerJsonParams.toString());\n callRegisterByEmailHttp(entity);\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }\n else {\n //Show the warning text\n new SweetAlertDialog(getContext(), SweetAlertDialog.WARNING_TYPE)\n .setTitleText(getString(R.string.warning_title))\n .setContentText(errorText)\n .setConfirmText(getString(R.string.warning_confirm))\n .show();\n }\n }", "private void signUp() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password, true);\n mAuthTask.execute((Void) null);\n }\n }", "@OnClick(R.id.register_button)\n public void register () {\n InputMethodManager imm = (InputMethodManager) context\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromInputMethod(usernameField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(passwordField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(confirmField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(emailField.getWindowToken(), 0);\n\n\n\n\n String username = usernameField.getText().toString();\n String password = passwordField.getText().toString();\n String confirm = confirmField.getText().toString();\n String email = emailField.getText().toString();\n String avatarBase64 = \"string\";\n\n if (username.isEmpty() || password.isEmpty() || confirm.isEmpty() || email.isEmpty()) {\n\n Toast.makeText(context, R.string.field_empty, Toast.LENGTH_LONG).show();\n } else if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n\n Toast.makeText(context, R.string.provide_vaild_email, Toast.LENGTH_SHORT).show();\n\n } else if (!password.equals(confirm)) {\n\n Toast.makeText(context, R.string.passwords_dont_match, Toast.LENGTH_SHORT).show();\n } else {\n\n registerButton.setEnabled(false);\n spinner.setVisibility(VISIBLE);\n }\n Account account = new Account(email, username, avatarBase64, password);\n RestClient restClient = new RestClient();\n restClient.getApiService().register(account).enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n\n if (response.isSuccessful()) {\n Toast.makeText(context, R.string.registration_successful, Toast.LENGTH_LONG).show();\n //This will run if everything comes back good and sets the users token and expiration\n// User regUser = response.body();\n// UserStore.getInstance().setToken(regUser.getToken());\n// UserStore.getInstance().setTokenExpiration(regUser.getExpiration());\n\n //This will set up the flow of the application to show the next view upon successful registration\n Flow flow = PeoplemonApplication.getMainFlow();\n flow.goBack();\n } else {\n\n //This will return if the user has entered info but they have registered before\n resetView();\n Toast.makeText(context, R.string.registration_failed + \": \" + response.code(), Toast.LENGTH_LONG).show();\n }\n }\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n\n //This will show up if the data didn't come back from the server correctly or there is a timeout.\n resetView();\n Toast.makeText(context, R.string.registration_failed, Toast.LENGTH_LONG).show();\n }\n });\n }", "public F.Promise<Result> handleSignUp() {\n final Form<SignUp> filledForm = signUpForm.bindFromRequest();\n if(customerService().isLoggedIn()) {\n return asPromise(redirectToReturnUrl());\n } else if (filledForm.hasErrors()) {\n return asPromise(badRequest(signupView.render(data().build(), filledForm)));\n } else {\n return handleSignUpWithValidForm(filledForm);\n }\n }", "public void onClick_AGSU_signUp(View view) {\n AnimationTools.startLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING, this, signUpButton_rootLayout, R.style.AGSU_loading_progress_bar);\n\n FirestoreManager.saveUserData(SecondarySignUpManager.getDatabaseUser());\n\n //add a password-email auth method\n AuthCredential credential = EmailAuthProvider.getCredential(SecondarySignUpManager.getDatabaseUser().getEmail(), SecondarySignUpManager.getDatabaseUser().getPassword());\n AuthenticationManager.getCurrentUser().linkWithCredential(credential).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n System.out.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: link with email credential SUCCESSFUL! User uid = \" + task.getResult().getUser().getDisplayName());\n Constants.isSignUpInProcess = false; //sign up is now finished\n\n //in AGSU user is always new --> send verification email\n EmailVerification.sendVerificationEmail();\n\n Constants.isSecondarySignUpInProcess = false; //end of secondary sign up process\n\n ActivityTools.startNewActivity(activityContext, MainActivity.class);\n } else {\n System.err.println(\"[Neuron.SecondarySignUpActivity.onClick_AGSU_signUp]: ERROR: link with email credential FAILED! \" + task.getException().getMessage());\n }\n\n AnimationTools.stopLoadingAnimation(Constants.ANIMATION_CODE_AGSU_LOADING);\n }\n });\n\n }", "public void sendDataForSignUp(View view){\r\n //Prendo i dati dalla form:\r\n EditText nome = findViewById(R.id.nome);\r\n EditText cognome = findViewById(R.id.cognome);\r\n EditText dataDinascita = findViewById(R.id.data_nascita);\r\n EditText telefono = findViewById(R.id.telefono);\r\n EditText username = findViewById(R.id.username);\r\n EditText mail = findViewById(R.id.email);\r\n EditText password = findViewById(R.id.password);\r\n EditText passwordr = findViewById(R.id.repPass);\r\n\r\n //Converto i dati in stringa per inviarli al server\r\n String nomes = nome.getText().toString();\r\n String cognomes = cognome.getText().toString();\r\n String dataDinascitas = dataDinascita.getText().toString();\r\n String telefonos = telefono.getText().toString();\r\n String usernames = username.getText().toString();\r\n String mails = mail.getText().toString();\r\n String passwords = password.getText().toString();\r\n String passwordrs = passwordr.getText().toString();\r\n\r\n if (passwords.compareTo(passwordrs) != 0 || passwords.length() < 1)\r\n {\r\n Toast.makeText(this, \"ERRORE:\\nLe password non corrispondenti.\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n else\r\n if (nomes.length() < 1 || cognomes.length() < 1 || dataDinascitas.length() < 1 || telefonos.length() < 1 || usernames.length() < 1 || mails.length() < 1)\r\n {\r\n Toast.makeText(this, \"ERRORE:\\nDevi compilare tutti i campi.\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n\r\n try {\r\n passwords = SHA1(passwords);\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n } catch (UnsupportedEncodingException e) {\r\n Toast.makeText(this, \"ERRORE:\\nimpossibile hashare la password da inviare.\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n\r\n JSONObject postData = new JSONObject();\r\n JSONObject autista = new JSONObject();\r\n\r\n try {\r\n autista.put(\"username\", usernames);\r\n autista.put(\"password\", passwords);\r\n autista.put(\"email\", mails);\r\n autista.put(\"nome\", nomes);\r\n autista.put(\"cognome\", cognomes);\r\n autista.put(\"dataDiNascita\", dataDinascitas);\r\n autista.put(\"telefono\", telefonos);\r\n postData.put(\"autista\", autista);\r\n }catch (Exception e){\r\n Toast.makeText(this, \"ERRORE:\\nimpossibile leggere i campi appena compilati.\", Toast.LENGTH_LONG).show();\r\n return;\r\n }\r\n\r\n\r\n // Avverto l'utente del tentativo di invio dei dati di login al server\r\n caricamento = ProgressDialog.show(SignUpActivity.this, \"\",\r\n \"Connessione con il server in corso...\", true);\r\n Connessione conn = new Connessione(postData, \"POST\");\r\n conn.addListener(this);\r\n conn.execute(Parametri.IP + \"/signup\");\r\n }", "private void userSignup(String email, String password) {\n String url = \"https://7e69edce-af20-4c49-9ad9-5697df4e8a20.mock.pstmn.io\";\n StringRequest request = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n// Log.i(\"LOG\", \"onResponse: \" + response);\n onSignupClicked.onClicked(response);\n dismiss();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n// Toast.makeText(getContext(), error.toString(), Toast.LENGTH_SHORT).show();\n Log.i(\"LOG\", \"onErrorResponse: \" + error.toString());\n }\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n\n params.put(\"username\", email);\n params.put(\"password\", password);\n return params;\n }\n };\n\n request.setRetryPolicy(new DefaultRetryPolicy(15000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n RequestQueue requestQueue = Volley.newRequestQueue(getContext());\n requestQueue.add(request);\n }", "public void signUp(View view){\n\n\n\n if(signUpCheck) {\n\n\n if (TextUtils.isEmpty(userName.getText().toString()) || TextUtils.isEmpty(password.getText().toString()) || TextUtils.isEmpty(email.getText().toString())) {\n Toast.makeText(this, \"A Username, a Password, and an Email are required.\", Toast.LENGTH_SHORT).show();\n } else {\n\n ParseUser user = new ParseUser();\n\n user.setUsername(userName.getText().toString());\n user.setEmail(email.getText().toString());\n user.setPassword(password.getText().toString());\n\n user.signUpInBackground(new SignUpCallback() {\n @Override\n public void done(ParseException e) {\n if (e == null) {\n //Log.i(\"Signup\", \"Successful\");\n showEventListActivity();\n } else {\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n else{\n\n\n ParseUser.logInInBackground(userName.getText().toString(), password.getText().toString(), new LogInCallback() {\n @Override\n public void done(ParseUser user, ParseException e) {\n\n if(user != null){\n //Log.i(\"Signup\", \"Login Successful\");\n showEventListActivity();\n }\n else{\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }\n\n\n\n }", "private void signup(String username, String password, String email, String handle){\n // Create the ParseUser\n final ParseUser user = new ParseUser();\n // Set core properties\n user.setUsername(username);\n user.setPassword(password);\n user.setEmail(email);\n user.put(\"handle\",handle);\n //final File file = new File(\"/desktop/profilepicturedef.png\"); // create a default profile pic\n //final ParseFile parseFile = new ParseFile(file);\n /*parseFile.saveInBackground(new SaveCallback() {\n public void done(ParseException e) {\n // If successful save image as profile picture\n if(null == e) {\n user.put(\"profilepic\", parseFile);\n user.saveInBackground();\n Log.d(\"mainactivity\", \"ProfilePic save requested\");\n }\n }\n });*/\n // Invoke signUpInBackgroundput(\"pro\n user.signUpInBackground(new SignUpCallback() {\n public void done(ParseException e) {\n if (e == null) {\n // Hooray! Let them use the app now. (No error)\n Log.d(\"SignupActivity\", \"Signup successful!\");\n\n // want to go to Home Activity with intent after successful log in\n //final Intent intent = new Intent(SignupActivity.this, TimelineActivity.class);\n final Intent intent = new Intent(SignupActivity.this, MainActivity.class); // this is to use fragments\n startActivity(intent);\n finish(); //so that user can't just press back and log out\n } else {\n // Sign up didn't succeed. Look at the ParseException\n // to figure out what went wrong\n Log.e(\"SignupActivity\", \"Sign up failure.\");\n e.printStackTrace();\n }\n }\n });\n }", "@Override\n public void onClick(View view) {\n final String username = usernameInput.getText().toString();\n final String password = passwordInput.getText().toString();\n final String email = emailInput.getText().toString();\n final String handle = handleInput.getText().toString();\n signup(username, password, email, handle);\n }", "void handle_signup(LinkedList<Object> args) {\n try {\n String user = (String) args.get(1);\n String passwd = (String) args.get(2);\n\n PreparedStatement pst =\n con.prepareStatement(\"SELECT id FROM users WHERE username=?\");\n pst.setString(1, user);\n rsl = pst.executeQuery();\n if(rsl.next()) { //查询到结果表明该用户已经存在\n args.set(1, \"no\");\n args.set(2, \"该用户名已经注册\");\n return;\n }\n pst = con.prepareStatement(\"INSERT INTO users\" +\n \"(username, password) VALUES (?,?)\");\n pst.setString(1, user);\n pst.setString(2, passwd);\n pst.executeUpdate();\n args.set(1, \"yes\");\n System.out.println(\"New user signup:\" + user);\n } catch (Exception e) {\n e.printStackTrace();\n args.set(1, \"no\");\n args.set(2, e.toString());\n }\n }", "private void attemptSignup()\n\t{\n\t\t// Reset errors.\n\t\tmEmailView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t_signupButton.setEnabled(false);\n\n\t\t// Store values at the time of the login attempt.\n\t\tfinal String displayName = mNameView.getText().toString();\n\t\tString email = mEmailView.getText().toString();\n\t\tString password = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password, if the user entered one.\n\t\tif (TextUtils.isEmpty(password))\n\t\t{\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\t\telse if (!isPasswordValid(password))\n\t\t{\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid email address.\n\t\tif (TextUtils.isEmpty(email))\n\t\t{\n\t\t\tmEmailView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n\t\t}\n\t\telse if (!isEmailFormatValid(email))\n\t\t{\n\t\t\tmEmailView.setError(getString(R.string.error_invalid_email));\n\t\t\tfocusView = mEmailView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t//Check for a valid display name\n\t\tif (displayName.isEmpty())\n\t\t{\n\t\t\tmNameView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mNameView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\tif (cancel)\n\t\t{\n\t\t\t// There was an error; don't attempt login and focus the first\n\t\t\t// form field with an error.\n\t\t\tfocusView.requestFocus();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//[START init_progress_dialog]\n\t\t\tfinal ProgressDialog progressDialog = new ProgressDialog(SignupPersonalActivity.this,\n\t\t\t\t\tR.style.AppTheme_Dark_Dialog);\n\t\t\tprogressDialog.setIndeterminate(true);\n\t\t\tprogressDialog.setMessage(\"Creating Account...\");\n\t\t\tprogressDialog.show();\n\t\t\t//[END init_progress_dialog]\n\t\t\tmAuth.createUserWithEmailAndPassword(email, password)\n\t\t\t\t\t.addOnCompleteListener(this, new OnCompleteListener<AuthResult>()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onComplete(@NonNull Task<AuthResult> task)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (task.isSuccessful())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tonSignUpSuccess(displayName);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tonSignUpFailed();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// [START_EXCLUDE]\n\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t\t\t\t// [END_EXCLUDE]\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t}\n\t}", "public SignUp() {\n Logger.log(\"SHOWING SIGN-UP PAGE\");\n\n displaySurnameFields();\n displayNameFields();\n displayNicknameFields();\n displayEmailFields();\n displayPasswordFields();\n displayConfirmPassword();\n displayBirthdayFields();\n displayCountryFields();\n\n displayBackButton();\n displaySubmitButton();\n\n setSceneMusic(\"pallet_town.mp3\");\n }", "public void signUp(String email, String password) {\n\n headers = new HashMap<>();\n //headers.put(\"req_type\", \"signUp\");\n headers.put(\"mail\", email.toString());\n headers.put(\"password\", password.toString());\n headers.put(\"enterpriseName\", \"\");\n headers.put(\"propritor\", \"\");\n headers.put(\"contactNo\", \"0\");\n headers.put(\"profilePhoto\", \"\");\n headers.put(\"retailerId\",\"1675\");\n headers.put(\"latLocation\", \"0.0\");\n headers.put(\"longLocation\", \"0.0\");\n headers.put(\"address\", \"\");\n headers.put(\"city\", \"\");\n headers.put(\"state\", \"\");\n headers.put(\"country\", \"\");\n headers.put(\"membership\", \"0\");\n headers.put(\"subDate\", \"2010-01-01\");\n headers.put(\"openCloseIsManual\", \"0\");\n headers.put(\"shopOpenTime\", \"00:00:00\");\n headers.put(\"shopCloseTime\", \"00:00:00\");\n headers.put(\"shopOpenTime2\", \"00:00:00\");\n headers.put(\"shopCloseTime2\", \"00:00:00\");\n headers.put(\"shopPhoto\", \"\");\n headers.put(\"shopActLicense\", \"\");\n headers.put(\"currentState\", \"0\");\n headers.put(\"Content-Type\", \"application/json\");\n\n try {\n\n jsonObject = new JSONObject();\n //jsonObject.put(\"req_type\", \"signUp\");\n jsonObject.put(\"mail\", email.toString());\n jsonObject.put(\"password\", password.toString());\n jsonObject.put(\"enterpriseName\", \"\");\n jsonObject.put(\"propritor\", \"\");\n jsonObject.put(\"retailerId\",\"1001\");\n jsonObject.put(\"contactNo\", \"0\");\n jsonObject.put(\"profilePhoto\", \"\");\n jsonObject.put(\"latLocation\", \"0.0\");\n jsonObject.put(\"longLocation\", \"0.0\");\n jsonObject.put(\"address\", \"\");\n jsonObject.put(\"city\", \"\");\n jsonObject.put(\"state\", \"\");\n jsonObject.put(\"country\", \"\");\n jsonObject.put(\"membership\", \"0\");\n jsonObject.put(\"subDate\", \"2010-01-01\");\n jsonObject.put(\"openCloseIsManual\", \"0\");\n jsonObject.put(\"shopOpenTime\", \"00:00:00\");\n jsonObject.put(\"shopCloseTime\", \"00:00:00\");\n jsonObject.put(\"shopOpenTime2\", \"00:00:00\");\n jsonObject.put(\"shopCloseTime2\", \"00:00:00\");\n jsonObject.put(\"shopPhoto\", \"\");\n jsonObject.put(\"shopActLicense\", \"\");\n jsonObject.put(\"currentState\", \"0\");\n reqBody = jsonObject.toString();\n\n databaseURL = \"http://ec2-18-216-46-195.us-east-2.compute.amazonaws.com:6868/add_retailer_info_temp\";\n sendRequest(databaseURL);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic String signUp_request() {\n\t\treturn null;\n\t}", "private void createGuestProfile() {\n saveData();\n signupDelegate.enableNextButton(Boolean.FALSE);\n SwingUtil.setCursor(this, java.awt.Cursor.WAIT_CURSOR);\n errorMessageJLabel.setText(getString(\"SigningUp\"));\n errorMessageJLabel.paintImmediately(0, 0, errorMessageJLabel.getWidth(),\n errorMessageJLabel.getHeight());\n try {\n getSignupHelper().createGuestProfile();\n } catch (final OfflineException ox) {\n logger.logError(ox, \"An offline error has occured.\");\n addInputError(getSharedString(\"ErrorOffline\"));\n } catch (final ReservationExpiredException rex) {\n logger.logWarning(rex, \"The username/e-mail reservation has expired.\");\n addInputError(getString(\"ErrorReservationExpired\"));\n } catch (final Throwable t) {\n logger.logFatal(t, \"An unexpected error has occured.\");\n addInputError(getSharedString(\"ErrorUnexpected\"));\n } finally {\n errorMessageJLabel.setText(\" \");\n }\n }", "@Test(dataProvider=\"getData\")\n\t public void signUp(String Firstname, \n String Lastname,\n String Email,\n String JobTitle,\n String Phone,\n String Company) {\n\t\t\tHomePageObjects hp = new HomePageObjects(driver);\n\t\t\thp.FreeTrial().click();\n\t\t\t\n\t\t\t\t\n\t\t \t//*****Maximize the window and wait*****//\n\t\t\tdriver.manage().window().maximize();\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t //*****Actions on Login Page*****//\n\t\t\tLoginObjectPage logpg = new LoginObjectPage(driver);\n\t \tlogpg.Firstname().sendKeys(Firstname);\n\t \tlogpg.Lastname().sendKeys(Lastname);\n\t \tlogpg.Email().sendKeys(Email);\n\t \tlogpg.JobTitle().sendKeys(JobTitle);\n\t \tlogpg.Phone().sendKeys(Phone);\n\t \tlogpg.Company().sendKeys(Company);\n\t \tlogpg.NoofEmployees().click();\n\t \tlogpg.employeedropdown(3);\n\t \tlogpg.checkBox().click();\n\t \tlogpg.Enroll().click();\t \n\t System.out.println(driver.getTitle());\n\t \n\t }", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "void onSignUpEmailRegistered();", "@FXML protected void handleSignUpButtonAction() {\n \tboolean bexit = false;\n \tif(passwordField.getText().equals(passwordField2.getText()))\n \t{\n \t\t\n \t\tString signUpUsername = username.getText();\n \t\tString signUpPassword = passwordField.getText();\n \t\t\n if(username.getText().toString().length() >= 6 && passwordField.getText().toString().length() >= 6)\n {\n\t \t\tUser user = new User(signUpUsername, \"Unknown\", null, \"Unknown\", signUpPassword);\n\t \t\t\n\t \t\ttry {\n\t\t\t\t\tuser = client.createUser(user);\n\t \t\t\n\t \t\t} catch (WebApplicationException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t \t\t\tif (e.getResponse().getStatus() == 409) {\n\t \t\t\t\tactiontarget.setText(\"Sign up error: Username already exists\");\n\t \t\t\t} else {\n\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t} catch (JsonProcessingException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\t\t\t}\n\t \t\t\n\t \t\t// Go back to Login view\n\t \t\t\n\t \t\tLoginVistaNavigator.loadVista(LoginVistaNavigator.LOGIN);\n }\n else\n {\n \tactiontarget.setText(\"username/password \\nlength must be 6 number\");\n }\n \t}\n \telse\n \t{\n \t\tactiontarget.setText(\"password not consistent.\");\n \t}\n }", "public static void signUp(String username, String password, String alternativeEmail, String firstName, String lastName) {\n click(REGISTRATION_LINK);\n type(REG_FLOW_USERNAME_FIELD, username);\n click(REG_FLOW_CHECK_BUTTON);\n// if (!REG_FLOW_USERNAME_FREE_MESSAGE.toString().contains(\"Потребителското име е свободно\")) {\n// System.out.println(\"Try another username - the entered one is already in use\");\n// }\n type(REG_FLOW_PASSWORD_FIELD, password);\n type(REG_FLOW_PASSWORD_REENTER_FIELD, password);\n WebElement phoneCheckbox = Browser.driver.findElement(REG_FLOW_PHONE_CHECKBOX);\n if (phoneCheckbox.isEnabled()) {\n phoneCheckbox.click(); //that's how we disable it\n }\n type(REG_FLOW_ALTERNATIVE_EMAIL_FIELD, alternativeEmail);\n type(REG_FLOW_QUESTION_FIELD, \"To be or not to be?\");\n type(REG_FLOW_ANSWER_FIELD, \"To beeee.\");\n type(REG_FLOW_FNAME_FIELD, firstName);\n type(REG_FLOW_LNAME_FIELD, lastName);\n Browser.driver.switchTo().frame(\"abv-GDPR-frame\").manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n // Manually to tap ACCEPT on the GDPR window\n Browser.driver.switchTo().defaultContent();\n click(REG_FLOW_GENDER_RADIOBUTTON); //to choose male\n click(REG_FLOW_DAY_DROPDOWN);\n click(REG_FLOW_DAY_3); // to choose 3th\n click(REG_FLOW_MONTH_DROPDOWN);\n click(REG_FLOW_MONTH_5); // to choose May\n click(REG_FLOW_YEAR_DROPDOWN);\n click(REG_FLOW_YEAR_1998); // to choose 1998\n\n findElement(REG_FLOW_CAPTCHA_FIELD);\n click(REG_FLOW_CAPTCHA_FIELD);\n // Timeout to enter the CAPTCHA manually\n // EXPLICIT WAIT DA MU TURYA\n click(REG_FLOW_CREATE_BUTTON);\n String successfulRegMessage = Browser.driver.findElement(REG_SUCCESS_MESSAGE).getText().trim();\n assertTrue(successfulRegMessage.contains(\"Успешна регистрация.\"), \"No SUCCESS message\");\n click(LOGIN_TO_YOUR_EMAIL_BUTTON);\n }", "@OnClick(R.id.buttonSignUp)\n void signUp()\n {\n if (from.equals(Keys.FROM_FIND_JOB)) {\n Intent intent = new Intent(this, LoginSignUpSeekerActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n } else {\n Intent intent = new Intent(this, LoginSignUpRecruiterActivity.class);\n intent.putExtra(Keys.CLICKED_EVENT, Keys.CLICKED_EVENT_SIGNUP);\n startActivity(intent);\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n }\n }", "public void signUp() throws ExecutionException, InterruptedException {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mPasswordView.setError(null);\n usernameView.setError(null);\n lname.setError(null);\n mEmailView.setError(null);\n cPassword.setError(null);\n age.setError(null);\n fname.setError(null);\n\n // Store values at the time of the login attempt.\n String username = usernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n String email = mEmailView.getText().toString();\n String lnameS = lname.getText().toString();\n String fnameS = fname.getText().toString();\n String conPass = cPassword.getText().toString();\n String ageS = age.getText().toString();\n String gender = spinner.getSelectedItem().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n //showProgress(true);\n HashMap<String, String> map = new HashMap<>();\n map.put(\"userName\", username);\n map.put(\"pass\", password);\n map.put(\"age\", ageS);\n map.put(\"email\", email);\n map.put(\"fName\", fnameS);\n map.put(\"lName\", lnameS);\n map.put(\"sex\", gender);\n map.put(\"cPass\", conPass);\n\n mAuthTask = new httpUrlConn(map, \"http://hive.sewanee.edu/evansdb0/android1/scripts/hotPartySignUp.php\");\n\n mAuthTask.execute();\n // if php inserted credentials into the database\n Log.i(\"mAuthTask.get is:\", mAuthTask.get());\n try {\n // if the user succesfully logged in\n if(mAuthTask.get().contains(\"true\")) {\n String r = mAuthTask.get().replace(\"true // \",\"\");\n // tell them they are registered\n Toast.makeText(getApplicationContext(),r,Toast.LENGTH_SHORT).show();\n Intent i = new Intent(this,loginActivity2.class);\n // take them back to log in part of this activity\n startActivity(i);\n\n }\n else {\n String[] resp = response.split(\",\");\n for(String i: resp)\n Toast.makeText(getApplicationContext(),i,Toast.LENGTH_SHORT).show();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if(mAuthTask == null || mAuthTask.getStatus().equals(AsyncTask.Status.FINISHED))\n mAuthTask = null;\n }\n }", "@RequestMapping(value = \"/signup\", method = RequestMethod.POST)\n\tpublic String signup(HttpServletRequest request, Model model) {\n\t\tString username = request.getParameter(\"username\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString verify = request.getParameter(\"verify\"); //uses verification from template \"signup.html\"\n\t\t\n\t\t//if passwords don't match, returns an error message\n\t\tif(!password.equals(verify)){\n\t\t\tmodel.addAttribute(\"verify_error\", \"The passwords do not match.\");\n\t\t\tmodel.addAttribute(\"username\", username);\n\t\t\treturn \"signup\";\n\t\t}\n\t\t\n\t\telse {\n\t\t\t\n\t\t//if user name does not follow parameters, returns an error message\n\t\tif(!User.isValidUsername(username)){ \n\t\t\t model.addAttribute(\"username_error\", \"Invalid username.\");\n\t\t\t model.addAttribute(\"username\", username);\n\t\t\t return \"signup\";\n\t\t }\n\t\t\n\t\t //if password doesn't fall within the prescribed parameters, returns an error message \n\t\t else if(!User.isValidPassword(password)){ \n\t\t\t model.addAttribute(\"password_error\",\"Invalid password.\");\n\t\t\t model.addAttribute(\"username\", username);\n\t\t\t return \"signup\";\n\t\t } else { //if everything works as it should, it creates a new user\n\t\t\n\t\tUser newUser = new User(username, password);\n\t\tuserDao.save(newUser);\n\t\tHttpSession thisSession = request.getSession();\n\t\tthis.setUserInSession(thisSession, newUser);\n\t\treturn \"redirect:librarian/newentry\";\n\t\t}\n\t}\n\t}", "@Override\n public void onSignUpBtnClick() {\n }", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "public void signUp(View view) {\n final EditText nameField = (EditText) findViewById(R.id.name);\n final EditText emailField = (EditText) findViewById(R.id.email);\n final EditText phoneField = (EditText) findViewById(R.id.phoneNumber);\n final EditText passwordField = (EditText) findViewById(R.id.signUpPassword);\n\n final String name = nameField.getText().toString();\n final String email = emailField.getText().toString();\n final String phone = phoneField.getText().toString();\n final String password = passwordField.getText().toString();\n\n // Check to make sure a username and password were entered\n if (name.length() == 0 || password.length() == 0 || email.length () == 0 || phone.length() == 0) {\n Toast.makeText(getApplicationContext(), \"Invalid field\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Create a new Parse User object\n ParseUser user = new ParseUser();\n //ParseFile file = new ParseFile(\"picture.png\", bytearray);\n //file.saveInBackground();\n\n\n // Set the user's username and password\n user.setEmail(email);\n user.put(\"phone\", phone);\n user.put(\"name\", name);\n //user.put(\"File\", file);\n user.setPassword(password);\n user.setUsername(email);\n\n user.signUpInBackground(new SignUpCallback() {\n public void done(ParseException e) {\n if (e == null) {\n Toast.makeText(getApplicationContext(), \"Sign Up Success\",\n Toast.LENGTH_LONG).show();\n returnToLoginActivity();\n } else {\n Log.e(\"Sign up failed\", e.getMessage());\n Toast.makeText(getApplicationContext(), \"Sign Up Failed\",\n Toast.LENGTH_LONG).show();\n\n }\n }\n });\n }", "@Override\n public void onValidationSucceeded() {\n String email = mEmailField.getText().toString();\n String firstName = mFirstNameField.getText().toString();\n String lastName = mLastNameField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n mSignUpInterface.onSignup(email, firstName, lastName, password);\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n userWAPFirebase.create(newUser, firebaseAuth.getCurrentUser().getUid()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"User \" + newUser.getUsername() + \" has been successfully created\");\n Toast.makeText(SignUpActivity.this, \"Sign up successful!\", Toast.LENGTH_SHORT).show();\n\n //Go back to Login Activity\n Intent loginIntent = new Intent(SignUpActivity.this, LoginActivity.class);\n loginIntent.putExtra(PASSWORD_KEY, etPasswordSignup.getText().toString());\n loginIntent.putExtra(EMAIL_KEY, newUser.getEmail());\n startActivity(loginIntent);\n }\n });\n }", "private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }", "@Override\n public void onClick(View v) {\n\n\n String domain = \"@iiitkalyani.ac.in\";\n\n\n // check the email provided, to match \"@iiitkalyani.ac.in\" domain\n emailId = userEmail.getText().toString().trim();\n\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(emailId);\n stringBuilder = stringBuilder.reverse();\n String domainPart = stringBuilder.substring(0,min(domain.length(),emailId.length()));\n\n stringBuilder = new StringBuilder();\n stringBuilder.append(domainPart);\n stringBuilder = stringBuilder.reverse();\n\n\n\n final String name_of_user = userName.getText().toString().trim();\n if(name_of_user.length() < 3 || name_of_user.length() > 15){\n userName.setError(\"4 - 15 characters only!\");\n userName.requestFocus();\n return;\n }\n\n if(emailId.length() == 0){\n userEmail.setError(\"Field can't be empty\");\n userEmail.requestFocus();\n return;\n }\n\n if(!domain.equals(stringBuilder.toString())){\n userEmail.setError(\"use '@iiitkalyani.ac.in' domain\");\n userEmail.requestFocus();\n return;\n }\n\n // check for the pin\n userPin = userPinInput.getText().toString().trim();\n if(userPin.length() ==0 ){\n userPinInput.setError(\"Can't be empty!\");\n userPinInput.requestFocus();\n return;\n }\n\n\n // email and name of the user is checked for no error\n // now verify the credentials\n\n // show an progress dialog\n final ProgressDialog pd = new ProgressDialog(LoginActivity.this);\n pd.setMessage(\"Creating Account\");\n pd.show();\n\n\n mAuth.createUserWithEmailAndPassword(emailId,userPin)\n .addOnCompleteListener(LoginActivity.this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n\n // to verify the user, send an email\n final FirebaseUser firebaseUser = FirebaseAuth\n .getInstance().getCurrentUser();\n\n // update the name of the user, before sending verification email\n UserProfileChangeRequest userProfileChangeRequest = new UserProfileChangeRequest\n .Builder().setDisplayName(name_of_user).build();\n firebaseUser.updateProfile(userProfileChangeRequest).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n // finally send an verification email\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n // make the progressBar invisible\n pd.cancel();\n\n // store the user name\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(\"isNotVerified\",true);\n editor.putString(\"userName\",name_of_user);\n editor.putString(\"userEmail\",emailId);\n editor.putString(\"password\",userPin);\n editor.apply();\n\n // call an intent to the user verification activity\n startActivity(new Intent(LoginActivity.this,\n UserVerificationActivity.class));\n // finish this activity, so that user can't return\n LoginActivity.this.finish();\n }\n });\n\n }\n });\n\n\n\n }\n else{\n\n pd.cancel();\n\n // show collision error text if email id entered by user is already registered!\n try{\n throw task.getException();\n }\n catch(FirebaseAuthUserCollisionException e){\n emailCollisionError();\n }\n catch(FirebaseAuthWeakPasswordException e){\n userPinInput.setError(\"Too weak password!\");\n userPinInput.requestFocus();\n }\n catch(Exception e){\n Toast.makeText(LoginActivity.this,\n \"Something unexpected happened! Try again later.\", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n });\n }", "public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }", "public void SignUp2(View view){\n\n mFirebaseAuth.createUserWithEmailAndPassword(EditEmail.getText().toString(),EditPass.getText().toString())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n saveUser(EditFirstName.getText().toString(),EditLastName.getText().toString(),EditEmail.getText().toString(),SelectSpinner.getSelectedItem().toString());\n mUserDatabaseReference.push().setValue(mClassUser);\n EditFirstName.setText(\"\");\n EditLastName.setText(\"\");\n EditEmail.setText(\"\");\n EditPass.setText(\"\");\n\n if (!task.isSuccessful()) {\n// Toast.makeText(ActivitySignup.this, \"failed to sign up\",\n// Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n\n }", "private final static void onRegister(TextField username, TextField email, PasswordField password, PasswordField passwordAgain)\n\t{\n\t\t// TODO no password = passwordAgain check\n\t\t// TODO check if username exists\n\t\t// TODO check if email exists\n\n\t\tint id = ProfileManipulation.getHighestId(\"Profile\", true);\n\t\tProfileManipulation.registerUser(id, username.getText(), email.getText(),\n\t\t\t\tpassword.getText());\n\t\tPartylize.setUsername(username.getText());\n\t\tPartylize.showMainScene();\n\t}", "private void submitNewUser() {\n\t\tboolean validationFlag = true;\n\t\tArrayList<HashMap<String, String>> signUpFields = new ArrayList<HashMap<String, String>>();\n\t\tint size = lnr_form.getChildCount();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tLinearLayout v = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tHashMap<String, String> field = (HashMap<String, String>) v.getTag();\n\n\t\t\tIjoomerEditText edtValue = null;\n\t\t\tSpinner spnrValue = null;\n\n\t\t\tif (field != null) {\n\t\t\t\tif (field.get(TYPE).equals(TEXT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEdit)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditArea)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditMap)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(\"type\").equals(LABEL)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrLabel)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\n\t\t\t\t\tif (edtValue.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\tif (!IjoomerUtilities.birthdateValidator(edtValue.getText().toString().trim())) {\n\t\t\t\t\t\t\tedtValue.setFocusable(true);\n\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_invalid_birth_date));\n\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\t\t\t\tif (field.get(TYPE).equals(TIME)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\n\t\t\t\tif (field.get(TYPE).equals(SELECT)) {\n\t\t\t\t\tspnrValue = (Spinner) ((LinearLayout) v.findViewById(R.id.lnrSpin)).findViewById(R.id.txtValue);\n\t\t\t\t\tfield.put(VALUE, spnrValue.getSelectedItem().toString());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Retype Password\")) {\n\t\t\t\t\tint len = lnr_form.getChildCount();\n\t\t\t\t\tfor (int j = 0; j < len; j++) {\n\t\t\t\t\t\tLinearLayout view = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) view.getTag();\n\t\t\t\t\t\tif (row.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Password\")) {\n\t\t\t\t\t\t\tString password = ((IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue)).getText().toString();\n\t\t\t\t\t\t\tif (password.equals(edtValue.getText().toString())) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_password_not_match));\n\t\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (edtValue != null && edtValue.getText().toString().trim().length() <= 0 && (field.get(REQUIRED).equals(\"1\"))) {\n\t\t\t\t\tedtValue.setError(getString(R.string.validation_value_required));\n\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.put(VALUE, edtValue.getText().toString().trim());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validationFlag) {\n\t\t\tfinal SeekBar proSeekBar = IjoomerUtilities.getLoadingDialog(getString(R.string.dialog_loading_register_newuser));\n\t\t\tnew IjoomerRegistration(this).submitNewUser(signUpFields, new WebCallListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgressUpdate(int progressCount) {\n\t\t\t\t\tproSeekBar.setProgress(progressCount);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n\t\t\t\t\tif (responseCode == 200) {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile), getString(R.string.registration_successfully), getString(R.string.ok),\n\t\t\t\t\t\t\t\tR.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\"clearStackActivity\");\n\t\t\t\t\t\t\t\t\t\tintent.setType(\"text/plain\");\n\t\t\t\t\t\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\t\t\t\t\t\tIjoomerWebService.cookies = null;\n\n\t\t\t\t\t\t\t\t\t\tloadNew(IjoomerLoginActivity.class, IPropertyRegistrationActivity.this, true);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile),\n\t\t\t\t\t\t\t\tgetString(getResources().getIdentifier(\"code\" + responseCode, \"string\", getPackageName())), getString(R.string.ok), R.layout.ijoomer_ok_dialog,\n\t\t\t\t\t\t\t\tnew CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public static void signup() throws Exception{\n\t\trender();\n\t}", "private void register() {\n RegisterModel registerModel = new RegisterModel(edtEmail.getText().toString(),\n edtPaswd.getText().toString(),\n edtDisplayName.getText().toString());\n\n Response.Listener<RegisterApiResponse> responseListener = new Response.Listener<RegisterApiResponse>() {\n @Override\n public void onResponse(RegisterApiResponse response) {\n if (response.isSuccess()) login();\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String errorMsg = \"An error occurred\";\n String err = (error.getMessage() == null) ? errorMsg : error.getMessage();\n Log.d(TAG, err);\n error.printStackTrace();\n\n if (err.matches(AppConstants.CONNECTION_ERROR) || err.matches(AppConstants.TIMEOUT_ERROR)) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n } else if (err.matches(\".*Duplicate entry .* for key 'name_UNIQUE'.*\")) {\n edtDisplayName.setError(\"username taken\");\n edtDisplayName.requestFocus();\n } else if (err.matches(\".*The email has already been taken.*\")) {\n edtEmail.setError(\"email taken\");\n edtEmail.requestFocus();\n } else {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n }\n };\n\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests registerRequest =\n RegistrationRequests.register(this, registerModel, responseListener, errorListener);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(registerRequest);\n progressDialog.show();\n }", "private void signup() {\n\t\tSignupFragment newFragment = new SignupFragment();\t\t\t\t\t\n\t\t\n\t\t// if the username doesn't exist, load the signup fragment\n\t\tFragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();\n\n\t\t// Replace whatever is in the fragment_container view with this fragment,\n\t\t// and add the transaction to the back stack so the user can navigate back\n\t\ttransaction.replace(R.id.fragment_container, newFragment);\n\t\ttransaction.addToBackStack(null);\n\n\t\t// Commit the transaction\n\t\ttransaction.commit();\n\t}", "private void attemptSignUp() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordViewOne.setError(null);\n mPasswordViewTwo.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n final String password = mPasswordViewOne.getText().toString();\n final String passwordTwo = mPasswordViewTwo.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPasswordViewOne.setError(getString(R.string.error_field_required));\n focusView = mPasswordViewOne;\n cancel = true;\n } else if (!isPasswordValid(password)) {\n mPasswordViewOne.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordViewOne;\n cancel = true;\n }\n\n // Check for matching password\n if (!password.equals(passwordTwo)) {\n mPasswordViewOne.setError(\"Passwords do not match\");\n mPasswordViewTwo.setError(\"Passwords do not match\");\n focusView = mPasswordViewOne;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Log.d(\"FirebaseSignUp\", \"createUserWithEmail:Success\");\n FirebaseUser user = mAuth.getCurrentUser();\n String uid = user == null ? \"null\" : user.getUid();\n\n // TODO: if successful, check if User should be an admin and add\n // them to list of admins in Firebase database\n if (mSpinner.getSelectedItem().equals(AccountType.ADMIN)) {\n mDatabase.child(\"admins\").child(uid)\n .setValue(email.split(\"@\")[0]);\n }\n\n Intent i = new Intent(getApplicationContext(), App.class);\n finish();\n startActivity(i);\n } else {\n // Probably means the email was taken\n mEmailView.setError(getString(R.string.error_email_already_registered));\n mEmailView.requestFocus();\n showProgress(false);\n }\n }\n });\n }\n }", "private void CreateAccount() {\n JSONObject finalJS = new JSONObject();\n try {\n\n finalJS.put(\"password\", _password.getText().toString());\n finalJS.put(\"username\", _email.getText().toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.e(\"JSONErrorin serializing\", e.toString());\n }\n Log.e(\"JSON serializing\", finalJS.toString());\n String tag_string_req = \"req_Categories\";\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(\n Request.Method.POST, MyShortcuts.baseURL() + \"twiga/auth/signup\", finalJS,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"Response from server is\", response.toString());\n try {\n String status = response.getString(\"success\");\n if (status.equals(\"true\")) {\n Toast.makeText(getBaseContext(), \"You have successfully registered!\", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(getBaseContext(), MainActivity.class);\n\n startActivity(intent);\n } else {\n MyShortcuts.showToast(response.getString(\"message\"), getBaseContext());\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n Toast.makeText(getBaseContext(), \"Server errror, Try again later\", Toast.LENGTH_LONG).show();\n }\n }\n\n\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(\"VolleyError\", \"Error: \" + error.getMessage());\n// hideProgressDialog()\n MyShortcuts.showToast(\"Check you internet connection or try again later\", getBaseContext());\n Log.d(\"error volley\", error.toString());\n }\n }) {\n\n /**\n * Passing some request headers\n * */\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n setRetryPolicy(new DefaultRetryPolicy(5 * DefaultRetryPolicy.DEFAULT_TIMEOUT_MS, 0, 0));\n setRetryPolicy(new DefaultRetryPolicy(0, 0, 0));\n headers = MyShortcuts.AunthenticationHeaders(getBaseContext());\n return headers;\n }\n };\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(jsonObjReq);\n Log.e(\"request is\", jsonObjReq.toString());\n }", "private void registration_url(final String name, final String phone, final String email,\n final String password , final String device_id,\n final String fcm_token , final String device_type) {\n String tag_string_req = \"req_signup\";\n pd.show();\n\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n WebserviceUrl.signup, new Response.Listener<String>() {\n\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"url_hit: \"+ WebserviceUrl.login);\n Log.d(TAG, \"Response: \" + response);\n\n Gson gson = new Gson();\n\n try {\n\n\n JsonObject jobj = gson.fromJson(response, JsonObject.class);\n //JSONObject jObject = new JSONObject(String.valueOf(content));\n String status = jobj.get(\"status\").toString().replaceAll(\"\\\"\", \"\");\n String message = jobj.get(\"message\").toString().replaceAll(\"\\\"\", \"\");\n\n\n Log.d(\"TAG\", \"status :\\t\" + status);\n Log.d(\"TAG\", \"message :\\t\" + message);\n if(status.equals(\"1\")) {\n\n JsonObject jsonObject = jobj.getAsJsonObject(\"info\");\n\n String uid = jsonObject.get(\"uid\").toString().replaceAll(\"\\\"\", \"\");\n String name = jsonObject.get(\"name\").toString().replaceAll(\"\\\"\", \"\");\n String mobile = jsonObject.get(\"mobile\").toString().replaceAll(\"\\\"\", \"\");\n String email = jsonObject.get(\"email\").toString().replaceAll(\"\\\"\", \"\");\n //String name = jsonObject.get(\"name\").toString().replaceAll(\"\\\"\", \"\");\n\n\n globalClass.setId(uid);\n globalClass.setName(name);\n globalClass.setPhone_number(mobile);\n globalClass.setEmail(email);\n globalClass.setLogin_status(true);\n\n prefrence.savePrefrence();\n\n Intent intent = new Intent(Signup.this, DrawerActivity.class);\n startActivity(intent);\n finish();\n\n pd.dismiss();\n }else{\n Toasty.error(Signup.this, message, Toast.LENGTH_LONG, true).show();\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n\n @Override\n\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"Sign_up Error: \" + error.getMessage());\n Toast.makeText(Signup.this, error.getMessage(), Toast.LENGTH_LONG).show();\n // hideDialog();\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to login url\n Map<String, String> params = new HashMap<String, String>();\n\n params.put(\"name\", name);\n params.put(\"mobile\",phone);\n params.put(\"email\", email);\n params.put(\"password\", password);\n params.put(\"device_id\", device_id);\n params.put(\"fcm_reg_token\", fcm_token);\n params.put(\"device_type\", device_type);\n\n Log.d(TAG, \"getParams: \"+params);\n\n return params;\n }\n\n };\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n strReq.setRetryPolicy(new DefaultRetryPolicy(20 * 1000, 10, 1.0f));\n\n\n }", "private void doRegister(){\n Map<String, String> mParams = new HashMap<>();\n mParams.put(\"account\", etPhone.getText().toString());\n mParams.put(\"password\", etPwd.getText().toString());\n mParams.put(\"code\", etValid.getText().toString());\n\n x.http().post(HttpUtils.getRequestParams(\"/teacher/v1/register\", mParams),\n\n new Callback.CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n\n CustomProgress.hideDialog();\n LogUtil.d(\"\"+result);\n Response response = CommonUtil.checkResponse(result);\n if (response.isStatus()) {\n SharedPreferences shareAutoLogin = MyApplication.getInstance().getShareAutoLogin();\n SharedPreferences.Editor editor = shareAutoLogin.edit();\n editor.putBoolean(MyApplication.getInstance().AUTOLOGIN, true);\n editor.commit();\n MyApplication.getInstance().setShareApp(etPhone.getText().toString(), etPwd.getText().toString());\n User user = User.getUserFromJsonObj(response.getData().optJSONObject(\"data\"));\n User.setCurrentUser(user);\n MobclickAgent.onProfileSignIn(user.getNickName());\n\n // 登录环信\n if (!StringUtils.isEmpty(user.hxId) && !StringUtils.isEmpty(user.hxPwd))\n AppUtils.loginEmmobAndSaveInfo(user);\n\n // 极光推送设置别名\n JPushInterface.setAlias(RegisterActivity.this, user.getId() + \"\", new TagAliasCallback() {\n @Override\n public void gotResult(int i, String s, Set<String> set) {\n if (i == 0) {\n LogUtil.i(\"极光推送别名设置成功,别名:\" + s);\n }\n }\n });\n\n socketLogin(user.getToken());\n\n Intent intent = new Intent(RegisterActivity.this, CodeActivity.class);\n startActivity(intent);\n finish();\n } else {\n Toast.makeText(x.app(), response.getData().optString(\"message\"), Toast.LENGTH_SHORT).show();\n\n }\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n\n CustomProgress.hideDialog();\n\n if (ex instanceof HttpException) { // 网络错误\n HttpException httpEx = (HttpException) ex;\n int responseCode = httpEx.getCode();\n String responseMsg = httpEx.getMessage();\n String errorResult = httpEx.getResult();\n LogUtil.d(responseCode + \":\" + responseMsg);\n Toast.makeText(x.app(), x.app().getResources().getString(R.string.net_error), Toast.LENGTH_SHORT).show();\n } else { // 其他错误\n // ...\n }\n //Toast.makeText(x.app(), ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n Toast.makeText(x.app(), \"cancelled\", Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFinished() {\n\n }\n });\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_sign_up);\n mSignUpPresenter = new SignUpPresenter(this);\n\n // text layout variables\n firstNameLayout = findViewById(R.id.activity_sign_up_etl_first_name);\n lastNameLayout = findViewById(R.id.activity_sign_up_etl_last_name);\n emailLayout = findViewById(R.id.activity_sign_up_etl_email);\n passwordLayout = findViewById(R.id.activity_sign_up_etl_password);\n\n // Assigning front end ids to variables\n firstNameET = findViewById(R.id.activity_sign_up_et_first_name);\n lastNameET = findViewById(R.id.activity_sign_up_et_last_name);\n emailET = findViewById(R.id.activity_sign_up_et_email);\n passwordET = findViewById(R.id.activity_sign_up_et_password);\n reEnterPasswordET = findViewById(R.id.activity_sign_up_et_password_re_enter);\n registerBTN = findViewById(R.id.activity_sign_up_btn_sign_up);\n\n // Setting the onclick method for the register button\n registerBTN.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Getting the text from the edit texts\n firstNameText = capitalizeFirstLetter(firstNameET.getText().toString());\n lastNameText = capitalizeFirstLetter(lastNameET.getText().toString());\n emailText = (emailET.getText().toString()).toLowerCase();\n passwordText = passwordET.getText().toString();\n reEnterPasswordText = reEnterPasswordET.getText().toString();\n\n // Using the user-inputted information to register the user via this method\n registerUser(firstNameText, lastNameText, emailText, passwordText, reEnterPasswordText);\n }\n });\n\n // set the system status bar color\n getWindow().setStatusBarColor(ContextCompat.getColor(getApplicationContext(), R.color.primary_dark));\n\n // text listeners for the edit text fields so that the error message will disappear when the user starts typing into the text field again\n firstNameET.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n firstNameLayout.setError(null); // clearing the error message for the first name field if there is one\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n lastNameET.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n lastNameLayout.setError(null); // clearing the error message for the last name field if there is one\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n emailET.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n emailLayout.setError(null); // clearing the error message for the email field if there is one\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n passwordET.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n passwordLayout.setError(null); // clearing the error message for the password field if there is one\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "@Override\n public void onClick(View view) {\n EditText user = (EditText) findViewById(R.id.editTextName);\n EditText em = (EditText) findViewById(R.id.editTextEmail);\n EditText first = (EditText) findViewById(R.id.editTextFirstName);\n EditText last = (EditText) findViewById(R.id.editTextLastName);\n EditText pass = (EditText) findViewById(R.id.editTextPassword);\n EditText confirmpass = (EditText) findViewById(R.id.editTextConfirmPassword);\n\n // convert everything to string\n String username = user.getText().toString();\n String email = em.getText().toString();\n String firstname = first.getText().toString();\n String lastname = last.getText().toString();\n String password = pass.getText().toString();\n String confirmpassword = confirmpass.getText().toString();\n\n boolean check = checkfields(username,email,firstname,lastname,password,confirmpassword);\n\n if (check) {\n Log.i(\"success\", \"all info is correct\");\n\n createPost(username,firstname,lastname,email,password,confirmpassword);\n\n }\n else{\n Log.i(\"Fail\", \"something is not right\");\n }\n\n //Log.i(\"string\", \"name: \" +username);\n //Log.i(\"string generate\", \"email: \" +email);\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_signup);\r\n\r\n\t\t// ENETER BUTTON : Match both the password fields\r\n\t\tButton enterButton = (Button) findViewById(R.id.SignUp_ButtonEnter);\r\n\t\tenterButton.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tfinal EditText emailField = (EditText) findViewById(R.id.SignUp_EditTextEmail);\r\n\t\t\t\tString mail_ID = emailField.getText().toString();\r\n\t\t\t\t\r\n\t\t\t\tif (mail_ID.length() == 0) {\r\n\r\n\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(\r\n\t\t\t\t\t\t\tSignUpActivity.this);\r\n\t\t\t\t\talertDialog.setTitle(\" User Alert !\");\r\n\t\t\t\t\talertDialog\r\n\t\t\t\t\t\t\t.setMessage(\"Please Enter Valid Username!!!\");\r\n\t\t\t\t\talertDialog.setPositiveButton(\"OK\",\r\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\tint id) {\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\talertDialog.show();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (scm.isConnected()) {\r\n\t\t\t\t\t((Button) findViewById(R.id.SignUp_ButtonEnter)).setEnabled(false);\r\n\t\t\t\t\tscm.CreateNewUser(mail_ID);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(\r\n\t\t\t\t\t\t\tSignUpActivity.this);\r\n\t\t\t\t\talertDialog.setTitle(\" User Alert !\");\r\n\t\t\t\t\talertDialog\r\n\t\t\t\t\t\t\t.setMessage(\"Sorry, Not connect to server yet.\");\r\n\t\t\t\t\talertDialog.setPositiveButton(\"OK\",\r\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\tint id) {\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\talertDialog.show();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// CANCEL BUTTON : Finish the Current Activity\r\n\t\tButton cancelButton = (Button) findViewById(R.id.SignUp_ButtonCancel);\r\n\t\tcancelButton.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent();\r\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// TODO Auto-generated method stub\r\n\t}", "private void newUserRegistration(String phoneNumber)\n {\n if(internetIsOn.isOnline())\n {\n String memberType = \"nope\";\n String taka = \"0\";\n String groupId = \"Null\";\n\n Map<String,String> map = new HashMap<>();\n map.put(\"userName\",userName);\n map.put(\"name\",name);\n map.put(\"email\",email);\n map.put(\"phone\",phoneNumber);\n map.put(\"address\",address);\n map.put(\"taka\",taka);\n map.put(\"memberType\",memberType);\n map.put(\"password\",password);\n map.put(\"groupId\",groupId);\n map.put(\"date\",someMethod.getDateWithTime());\n map.put(\"favouriteWord\",favouriteWord);\n PostData postData = new PostData(RegisterUser.this,taskInterface);\n postData.InsertData(getResources().getString(R.string.insertMemInfo),map);\n\n /*try {\n String memberType = \"nope\";\n String taka = \"0\";\n String groupId = \"Null\";\n\n POST_DATA = URLEncoder.encode(\"name\",\"UTF-8\")+\"=\"+URLEncoder.encode(name,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"userName\",\"UTF-8\")+\"=\"+URLEncoder.encode(userName,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"email\",\"UTF-8\")+\"=\"+URLEncoder.encode(email,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"phone\",\"UTF-8\")+\"=\"+URLEncoder.encode(phoneNumber,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"address\",\"UTF-8\")+\"=\"+URLEncoder.encode(address,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"taka\",\"UTF-8\")+\"=\"+URLEncoder.encode(taka,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"memberType\",\"UTF-8\")+\"=\"+URLEncoder.encode(memberType,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"password\",\"UTF-8\")+\"=\"+URLEncoder.encode(password,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"groupId\",\"UTF-8\")+\"=\"+URLEncoder.encode(groupId,\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"date\",\"UTF-8\")+\"=\"+URLEncoder.encode(someMethod.getDateWithTime(),\"UTF-8\")+\"&\"\n +URLEncoder.encode(\"favouriteWord\",\"UTF-8\")+\"=\"+URLEncoder.encode(favouriteWord,\"UTF-8\");\n\n informationCheck = new DatabaseBackgroundTask(this);\n informationCheck.setOnResultListener(taskInterface);\n informationCheck.execute(getResources().getString(R.string.insertMemInfo),POST_DATA);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }*/\n }else dialogClass.noInternetConnection();\n }", "@Override\n protected void onSubmit()\n {\n final ApplicationUser appUser = (ApplicationUser) getModelObject();\n UserRegistration userRegistration = new UserRegistration(appUser.getBusinessUser());\n paramUserId = userRegistration.getUserId();\n //paramDateTime = userRegistration.getRequestTimeAsString();\n //paramToken = userRegistration.getMailToken();\n\n // Note: Dccd does not use a validation Page!\n\n\t\t\t// Construct the url for the activation of member and/or organisation\n\t\t\tMap<String, String> parameterMap = new HashMap<String, String>();\n\t\t\tparameterMap.put(\"userId\", paramUserId);\n\t\t\tparameterMap.put(\"inEditMode\", \"0\"); // activation button is placed on non-edit page!\n\t\t\tparameterMap.put(\"enableModeSwitch\", \"1\");\n\t\t\tfinal String activationUrl = createPageURL(MemberPage.class, parameterMap);\n\t\t\tuserRegistration.setActivationUrl(activationUrl);\n\t\t\tlogger.debug(\"activationUrl: \" + activationUrl);\n\n if (isOrganisationEdit())\n {\n \tlogger.debug(\"new Organisation must now be registered\");\n \tassert(null != newOrganisation);\n \t// Also register the new organisation\n \tlogger.debug(\"New organistation: \" + newOrganisation.getId());\n \tOrganisationRegistration organisationRegistration =\n \t\tnew OrganisationRegistration(newOrganisation);\n\n \tuserRegistration.setOrganisation(newOrganisation);\n \tDccdUserService.getService().handleRegistrationRequest(userRegistration, organisationRegistration);\n\n \tif (!organisationRegistration.isCompleted())\n \t{\n \t\t// something went wrong!\n \tlogger.debug(\"Could not complete organisation registration\");\n for (String stateKey : organisationRegistration.getAccumulatedStateKeys())\n {\n //error(getString(stateKey));\n \t// allow for substitution\n error(getString(stateKey, new Model(organisationRegistration)));\n }\n \t}\n }\n else\n {\n \tuserRegistration.setOrganisation(selectedOrganisation);\n \tuserRegistration = DccdUserService.getService().handleRegistrationRequest(userRegistration);\n }\n\n if (userRegistration.isCompleted())\n {\n disableForm(new String[] {});\n info(getString(\"missionAccomplished\", new Model(appUser)));\n //setResponsePage(new InfoPage(getString(\"registrationpage.header\")));\n // use specific page for the confirmation\n setResponsePage(new RegistrationConfirmPage(appUser));\n }\n else\n {\n \tlogger.debug(\"Could not complete user registration\");\n for (String stateKey : userRegistration.getAccumulatedStateKeys())\n {\n error(getString(stateKey));\n }\n }\n logger.debug(\"End onSubmit: \" + userRegistration.toString());\n }", "private void RegisterUser(final User user) {\n AlertDialog.Builder builder;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n builder = new AlertDialog.Builder(this, android.R.style.Theme_Material_Dialog_Alert);\n } else {\n builder = new AlertDialog.Builder(this);\n }\n\n View view = LayoutInflater.from(MainActivity.this).inflate(R.layout.alert_dialog_input,null);\n\n builder.setTitle(\"Faltan informacion requerida\")\n .setMessage(\"Completa los siguentes campos\")\n .setView(view);\n\n final EditText editTxtEmailDialog = view.findViewById(R.id.editTxtEmailAlertDialog);\n final EditText editTxtNicknameDialog = view.findViewById(R.id.editTxtNicknameAlertDialog);\n final EditText editTxtPasswordDialog = view.findViewById(R.id.editTxtPasswordAlertDialog);\n\n if(user.getEmail() != null)\n editTxtEmailDialog.setVisibility(View.GONE);\n\n builder.setPositiveButton(\"Registar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n String email = user.getEmail() != null ? user.getEmail() : editTxtEmailDialog.getText().toString();\n String nickname = editTxtNicknameDialog.getText().toString();\n String password = editTxtPasswordDialog.getText().toString();\n if(!isValidateRegisterProvider(email,nickname,password))\n return;\n user.setEmail(email);\n user.setNickname(nickname);\n user.setPassword(password);\n\n\n\n //User aux = new User(user.getName(), user.getLastName(),nickname,email,password,\"\", user.getProvider());\n if(!Networking.isNetworkAvailable(MainActivity.this)) {\n Toast.makeText(MainActivity.this,\"No hay internet\",Toast.LENGTH_SHORT).show();\n return;\n }\n new Networking(MainActivity.this).execute(Networking.SIGNUP_PROVIDER, user,new NetCallback() {\n @Override\n public void onWorkFinish(Object... objects) {\n\n final User user_temp = (User) objects[0];\n if(user_temp.getId() != -1) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(MainActivity.this,\"Bienvenido\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(MainActivity.this, InitActivity.class);\n Grua grua = new Grua(\"\",\"\", \"\");\n grua.setId(-1);\n intent.putExtra(Register.JSON_USER, user_temp.toJSON());\n intent.putExtra(Register.JSON_GRUA,grua.toJSON());\n SharedUtil.setUserNickname(MainActivity.this,user_temp.getNickname());\n SharedUtil.setUserPassword(MainActivity.this, user_temp.getPassword());\n SharedUtil.setUserProvider(MainActivity.this, user_temp.getProvider());\n startActivity(intent);\n }\n });\n }\n\n }\n\n @Override\n public void onMessageThreadMain(Object data) {\n final String message = (String) data;\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();\n }\n });\n\n }\n });\n\n }\n }).setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //... Remover instancia iniciar con ...\n Toast.makeText(MainActivity.this,\"Su registro se ha cancelado\", Toast.LENGTH_SHORT).show();\n }\n })\n .setIcon(android.R.drawable.ic_dialog_info)\n .show();\n\n }", "public boolean SignUp(String username,String password,String realname) throws IOException, JSONException {\n OkHttpClient client = new OkHttpClient();\n RequestBody body = new FormBody.Builder()\n .add(\"user_id\",\"\")\n .add(\"user_code\", username)\n .add(\"user_pwd\", password)\n .add(\"user_name\", realname)\n .add(\"user_birthday\",\"\").build();\n String PcPath = \"http://www.mypc.com:8080\";\n String url=PcPath+\"/permission/user/useradd\";\n Request request = new Request.Builder().url(url).post(body).addHeader(\"Cookie\",this.jid).build();\n final Call call = client.newCall(request);\n Response response = call.execute();\n String responseData = response.body().string();\n JSONObject jsonObject = new JSONObject(responseData);\n int id = jsonObject.getInt(\"status\");\n if (id == 200) {\n return true;\n }\n return false;\n }", "public Result showSignUp() {\n return ok(signupView.render(data().build(), signUpForm));\n }", "public void signUp(View view) {\n InputMethodManager imm = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n boolean emailValid = isValidEmail(edtEmail);\n boolean pwdValid = isValidPassword(edtPaswd);\n boolean unameValid = isValidUsername(edtDisplayName);\n\n if (!unameValid) {\n edtDisplayName.requestFocus();\n } else if (!emailValid) {\n edtEmail.requestFocus();\n } else if (!pwdValid) {\n edtPaswd.requestFocus();\n }\n\n if (emailValid && pwdValid) {\n register();\n }\n }", "@Override\n public void onClick(View view) {\n newUser.setEmail(email.getText().toString());\n newUser.setUsername(email.getText().toString());\n newUser.setPassword(\"password\");\n\n newUser.signUpInBackground(new SignUpCallback() {\n @Override\n public void done(ParseException e) {\n gotItId = ParseUser.getCurrentUser().getObjectId(); //get the latest user id\n\n String url; //url ending\n FormBody body;\n\n //metadata JSON object used to send additional data to Stripe\n JSONObject metadata = new JSONObject();\n try {\n metadata.put(\"gotit_id\", gotItId);\n } catch (JSONException ex) {\n ex.printStackTrace();\n }\n\n //test if creating user with or without a card\n if(isChecked && card != null) {\n card = cardInputWidget.getCard(); //get a Card object from the widget used to enter card details\n\n //add the variables need to send it to the server to the body\n body = new FormBody.Builder()\n .add(\"name\", name.getText().toString())\n .add(\"metadata\", metadata.toString())\n .add(\"email\", email.getText().toString())\n .add(\"phone\", phone.getText().toString())\n .add(\"line1\", line1.getText().toString())\n .add(\"line2\", line2.getText().toString())\n .add(\"city\", city.getText().toString())\n .add(\"state\", state.getText().toString())\n .add(\"postal_code\", postal.getText().toString())\n .add(\"number\", Objects.requireNonNull(card.getNumber()))\n .add(\"exp_month\", Objects.requireNonNull(card.getExpMonth()).toString())\n .add(\"exp_year\", Objects.requireNonNull(card.getExpYear()).toString())\n .add(\"cvc\", Objects.requireNonNull(card.getCvc()))\n .build();\n url=\"create_customer_w_payment\";\n }\n else {\n body = new FormBody.Builder()\n .add(\"name\", name.getText().toString())\n .add(\"metadata\", metadata.toString())\n .add(\"email\", email.getText().toString())\n .add(\"phone\", phone.getText().toString())\n .add(\"line1\", line1.getText().toString())\n .add(\"line2\", line2.getText().toString())\n .add(\"city\", city.getText().toString())\n .add(\"state\", state.getText().toString())\n .add(\"postal_code\", postal.getText().toString())\n .build();\n url = \"create_customer\";\n }\n\n //Create the request to be sent over HTTP\n //TODO: Replace backend_app_id in string.xml\n //TODO: Replace backend_url in string.xml in production\n Request request = new Request.Builder()\n .addHeader(\"applicationId\",getString(R.string.backend_app_id))\n .url(getString(R.string.backend_url) + url)\n .post(body)\n .build();\n\n //make actual call\n //the request must be enqueued to run a different thread\n httpClient.newCall(request).enqueue(new PostCallback(ref));\n\n }\n });\n }", "public void registerUser(View view) {\n TextView emailAddressField = (TextView) findViewById(R.id.registerEmailAddress);\n final String emailAddress = emailAddressField.getText().toString();\n\n TextView passwordField = (TextView) findViewById(R.id.registerPassword);\n final String password = passwordField.getText().toString();\n\n TextView nameField = (TextView) findViewById(R.id.registerName);\n final String name = nameField.getText().toString();\n\n final String company = \"Purple Store\";\n\n if(emailAddress.isEmpty() || password.isEmpty() || name.isEmpty()) {\n Toast.makeText(this, \"Email Address, password or name cannot be blank\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n mAuth.createUserWithEmailAndPassword(emailAddress, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n\n // Write credentials in Fire Store\n User newUser = new User();\n newUser.createUser(uid, emailAddress, name, company);\n newUser.writeData();\n\n // Save the details on shared preferences for future calls\n SharedPreferences sharedPreferences = getSharedPreferences(\"USER_DETAILS\", Context.MODE_PRIVATE);\n\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(\"userId\", uid);\n editor.putString(\"emailAddress\", emailAddress);\n editor.putString(\"name\", name);\n editor.putString(\"companyId\", company);\n editor.apply();\n\n // Redirect to Dashboard\n Intent intent = new Intent(RegisterActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegisterActivity.this, task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@OnClick(R.id.activity_register_button_register)\n public void onRegisterClick(View mView) {\n if (!isFinishing()) {\n mUtility.hideKeyboard(RegisterActivity.this);\n mStringUsername = mEditTextUsername.getText().toString().trim();\n mStringAccountName = mEditTextAccountName.getText().toString().trim();\n mStringEmail = mEditTextEmail.getText().toString().trim();\n mStringMobileNO = mEditTextMobileNO.getText().toString().trim();\n mStringPassword = mEditTextPassword.getText().toString().trim();\n mStringDevicesUIDFCMToken = FirebaseInstanceId.getInstance().getToken();\n mPreferenceHelper.setDeviceToken(mStringDevicesUIDFCMToken);\n if (mStringUsername.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_name), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringAccountName.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_account_name), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringCountryCode.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_select_country_code), getResources().getString(R.string.str_ok));\n return;\n }\n\n if (mStringMobileNO.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_mobile_no), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringMobileNO.length() < 10 || mStringMobileNO.length() > 15) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_mobile_no), getResources().getString(R.string.str_ok));\n return;\n }\n if (!mStringEmail.equalsIgnoreCase(\"\")) {\n if (!mUtility.isValidEmail(mStringEmail)) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_email_address), getResources().getString(R.string.str_ok));\n return;\n }\n }\n if (mStringPassword.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_password), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringPassword.length() < 6 || mStringPassword.length() > 15) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_password), getResources().getString(R.string.str_ok));\n return;\n }\n if (!mCheckBoxTermNCondition.isChecked()) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_agree_terms_condition), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringDevicesUIDFCMToken == null || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"null\") || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"\")) {\n mStringDevicesUIDFCMToken = FirebaseInstanceId.getInstance().getToken();\n }\n if (mStringDevicesUIDFCMToken == null || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"null\") || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"\")) {\n mStringDevicesUIDFCMToken = System.currentTimeMillis() + \"\";\n }\n\n console.log(\"asxasxasxasx_token\",mStringDevicesUIDFCMToken);\n\n if (!mUtility.haveInternet()) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_no_internet_connection), getResources().getString(R.string.str_ok));\n } else {\n checkUserRegister();\n }\n }\n }", "public void goClicked(View view){\n final String email=emailEditText.getText().toString();\n final String password=passwordEditText.getText().toString();\n\n\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //Sign in the user\n Log.i(\"Infograph\", \"Sign in was successful\");\n loginUser();\n Toast.makeText(MainActivity.this, \"Signed in successfully !\", Toast.LENGTH_SHORT).show();\n } else {\n //Sign up the user\n Log.i(\"Infograph\", \"Sign in was not successful, Attempting SignUp\");\n mAuth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //Add to database\n DatabaseReference reference=database.getReference().child(\"users\").child(mAuth.getCurrentUser().getUid()).child(\"email\");\n\n reference.setValue(email);\n\n Log.i(\"Infograph\",\"Sign up was successful\");\n loginUser();\n Toast.makeText(MainActivity.this, \"Signed up successfully !\", Toast.LENGTH_SHORT).show();\n\n\n }else{\n Log.i(\"Infograph\",\"Sign up was not successful\");\n Toast.makeText(MainActivity.this, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n\n }\n });\n }", "protected void createRegistrationInfo() {\n registrationInfo.put(\"email\", email.getText().toString());\n registrationInfo.put(\"password\", password.getText().toString());\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tswitch(requestCode){\n\t\tcase 0:\t\t\t\n\t\t\tif(resultCode == RESULT_OK){\n\t\t\t\tLog.d(TAG, Integer.toString(RESULT_OK));\n\t\t\t\tString u_signup, p_signup;\n\t\t\t\tu_signup = data.getStringExtra(\"username\");\n\t\t\t\tp_signup = data.getStringExtra(\"password\");\n\t\t\t\tLog.d(TAG, u_signup);\n\t\t\t\tintent = new Intent(getApplicationContext(), Timeline.class);\n\t\t\t\tintent.putExtra(\"first_time\", true); //Setting Boolean first_time to true\n\t\t\t\tintent.putExtra(\"username\", u_signup);\n\t\t\t\tintent.putExtra(\"password\", p_signup);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t}\n\t}", "public void register(View view) {\n if(radioGroup.getCheckedRadioButtonId() == -1){\n Snackbar.make(getCurrentFocus(),\"Please select one of the Options: Student or Professor\",Snackbar.LENGTH_LONG).show();\n return;\n }\n if (usn.getText().toString().trim().equals(\"\")){\n usn.setError(\"This field cannot be empty\");\n return;\n } else if (password.getText().toString().trim().equals(\"\")){\n password.setError(\"This field cannot be empty\");\n return;\n } else if(password.getText().toString().trim().length() < 8){\n password.setError(\"Password too short.\");\n return;\n } else if(confirmPassword.getText().toString().trim().equals(\"\")){\n confirmPassword.setError(\"This field cannot be empty\");\n return;\n } else if(!(password.getText().toString().trim()\n .equals(confirmPassword.getText().toString().trim()))){\n password.setError(\"Passwords do not match\");\n confirmPassword.setError(\"Passwords do not match\");\n return;\n }\n progressBar.setVisibility(View.VISIBLE);\n mAuth.signInAnonymously().addOnSuccessListener(authResult -> myRef.child(usn.getText().toString().trim()).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n try {\n String username = dataSnapshot.child(\"emailId\").getValue().toString();\n String password = confirmPassword.getText().toString().trim();\n System.out.println(username);\n mAuth.createUserWithEmailAndPassword(username,password)\n .addOnCompleteListener(RegisterActivity.this,task -> {\n Log.d(\"TAG\",\"Created User:\"+task.isSuccessful());\n if(!task.isSuccessful()){\n Toast.makeText(RegisterActivity.this, \"Error occurred.\" +\n \" Could not create user. Please \" +\n \"check your internet connection\", Toast.LENGTH_LONG).show();\n return;\n }\n else {\n startActivity(new Intent(RegisterActivity.this,LoginActivity.class));\n finish();\n }\n });\n\n }catch (NullPointerException e){\n usn.setError(\"Invalid USN. Please check your input or contact\" +\n \" your department for help\");\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n }))\n .addOnFailureListener(e -> {\n progressBar.setVisibility(View.INVISIBLE);\n Snackbar.make(view,\"Something went wrong.Please check if you have an internet connection or that the details\" +\n \"entered are valid\",Snackbar.LENGTH_LONG).show();\n });\n }", "private void signUpNewUserToDB(){\n dbAuthentication.createUserWithEmailAndPassword(this.newUser.getEmail(), this.newUser.getPassword())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n /**signUp success, will update realTime DB ant firebase Authentication*/\n FirebaseUser currentUser = dbAuthentication.getCurrentUser();\n addToRealDB(currentUser.getUid());\n /**will send verification email to the user from Firebase Authentication*/\n currentUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n }\n });\n }else{isBadEmail = true;}\n }\n });\n }", "public void signup(String name, String uname, String passwd) {\n\t\t\n\t\tNameValueSet.Builder value = NameValueSet.newBuilder();\n\t\tvalue.setName(\"SignUp_name\");\n\t\tvalue.setValue(\"SignUp_value\");\n\t\t\n\t\tJobDesc.Builder desc = JobDesc.newBuilder();\n\t\tdesc.setNameSpace(\"SignUp_namespace\");\n\t\tdesc.setJobId(\"Zero\");\n\t\tdesc.setOwnerId(0);\n\t\tdesc.setStatus(JobCode.JOBUNKNOWN);\n\t\tdesc.setOptions(value.build());\n\t\t\n\t\tJobOperation.Builder j = eye.Comm.JobOperation.newBuilder();\n\t\tj.setAction(JobAction.ADDJOB);\n\t\tj.setJobId(\"Zero\");\n\t\tj.setData( desc.build());\n\n\t\t\t\n\t\tSignUp.Builder sb= eye.Comm.SignUp.newBuilder();\n\t\tsb.setFullName(name);\n\t\tsb.setUserName(uname);\n\t\tsb.setPassword(passwd);\n\t\t \n\n\t\t// Payload containing data\n\t\tRequest.Builder r = Request.newBuilder();\n\t\teye.Comm.Payload.Builder p = Payload.newBuilder();\n\t\tp.setSignUp(sb.build());\n\t\tp.setJobOp(j.build());\n\t\tr.setBody(p.build());\n\n\t\t// header with routing info\n\t\teye.Comm.Header.Builder h = Header.newBuilder();\n\t\th.setOriginator(\"client\");\n\t\th.setTag(\"Sign up\");\n\t\th.setTime(System.currentTimeMillis());\n\t\th.setRoutingId(eye.Comm.Header.Routing.JOBS);\n\t\tr.setHeader(h.build());\n\n\t\teye.Comm.Request req = r.build();\n\n\t\ttry {\n\t\t\tcomm.sendMessage(req);\n\t\t} catch (Exception e) {\n\t\t\tlogger.warn(\"Unable to deliver message, queuing\");\n\t\t}\n\t}", "public void signUp(View v) {\n attemptRegistration();\n }", "@PostMapping(\"/signup\")\n\tpublic Signup signUpEmployee(@RequestBody Signup signup) {\n\t\tString email = signup.getEmailId();\n\t\tSignup user = userRepo.findByemailId(email);\n\t\tif(! user.isEmpty()) {\n\t\t\tthrow new UserAlreadyExistException(\"User Already Exist\");\n\t\t}\n\t\t\n\t\treturn userRepo.save(signup);\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void done(ParseException e) {\n\t\t\t\t\t\t\tif(e == null) {\r\n\t\t\t\t\t\t\t\tToast.makeText(SignUpActivity.this, \"Signup Successfull\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t\tParseInstallation currentInstallation = ParseInstallation.getCurrentInstallation();\r\n\t\t\t\t\t\t\t\tcurrentInstallation.put(\"username\", ParseUser.getCurrentUser().getObjectId());\r\n\t\t\t\t\t\t\t\tcurrentInstallation.put(\"useremail\", ParseUser.getCurrentUser().getEmail());\r\n\t\t\t\t\t\t\t\tcurrentInstallation.saveInBackground();\r\n\t\t\t\t\t\t\t\tIntent intent = new Intent(SignUpActivity.this, MainActivity.class);\r\n\t\t\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tToast.makeText(SignUpActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "@RequestMapping(value=\"/signup-t\", method=RequestMethod.POST)\r\n\tpublic String signup(HttpServletRequest req,Model model, @ModelAttribute(value=\"newUser\") Trainee user, BindingResult br,\r\n\t\t\tRedirectAttributes redirectAttributes,\r\n\t\t\t@RequestParam(\"stream\") String stream) {\r\n\t\t\r\n\t\tSystem.out.println(\"POST Trainee\");\r\n\t\t\r\n\t\tString email = user.getEmail().toLowerCase();\r\n\t\tif(!pattern.matcher(email).find()){\r\n\t\t\tSystem.out.println(\"invalid email\");\r\n\t\t\t/* TODO: add error messageInvalid EMAIL */\r\n\t\t\treturn null; // add the correct view string\r\n\t\t}\r\n\t\t\r\n\t\tif (!br.hasErrors()) {\r\n\t\t\tuser.setStream(stream);\r\n\t\t\t//System.out.println(user);\r\n\t\t\t\r\n\t\t\t/* TODO: write Trainee to DB */\r\n\t\t\tIUser newUser = userDAO.create(user);\r\n\t\t\tmodel.addAttribute(\"newUser\", user);\r\n\t\t\tredirectAttributes.addFlashAttribute(\"userId\", newUser.getUserId());\r\n\t\t}\r\n\t\t\r\n\t\treturn \"redirect:/signUpRequest\";\r\n\t}", "private void initSignUpButton() {\n TextButton signUpButton = new TextButton(\"Sign up\", skin);\n signUpButton.setPosition(320, 125);\n signUpButton.addListener(new InputListener() {\n @Override\n public void touchUp(InputEvent event, float x, float y, int pointer, int button) {\n AuthService authService = new AuthService();\n RegistrationResponse response\n = authService.register(usernameField.getText(), passwordField.getText());\n switch (response) {\n case OCCUPIED_NAME:\n usernameTakenDialog();\n break;\n case SHORT_PASSWORD:\n passwordTooShortDialog();\n break;\n case SUCCESS:\n stateManager.setState(new LoginState(stateManager));\n break;\n default:\n }\n }\n\n @Override\n public boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\n System.out.println(\"pressed sign up\");\n return true;\n }\n });\n stage.addActor(signUpButton);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n String action = request.getParameter(\"action\");\n String url = \"/login.jsp\";\n if(action.equals(\"signup\"))\n {\n // Flags\n boolean success = true;\n boolean isAvailable = true;\n boolean inputValid = true;\n \n // get parameters from the request\n String fullName = request.getParameter(\"fullname\");\n String userName = request.getParameter(\"username\");\n String email = request.getParameter(\"email\");\n String birthDate = request.getParameter(\"birthdate\");\n String questionNo = request.getParameter(\"security_questions\");\n String answer = request.getParameter(\"security_answer\");\n String password = request.getParameter(\"password\");\n String confirm = request.getParameter(\"confirm_password\");\n javax.servlet.http.Part photo = request.getPart(\"photo\");\n InputStream inputPhoto = null; //input stream of photo upload\n String salt = \"\";\n String hPass = \"\"; //salted and hashed password\n \n if(photo != null){\n inputPhoto = photo.getInputStream();\n }\n \n //Salt and Hash password\n salt = generatePassword(32); //32 indicates bytes\n password += salt; //add salt to existing password\n confirm += salt;\n try {\n hPass = hashPassword(password);\n confirm = hashPassword(confirm);\n }catch (NoSuchAlgorithmException ex) {\n System.out.println(ex);\n }\n \n // store data in User object\n User user = new User();\n user.setfullname(fullName);\n user.setusername(userName);\n user.setemail(email); \n user.setbirthdate(birthDate); \n user.setquestionno(questionNo);\n user.setanswer(answer);\n user.setpassword(hPass);\n user.setsalt(salt);\n user.setphoto(inputPhoto);\n \n // store User object in request\n request.setAttribute(\"user\", user); // TODO: Do we need to add the user to both the request and session below.\n \n \n // Check to make sure that this email is available\n isAvailable = check_email_available(user.getemail());\n if(!isAvailable) {\n request.setAttribute(\"signupError\", \"This email is not available.\"\n + \" Please try a different one.\");\n }\n \n // If the email is available. Otherwise skip this test because we are\n // already going to return an error, and this test is more complex than\n // the previous (waste of time).\n if (isAvailable) {\n // Check to make sure all the data sent by the user is valid\n StringBuilder errors = new StringBuilder();\n errors.append(\"One or more input fields were invalid when trying to sign you up! \\n\");\n inputValid = validate_user_input(user, confirm, errors);\n if (!inputValid) {\n request.setAttribute(\"signupError\", errors);\n }\n }\n \n if(!isAvailable || !inputValid) {\n success = false;\n } \n else {\n // Remove the signup error from the request since we have successfully\n // validated that the user should be added to the database.\n request.removeAttribute(\"signupError\");\n try {\n // Try to store the user into the database\n UserDB.insert(user);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(membershipServlet.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n Logger.getLogger(membershipServlet.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n // Get the session from the request and store the user in it.\n HttpSession session = request.getSession();\n session.setAttribute(\"user\", user); // TODO: Should adding the user to the request be removed?\n }\n \n // forward request to JSP\n url = success ? \"/home.jsp\" : \"/signup.jsp\";\n }\n else if(action.equals(\"login\"))\n {\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n String remember = request.getParameter(\"remember\");\n String hPass = \"\";\n String salt = \"\";\n \n HttpSession session = request.getSession();\n User user = UserDB.search(email); //search for user by email in database.\n\n //no user found in database\n if(user == null)\n {\n request.setAttribute(\"loginError\", \"No user found. If this is\"\n + \" your first time, please use the Signup link\");\n }\n else\n {\n hPass = user.getpassword(); //hashed password\n salt = user.getsalt(); //user salt\n \n //generate hash password with user inputted password and existing salt.\n try {\n password = hashPassword(password + salt);\n }catch (NoSuchAlgorithmException ex) {\n System.out.println(ex);\n }\n \n //verify email and password of user\n if(user.getemail().equalsIgnoreCase(email) && user.getpassword().equals(password))\n {\n session.setAttribute(\"user\", user); //once creds are confirmed, set the user session attribute.\n request.removeAttribute(\"loginError\"); //removes lingering login errors for a user.\n if(remember != null)\n {\n Cookie c = new Cookie(\"emailCookie\", email);\n c.setMaxAge(60*60*24*365*2);\n c.setPath(\"/\");\n response.addCookie(c);\n }\n // UPDATE NOTIFICATIONS\n ArrayList<String> new_followers;\n ArrayList<UserTweetInfo> new_tweets;\n \n new_followers = UserDB.getNewFollowers(email);\n new_tweets = TweetDB.getNewTweets(email);\n \n session.setAttribute(\"newFollowers\", new_followers);\n session.setAttribute(\"newTweets\", new_tweets);\n \n // UPDATE last_login_time here?\n UserDB.updateLoginTime(email);\n \n url = \"/home.jsp\";\n }\n else\n {\n request.setAttribute(\"loginError\",\"Login failed! Check password\");\n url = \"/login.jsp\";\n }\n }\n }\n //If user signs out of account, invalidate session and send to login page\n else if(action.equals(\"logout\")) {\n HttpSession session = request.getSession();\n session.invalidate();\n \n url = \"/login.jsp\";\n }\n //Forgot password action\n else if(action.equals(\"forgot\")) {\n String email = request.getParameter(\"email\");\n String questionNo = request.getParameter(\"security_questions\");\n String answer = request.getParameter(\"security_answer\");\n User user = UserDB.search(email); //search for user by email in database.\n \n //no user found in database\n if(user == null)\n {\n request.setAttribute(\"forgotMessage\", \"No user found. If this is\"\n + \" your first time, please use the Signup link\");\n url=\"/login.jsp\";\n }\n //Check user email, security question and answer\n else if(user.getemail().equalsIgnoreCase(email) && user.getquestionno().equals(questionNo)\n && user.getanswer().equalsIgnoreCase(answer))\n {\n String newPassword = generatePassword(4); //generate new password(4 bytes)\n String salt = generatePassword(32); //32 byte salt\n String hPass = \"\";\n //hash salted password\n try {\n hPass = hashPassword(newPassword + salt);\n }catch (NoSuchAlgorithmException ex) {\n System.out.println(ex);\n }\n user.setsalt(salt); //set new salt to User object\n user.setpassword(hPass); //set new hash password to User object\n\n // update user in the database\n UserDB.update(user);\n \n //send user an email with new password\n sendEmail(user.getemail(), newPassword, user.getfullname());\n\n request.setAttribute(\"forgotMessage\", \"Email has been sent!\"); //let user know email has been sent\n url=\"/login.jsp\";\n }\n else\n { \n request.setAttribute(\"forgotMessage\", \"Incorrect information. Please try again\");\n url = \"/forgotpassword.jsp\";\n }\n \n }\n else if (action.equals(\"update\")) {\n // Flags\n boolean success = true;\n boolean inputValid = true;\n \n // get parameters from the request\n String fullName = request.getParameter(\"fullname\");\n String birthDate = request.getParameter(\"birthdate\");\n String questionNo = request.getParameter(\"security_questions\");\n String answer = request.getParameter(\"security_answer\");\n String password = request.getParameter(\"password\");\n String confirm = request.getParameter(\"confirm_password\");\n javax.servlet.http.Part photo = request.getPart(\"photo\");\n InputStream inputPhoto = null; //input stream of photo upload\n \n if(photo != null){\n inputPhoto = photo.getInputStream();\n }\n\n //get user session and set user object from session\n HttpSession session = request.getSession();\n User user = (User) session.getAttribute(\"user\");\n \n //update user fields\n user.setfullname(fullName); \n user.setbirthdate(birthDate); \n user.setquestionno(questionNo);\n user.setanswer(answer);\n user.setpassword(password);\n user.setphoto(inputPhoto);\n \n // Check to make sure all the data sent by the user is valid\n StringBuilder errors = new StringBuilder();\n errors.append(\"One or more input fields were invalid when trying to update!\");\n inputValid = validate_user_input(user, confirm, errors);\n if (!inputValid) {\n request.setAttribute(\"signupError\", errors);\n url = \"/signup.jsp\";\n }\n else {\n // salt and hash password\n // update user in the database\n // display successful update to user and update session with new info\n String salt = generatePassword(32); //32 bytes\n String hPass = \"\";\n try {\n hPass = hashPassword(password + salt);\n }catch (NoSuchAlgorithmException ex) {\n System.out.println(ex);\n }\n user.setsalt(salt);\n user.setpassword(hPass);\n UserDB.update(user);\n request.setAttribute(\"signupError\", \"Update Successful!\");\n session.setAttribute(\"user\", user);\n url = \"/signup.jsp\";\n }\n }\n \n getServletContext()\n .getRequestDispatcher(url)\n .forward(request, response);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_secondary_signup);\n\n signUpButton_rootLayout = (LinearLayout) findViewById(R.id.AGSU_signup_button_root_layout);\n\n activityContext = this;\n\n AGSU_name = findViewById(R.id.AGSU_name);\n\n DatabaseUser incompleteDatabaseUser = getIntent().getParcelableExtra(Constants.PARCELABLE_KEY_INCOMPLETE_DATABASE_USER);\n System.out.println(\"[Neuron.AfterGoogleSignUpActvity.onCreate]: Displaying incomplete db user: \" + incompleteDatabaseUser.toString());\n\n String name = getIntent().getStringExtra(Constants.PARCELABLE_KEY_NAME);\n AGSU_name.setText(name);\n\n EditText usernameField = (EditText) findViewById(R.id.AGSU_username_edit_text);\n EditText passwordField = (EditText) findViewById(R.id.AGSU_password_edit_text);\n EditText repeatPasswordField = (EditText) findViewById(R.id.AGSU_repeat_password_edit_text);\n\n ImageView AGSU_username_error_view = (ImageView) findViewById(R.id.AGSU_username_error_view);\n ImageView AGSU_password_error_view = (ImageView) findViewById(R.id.AGSU_password_error_view);\n ImageView AGSU_repeat_password_error_view = (ImageView) findViewById(R.id.AGSU_repeat_password_error_view);\n\n TextView AGSU_username_error_report_view = (TextView) findViewById(R.id.AGSU_username_error_report_view);\n TextView AGSU_password_error_report_view = (TextView) findViewById(R.id.AGSU_password_error_report_view);\n TextView AGSU_repeat_password_error_report_view = (TextView) findViewById(R.id.AGSU_repeat_password_error_report_view);\n\n Button signUpButton = (Button) findViewById(R.id.AGSU_sign_up_button);\n LinearLayout signupRootLinearLayout = (LinearLayout) findViewById(R.id.AGSU_root_linear_layout);\n\n SecondarySignUpManager = new SecondarySignUpManager(this, incompleteDatabaseUser,\n usernameField, passwordField, repeatPasswordField,\n AGSU_username_error_view, AGSU_password_error_view, AGSU_repeat_password_error_view,\n AGSU_username_error_report_view, AGSU_password_error_report_view, AGSU_repeat_password_error_report_view,\n signUpButton, signupRootLinearLayout);\n\n Constants.isSecondarySignUpInProcess = true;\n\n }", "private void insertUserDetails() {\r\n Retrofit client = API_Client.getApiClient();\r\n ApiInterface api = client.create(ApiInterface.class);\r\n\r\n // Call<Signup_Response_Model> call = api.setUserInfo(setUserDetail());\r\n Call<Signup_Response_Model> call = api.setUserInfo(\r\n SharedPrefrenceManager.getInstance(this).admin_Name(),\r\n preferences.getString(CommonCalls.name, null),\r\n preferences.getString(CommonCalls.fname, null),\r\n preferences.getString(CommonCalls.age, null),\r\n preferences.getString(CommonCalls.dob, null),\r\n preferences.getString(CommonCalls.gender, null),\r\n preferences.getString(CommonCalls.cnic_no, null),\r\n preferences.getString(CommonCalls.cnic_place, null),\r\n preferences.getString(CommonCalls.cnic_expi, null),\r\n preferences.getString(CommonCalls.cast, null),\r\n preferences.getString(CommonCalls.religon, null),\r\n preferences.getString(CommonCalls.contact, null),\r\n preferences.getString(CommonCalls.education, null),\r\n preferences.getString(CommonCalls.skills, null),\r\n preferences.getString(CommonCalls.martial_Status, null),\r\n preferences.getString(CommonCalls.emp_status, null),\r\n preferences.getString(CommonCalls.emp_will, null),\r\n preferences.getInt(CommonCalls.no_male_child, 0) + \"\",\r\n preferences.getInt(CommonCalls.no_female_child, 0) + \"\",\r\n preferences.getString(CommonCalls.availabilit, null),\r\n preferences.getString(CommonCalls.remarks, null),\r\n preferences.getString(CommonCalls.longitude, null),\r\n preferences.getString(CommonCalls.latitude, null),\r\n preferences.getString(CommonCalls.image, null)\r\n\r\n );\r\n\r\n call.enqueue(new Callback<Signup_Response_Model>() {\r\n @Override\r\n public void onResponse(Call<Signup_Response_Model> call, Response<Signup_Response_Model> response) {\r\n if (response.isSuccessful()) {\r\n Signup_Response_Model signup_response_model = response.body();\r\n if (signup_response_model.getSuccess() == 1) {\r\n mDiloge.dismiss();\r\n Toast.makeText(HomeActivity.this, \"Data Added\", Toast.LENGTH_LONG).show();\r\n } else {\r\n mDiloge.dismiss();\r\n Toast.makeText(HomeActivity.this, \"First Insert Data!\", Toast.LENGTH_LONG).show();\r\n }\r\n\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Call<Signup_Response_Model> call, Throwable t) {\r\n Toast.makeText(HomeActivity.this, t.getLocalizedMessage(), Toast.LENGTH_LONG).show();\r\n Toast.makeText(HomeActivity.this, \"Server Response Failure\", Toast.LENGTH_LONG).show();\r\n }\r\n });\r\n\r\n\r\n }", "@Override\n\tpublic void onDidFinished(SYLSignupResponseModel msylsignupresponsemodel) {\n\t\tif (msylProgressDialog != null && msylProgressDialog.isShowing()) {\n\t\t\tmsylProgressDialog.dismiss();\n\t\t}\n\t\ttry {\n\t\tif(msylsignupresponsemodel!=null)\n\t\t{\n\t\t\tif(msylsignupresponsemodel.isSuccess())\n\t\t\t\n\t\t\t{\n\t\t\t\tSYLSaveValues.setSYLusername(\"\", getActivity());\n\t\t\t\tSYLSaveValues.setProfileImageurl(\"\", getActivity());\n\t\t\t\tSYLSaveValues.setSYLusername(msylsignupresponsemodel.getSignupResponse().getName(), getActivity());\n\t\t\t\tSYLSaveValues.setProfileImageurl(msylsignupresponsemodel.getSignupResponse().getProfileImage(), getActivity());\nSYLSaveValues.setSYLEmailAddress(msylsignupresponsemodel.getSignupResponse().getEmail(),getActivity());\n\n\t\t\t getActivity().\t\tgetSupportFragmentManager().beginTransaction()\n\t\t\t\t.replace(R.id.menu_frame, new SYLMenuFragment())\n\t\t\t\t.commit();\n\t\t\t\tif(msylsignupresponsemodel.getSignupResponse().isVerified())\n\t\t\t\t{\n\t\t\t\t\tSYLUtil.buildAlertMessage(getActivity(),\"Profile updated successfully\");\n\t\t\t\t}\n\t\t\telse{\n\t\t\t\t\tbuildAlertMessage(getActivity(), \"Your profile Updated with your changed email.Please enter the verification code which we have send to your\" + msylsignupresponsemodel.getSignupResponse().getEmail()+\"to complete the validation process\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSYLUtil.buildAlertMessage(getActivity(),msylsignupresponsemodel.getError().getErrorDetail());\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSYLUtil.buildAlertMessage(getActivity(),\"Unexpected server error happened\");\n\t\t}\n\t\t}\n\tcatch(Exception e)\t\n\t{\n\t\tSYLUtil.buildAlertMessage(getActivity(),\"Unexpected server error happened\");\n\t}\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString username = usernameEditText.getText().toString();\r\n\t\t\t\tString email = emailEditText.getText().toString();\r\n\t\t\t\tString password = passwordEditText.getText().toString();\r\n\t\t\t\tString confirmPass = confirmPassEditText.getText().toString();\r\n\t\t\t\tboolean login = true;\r\n\t\t\t\t\r\n\t\t\t\tif(isEmpty(username)) {\r\n\t\t\t\t\tToast.makeText(SignUpActivity.this, \"Username is missing\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tlogin = false;\r\n\t\t\t\t} else \r\n\t\t\t\tif(isEmpty(email)) {\r\n\t\t\t\t\tToast.makeText(SignUpActivity.this, \"Email is missing\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tlogin = false;\r\n\t\t\t\t} else \r\n\t\t\t\tif(isEmpty(password)) {\r\n\t\t\t\t\tToast.makeText(SignUpActivity.this, \"Password is empty\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tlogin = false;\r\n\t\t\t\t} else \r\n\t\t\t\tif(!password.equals(confirmPass)) {\r\n\t\t\t\t\tToast.makeText(SignUpActivity.this, \"Password doesn't match with confirm password\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\tlogin = false;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(login) {\r\n\t\t\t\t\tParseUser user = new ParseUser();\r\n\t\t\t\t\tuser.setEmail(email);\r\n\t\t\t\t\tuser.setUsername(email);\r\n\t\t\t\t\tuser.setPassword(password);\r\n\t\t\t\t\t\r\n\t\t\t\t\tuser.signUpInBackground(new SignUpCallback() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void done(ParseException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tif(e == null) {\r\n\t\t\t\t\t\t\t\tToast.makeText(SignUpActivity.this, \"Signup Successfull\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t\tParseInstallation currentInstallation = ParseInstallation.getCurrentInstallation();\r\n\t\t\t\t\t\t\t\tcurrentInstallation.put(\"username\", ParseUser.getCurrentUser().getObjectId());\r\n\t\t\t\t\t\t\t\tcurrentInstallation.put(\"useremail\", ParseUser.getCurrentUser().getEmail());\r\n\t\t\t\t\t\t\t\tcurrentInstallation.saveInBackground();\r\n\t\t\t\t\t\t\t\tIntent intent = new Intent(SignUpActivity.this, MainActivity.class);\r\n\t\t\t\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tToast.makeText(SignUpActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}", "@PostMapping(value = \"/signup\", produces = { \"application/json\" })\n\t@ResponseBody\n\tpublic Map<String, Object> saveUser(@RequestParam Map<String, Object> map, HttpServletRequest req) {\n\t\tMap<String, Object> respMap = new HashMap<>();\n\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\tfinal InsightUsers insightUsers = mapper.convertValue(map, InsightUsers.class);\n\t\tMap<String, String> response = ius.savefirstLastEmailFromForm(insightUsers);\n\t\tif (((String) response.get(\"status\")).equals(\"Ok\")) {\n\t\t\trespMap.put(\"id\", response.get(\"id\").toString());\n\t\t\trespMap.put(\"message\", \"Details saved successfully\");\n\t\t\trespMap.put(\"status\", ResponseStatusEnum.SUCCESS);\n\t\t\t// Audit section ends here\n\t\t} else if (((String) response.get(\"status\")).equals(\"exists\")) {\n\t\t\trespMap.put(\"message\", \"You have already registered for Try for Free\");\n\t\t\trespMap.put(\"status\", ResponseStatusEnum.ERROR);\n\t\t} else {\n\t\t\trespMap.put(\"message\", \"Failed to save details\");\n\t\t\trespMap.put(\"status\", ResponseStatusEnum.ERROR);\n\t\t}\n\t\treturn respMap;\n\t}", "private void sendToServer(User register) {\r\n RegisterServiceAsync registerServiceAsync = GWT.create(RegisterService.class);\r\n AsyncCallback<String> asyncCallback = new AsyncCallback<String>() {\r\n public void onSuccess(String result) {\r\n if (result != null) {\r\n String[] tmp = result.split(\"_\");\r\n \r\n int value = Integer.parseInt(tmp[0]);\r\n if (value == User.OK) {\r\n RootPanel.get(\"content\").clear();\r\n String[] href = Window.Location.getHref().split(\"#\");\r\n String linker = href[0].contains(\"?\") ? \"&\" : \"?\";\r\n getEntry().showDialogBox(\"ActivationLink\", href[0] + linker + \"activationCode=\" + tmp[1]);\r\n History.newItem(\"welcome\");\r\n } else {\r\n if (value >= User.PASSWORD_FAULT) {\r\n value -= User.PASSWORD_FAULT;\r\n }\r\n if (value >= User.USERNAME_FAULT) {\r\n value -= User.USERNAME_FAULT; \r\n registerInvalid(User.USERNAME_FAULT);\r\n }\r\n if (value >= User.EMAIL_FORMAT) {\r\n value -= User.EMAIL_FORMAT;\r\n registerInvalid(User.EMAIL_FORMAT);\r\n }\r\n if (value >= User.GEBURTSTAG_AGE) {\r\n value -= User.GEBURTSTAG_AGE;\r\n registerInvalid(User.GEBURTSTAG_AGE);\r\n }\r\n if (value >= User.GEBURTSTAG_FORMAT) {\r\n value -= User.GEBURTSTAG_FORMAT;\r\n registerInvalid(User.GEBURTSTAG_FORMAT);\r\n }\r\n if (value >= User.GEBURTSTAG_FAULT) {\r\n value -= User.GEBURTSTAG_FAULT;\r\n registerInvalid(User.GEBURTSTAG_FAULT);\r\n }\r\n submit.setEnabled(true);\r\n }\r\n } else {\r\n submit.setEnabled(true);\r\n }\r\n }\r\n \r\n public void onFailure(Throwable caught) {\r\n registerInvalid(0);\r\n System.out.println(caught);\r\n }\r\n };\r\n registerServiceAsync.register(register, asyncCallback);\r\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!(API.isInternetOn(Register.this))) {\r\n\t\t\t\t\tshowAlert(\"Internet not avialble.\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogressdialog.setMessage(\"Please wait...\");\r\n\t\t\t\t\tprogressdialog.show();\r\n\t\t\t\t\t// Force user to fill up the form\r\n\t\t\t\t\tif (username.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| email.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| password.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| verifyPassword.getText().toString().equals(\"\")) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please complete the sign up form.\");\r\n\t\t\t\t\t} else if (!(isValidEmail(email.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please enter valid email id.\");\r\n\t\t\t\t\t} else if (!(password.getText().toString()\r\n\t\t\t\t\t\t\t.equals(verifyPassword.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Password did not matched\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Save new user data into Parse.com Data Storage\r\n\t\t\t\t\t\tParseUser user = new ParseUser();\r\n\t\t\t\t\t\tuser.setUsername(username.getText().toString());\r\n\t\t\t\t\t\tuser.setPassword(password.getText().toString());\r\n\t\t\t\t\t\tuser.setEmail(email.getText().toString());\r\n\t\t\t\t\t\tuser.signUpInBackground(new SignUpCallback() {\r\n\t\t\t\t\t\t\tpublic void done(ParseException e) {\r\n\t\t\t\t\t\t\t\tif (e == null) {\r\n\t\t\t\t\t\t\t\t\tAllowUserToLogin(username.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString(), password.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString());\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\t\t\t\t\t\"Sign up Error\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t\t\t\t\t\t\t.show();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "private void registerForEmail(final String email, final String name, final String facebookId, final String token, final String imageUrl, final boolean isFb){\n// String url = Router.User.getWIthEmailComplete(email);\n// JSONObject params = new JSONObject();\n// try {\n// params.put(\"name\",name);\n// params.put(\"isFb\",isFb);\n// params.put(\"token\",token);\n// params.put(\"email\",email);\n// params.put(\"profilepic\",imageUrl);\n// params.put(\"facebookId\",facebookId);\n// } catch (JSONException e) {e.printStackTrace();}\n// JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, url, params, new Response.Listener<JSONObject>() {\n//\n// @Override\n// public void onResponse(JSONObject jsonObject) {\n// try {\n// JSONObject result = jsonObject.getJSONObject(\"result\");\n// String userId = result.getString(\"userId\");\n// userMain.userId = userId;\n// userMain.token = token;\n// userMain.email = email;\n// userMain.authProvider = (isFb)?\"facebook\":\"google\";\n// updateLoginTokens();\n// userMain.saveUserDataLocally();\n//\n// loginWithUserId(userId);\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError volleyError) {\n// Log.e(\"ERROR\",\"error in registerForEmail\");\n// }\n// });\n// MainApplication.getInstance().getRequestQueue().add(jsonObjectRequest);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getApplicationContext(), SignupActivity.class);\n intent.putExtra(SignupActivity.EXTRA_TYPEUSER, Constants.flowSignupUser);\n User u = new User(); u.setEmail(text_email.getText().toString()); u.setPassword(text_password.getText().toString());\n intent.putExtra(SignupActivity.LOGIN_PARAMS,u );\n startActivityForResult(intent, Constants.REQUEST_SIGNUP);\n }" ]
[ "0.6990044", "0.69285876", "0.6905558", "0.68816775", "0.6849382", "0.68231714", "0.6819002", "0.68189627", "0.680251", "0.67329824", "0.6702744", "0.66966045", "0.6687366", "0.6686532", "0.66736305", "0.66158545", "0.6578246", "0.6558638", "0.6534729", "0.6525126", "0.64881766", "0.6484916", "0.6479519", "0.6444409", "0.64116114", "0.63967085", "0.63768744", "0.63747656", "0.6354069", "0.63519436", "0.63345426", "0.6301601", "0.63010323", "0.6295178", "0.62938875", "0.62923545", "0.627535", "0.6267883", "0.62626344", "0.62380254", "0.62259567", "0.6222674", "0.6207292", "0.6177333", "0.6157557", "0.6139182", "0.61247736", "0.6114509", "0.6102128", "0.60938245", "0.6076117", "0.60560006", "0.60551447", "0.6055101", "0.604557", "0.6037185", "0.60204715", "0.60129166", "0.6012273", "0.6011446", "0.6011065", "0.6000321", "0.59960675", "0.5989322", "0.5985191", "0.5967768", "0.5964257", "0.5964105", "0.59627384", "0.5946278", "0.5936889", "0.5923042", "0.59219193", "0.5918227", "0.59136236", "0.5912764", "0.5909866", "0.5903609", "0.59010977", "0.5897138", "0.5891309", "0.589094", "0.58809036", "0.58782315", "0.5876886", "0.58656305", "0.58571917", "0.5852744", "0.5849409", "0.5842556", "0.58412564", "0.5840092", "0.58397746", "0.58383", "0.58304775", "0.5821368", "0.5817885", "0.58174384", "0.5817068", "0.581653" ]
0.69372433
1
/ When a user signs in, this is the function that deals with correct/incorrect info. Input "message","login" "email",___ "password",___ Output "message","loginsuccess"/"loginfail" if loginsuccess > all of user data and feed data returned in JSON if loginfail > "loginfail",reason
public JSONObject signIn(JSONObject message, Session session, Connection conn) { //JSONObject response = new JSONObject(); try { Statement st = conn.createStatement(); ResultSet rs = null; String signinemail = (String) message.get("email"); String signinpassword = (String) message.get("password"); signinpassword.replaceAll("\\s+",""); int p = hash(signinpassword); // System.out.println(); if (signinemail.length() > 0 && signinpassword.length() > 0) { rs = st.executeQuery("SELECT * from TotalUsers WHERE Email='" + signinemail + "';"); if (rs.next()) { if (rs.getInt("Password")==p) { JSONObject r = getData(conn, rs.getInt("userID")); for (String key : JSONObject.getNames(r)) { response.put(key, r.get(key)); } // System.out.println(response.toString()); response.put("message", "loginsuccess"); response.put("loginsuccess", "Logged in."); response.put("email", rs.getString("Email")); response.put("firstName", rs.getString("FirstName")); response.put("lastName", rs.getString("LastName")); // int userID = rs.getInt("userID"); message.put("userID", rs.getInt("userID")); // r = notifyPeriod(message, session, conn); return response; } else { response.put("message", "loginfail"); response.put("loginfail", "Incorrect password."); return response; } } else { response.put("message", "loginfail"); response.put("loginfail", "Email doesn't exist."); return response; } } else { response.put("message", "loginfail"); response.put("loginfail", "Please fill in all of the fields."); return response; } } catch (SQLException sqle) { try { response.put("message", "loginfail"); response.put("loginfailed", "Login failed."); } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject signInTest(JSONObject message, Session session, Connection conn) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = null;\n\t\t\tString signinemail = (String) message.get(\"email\");\n\t\t\tString signinpassword = (String) message.get(\"password\");\n\t\t\tsigninpassword.replaceAll(\"\\\\s+\",\"\");\n\t\t\tint p = hash(signinpassword);\n//\t\t\tSystem.out.println();\n\t\t\tif (signinemail.length() > 0 && signinpassword.length() > 0) {\n\t\t\t\trs = st.executeQuery(\"SELECT * from TotalUsers WHERE Email='\" + signinemail + \"';\");\n\t\t\t\tif (rs.next()) {\n\t\t\t\t\tif (rs.getInt(\"Password\")==p) {\n\t\t\t\t\t\tresponse.put(\"message\", \"loginsuccesstest\");\n\t\t\t\t\t\tresponse.put(\"loginsuccesstest\", \"Logged in.\");\n\t\t\t\t\t\tresponse.put(\"email\", rs.getString(\"Email\"));\n\t\t\t\t\t\tresponse.put(\"firstName\", rs.getString(\"FirstName\"));\n\t\t\t\t\t\tresponse.put(\"lastName\", rs.getString(\"LastName\"));\n//\t\t\t\t\t\tint userID = rs.getInt(\"userID\");\n\t\t\t\t\t\t\n//\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresponse.put(\"message\", \"loginfailtest\");\n\t\t\t\t\t\tresponse.put(\"loginfailtest\", \"Incorrect password.\");\n//\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tresponse.put(\"message\", \"loginfailtest\");\n\t\t\t\t\tresponse.put(\"loginfailtest\", \"Email doesn't exist.\");\n//\t\t\t\t\treturn response;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresponse.put(\"message\", \"loginfailtest\");\n\t\t\t\tresponse.put(\"loginfailtest\", \"Please fill in all of the fields.\");\n//\t\t\t\treturn response;\n\t\t\t}\n\t\t} catch (SQLException sqle) {\n\t\t\ttry {\n\t\t\t\tresponse.put(\"message\", \"loginfailtest\");\n\t\t\t\tresponse.put(\"loginfailtest\", \"Login failed.\");\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn response;\n\t } catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdeleteAll(conn);\n\t\treturn response;\n\t}", "void loginAttempt(String email, String password);", "@Override\n\t public String loginUser(String email, String password) {\n\t\t\tlog.info(\"email and pass are \"+email+\" \"+password);\n\t\t\twebuserid=loginmanager.isExist(email, password);\n\t\t\tif(webuserid>0)\n\t\t\t{\n\t\t\t//Ckech is it blocked\n\t\t\tif(! loginmanager.isBlocked(webuserid))\n\t\t\t{\n\t\t\t\t //Get all personal Ids and login the person\n\t\t\t\t \n\t\t\t\t peronalid=loginmanager.getPersonelIds(webuserid);\n\t\t\t\t \n\t\t\t\t //Store in personal bean class\n\t\t\t\t PersonalIds.setEmpid(1);\n\t\t\t\t PersonalIds.setCmpid(1);\n\t\t\t\t PersonalIds.setGrpid(1);\n\t\t\t\t message=error.sucess;\n\t\t\t\t //Lodge the login details in a lodgeevent table\n\t\t\t\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\tmessage=error.blocked;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tmessage=error.noaccount;\n\t\t\t}\n\t\t\t\n\t\t\t\t \n\t\t\t\n\t\t\t\n\t\t\treturn message;\n\t }", "private void checkLogin(String email, String password) {\n final Context ctx = getApplicationContext();\n\n processor.checkLoginCredentials(email, password, ctx, new FetchDataListener() {\n @Override\n public void onFetchComplete(JSONObject data) {\n Boolean resp = (Boolean) data.get(\"response\");\n if (resp) {\n // go to home page\n Intent goToHome = new Intent(ctx, MainActivity.class);\n goToHome.putExtra(\"user\", etEmail.getText().toString());\n goToHome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(goToHome);\n\n // finish prevents people from going back to login without logging out\n finish();\n } else {\n displayLoginError(\"Couldn't log in\");\n etEmail.setText(\"\");\n etPassword.setText(\"\");\n }\n }\n\n @Override\n public void onFetchFailure(String msg) {\n Log.d(TAG, msg);\n displayLoginError(\"Error connecting to server\");\n }\n\n @Override\n public void onFetchStart() {\n // do nothing\n }\n });\n\n }", "public Message handleLogin(Message loginRequest){\n String userNameRequested = loginRequest.getUserName();\n String passWordRequested = loginRequest.getPassWord();\n\n Message badResult = new Message(Message.LOGIN_ERROR);\n\n // case: non registered user\n if(!controlServer.containsUserKey(userNameRequested)){\n return badResult;\n }\n\n // case: registered user\n UserData userData = controlServer.getUserData(userNameRequested);\n\n // compare userName & passWord with the ones in the user register\n if(userData.getPassWord().equals(passWordRequested)){\n Message goodResult = new Message(Message.LOGIN_OK);\n goodResult.setUserData(userData);\n controlServer.showMessage(\"user '\" + userData.getUserName() + \"' just logged in \\n\");\n return goodResult;\n }\n return badResult;\n }", "private void checkLogin(final String email, final String password) {\n // Tag used to cancel the request\n String tag_string_req = \"req_login\";\n\n pDialog.setMessage(\"Logging in ...\");\n showDialog();\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.URL_LOGIN, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"Login Response: \" + response.toString());\n hideDialog();\n\n try {\n JSONObject jObj = new JSONObject(response);\n boolean error = jObj.getBoolean(\"error\");\n\n // Check for error node in json\n if (!error) {\n // user successfully logged in\n // Create login session\n session.setLogin(true);\n\n // Now store the user in SQLite\n String uid = jObj.getString(\"uid\");\n\n JSONObject user = jObj.getJSONObject(\"user\");\n String name = user.getString(\"name\");\n String email = user.getString(\"email\");\n String phone_number = user.getString(\"phone_number\");\n String street_address = user.getString(\"street_address\");\n String postalCode = user.getString(\"postal_code\");\n String created_at = user\n .getString(\"created_at\");\n\n // Inserting row in users table\n\n /*String name, String email, String uid, String created_at, String phone_number,\n String street_address, String postalCode)*/\n\n db.addUser(name, email, uid, created_at,phone_number,street_address,postalCode);\n\n\n\n // Launch main activity\n Intent intent = new Intent(LoginActivity.this,\n HomeActivity.class);\n startActivity(intent);\n finish();\n } else {\n // Error in login. Get the error message\n String errorMsg = jObj.getString(\"error_msg\");\n Toast.makeText(getApplicationContext(),\n errorMsg, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Json error: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"Login Error: \" + error.getMessage());\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to login url\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"email\", email);\n params.put(\"password\", password);\n\n return params;\n }\n\n };\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n\n }", "@Override\n public String logIn(){\n String email = getUserEmail();\n String password = getUserPassword();\n \n if (email.isEmpty() || password.isEmpty()){\n setDisplayError(Color.RED, \"Empty Credentials!\");\n }\n else { \n String sql = \"SELECT * FROM registered_user Where email = ? and password = ?\";\n \n try {\n preparedStatement = conn.prepareStatement(sql);\n preparedStatement.setString(1, email);//1 states that the 1st parameter is email\n preparedStatement.setString(2, password);//2 stated that the 2nd parameter is password\n resultSet = preparedStatement.executeQuery();\n \n if (!resultSet.next()) //If the rows doesn't exist\n setDisplayError(Color.RED, \"Incorrect Email or Password\");\n else{\n status = \"Success\";\n setDisplayError(Color.GREEN, \"Successfull login... Redirecting...\");\n } \n } catch (SQLException ex) {\n System.out.println(\"In the LoginController 1st try part \" + ex.getMessage());\n } finally {\n //closing the prepared statement to prevent the SQL injection\n try {\n if (preparedStatement != null ) {\n preparedStatement.close();\n conn.close();\n } \n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n status = \"Exception\";\n } \n \n //closing the connection\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n }\n }\n }\n \n return status; \n }", "private void login(){\n\t\tprogress.toggleProgress(true, R.string.pagetext_signing_in);\n\t\tParseUser.logInInBackground(email.split(\"@\")[0], password, new LogInCallback() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(ParseUser user, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tprogress.toggleProgress(false);\n\t\t\t\t\tIntent intent = new Intent(context, MainActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// else, incorrect password\n\t\t\t\t\tToast.makeText(context, \n\t\t\t\t\t\t\t\t getString(R.string.parse_login_fail, email), \n\t\t\t\t\t\t\t\t Toast.LENGTH_LONG).show();\t\t\t\t\t\n\t\t\t\t\tLog.e(\"Error Logging into Parse\", \"Details: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\t\n\t\t});\n\t}", "private void login(Conversation conversation) {\n\t\tJsonObject lJsonObjIn = (JsonObject) conversation.getRequestBodyAsJSON();\n\t\t\n\t\tString lGebruikersnaam = lJsonObjIn.getString(\"username\");\t\t\t\t\t\t// Uitlezen van opgestuurde inloggegevens... \n\t\tString lWachtwoord = lJsonObjIn.getString(\"password\");\n\t\tMap<String, String> loginInfo = informatieSysteem.loginDetails(lGebruikersnaam,lWachtwoord);\n\n\t\tif(loginInfo.isEmpty())\n\t\t{\n\t\t\t//LOGIN FAILED !\n\t\t\tconversation.sendJSONMessage(\"{\\\"rol\\\":\\\"undefined\\\"}\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJsonObjectBuilder lJsonObjectBuilder = Json.createObjectBuilder();\n\t\t\tlJsonObjectBuilder.add(\"rol\", loginInfo.get(\"rol\"));\n\t\t\tlJsonObjectBuilder.add(\"voornaam\", loginInfo.get(\"voornaam\"));\n\t\t\tlJsonObjectBuilder.add(\"achternaam\", loginInfo.get(\"achternaam\"));\n\t\t\tlJsonObjectBuilder.add(\"identificatienummer\", loginInfo.get(\"identificatienummer\"));\t\t// en teruggekregen gebruikersrol als JSON-object...\n\t\t\tif(loginInfo.containsKey(\"group\")) lJsonObjectBuilder.add(\"group\", loginInfo.get(\"group\"));\n\t\t\tif(loginInfo.containsKey(\"klasnaam\")) lJsonObjectBuilder.add(\"klasnaam\", loginInfo.get(\"klasnaam\"));\n\t\t\tif(loginInfo.containsKey(\"klascode\")) lJsonObjectBuilder.add(\"klascode\", loginInfo.get(\"klascode\"));\n\t\t\tString lJsonOut = lJsonObjectBuilder.build().toString();\n\t\t\tconversation.sendJSONMessage(lJsonOut);\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t// terugsturen naar de Polymer-GUI!\n\t}", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mPasswordView.setError(null);\n usernameView.setError(null);\n\n // Store values at the time of the login attempt.\n String username = usernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n/*\nTODO: Move this to register area to see if email is a valid email address\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n */\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n //showProgress(true);\n HashMap<String, String> map = new HashMap<>();\n map.put(\"username\", username);\n map.put(\"pass\", password);\n mAuthTask = new httpUrlConn(map, \"http://hive.sewanee.edu/evansdb0/android1/scripts/hotPartyLogin.php\");\n\n mAuthTask.execute();\n\n try {\n if(mAuthTask.get().contains(\"true\")) {\n String r = mAuthTask.get().replace(\"true // \",\"\");\n Log.i(\"response\", r.toString());\n Toast.makeText(getApplicationContext(),r,Toast.LENGTH_SHORT).show();\n Intent i = new Intent(this, chooseEvent.class);\n i.putExtra(\"username\", username);\n startActivity(i);\n\n }\n else {\n String[] resp = response.split(\",\");\n // for(String i: resp)\n //Toast.makeText(getApplicationContext(),i,Toast.LENGTH_SHORT).show();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n\n if (mAuthTask == null || mAuthTask.getStatus().equals(AsyncTask.Status.FINISHED)) {\n mAuthTask = null;\n }\n }\n }", "private void login() {\n Log.d(Constants.TAG_LOGIN_ACTIVITY, \"login: \");\n\n // Store values at the time of the login attempt.\n mEmail = mEditTextSignInEmail.getText().toString();\n mPassword = mEditTextSignInPassword.getText().toString();\n mFocusView = null;\n\n // Check for a valid password\n if (TextUtils.isEmpty(mPassword) || !mPresenter.isPasswordValid(mPassword)) {\n mEditTextSignInPassword.setError(getString(R.string.error_invalid_password));\n mFocusView = mEditTextSignInPassword;\n isProcessCancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mEditTextSignInEmail.setError(getString(R.string.error_field_required));\n mFocusView = mEditTextSignInEmail;\n isProcessCancel = true;\n } else if (!mPresenter.isEmailValid(mEmail)) {\n mEditTextSignInEmail.setError(getString(R.string.error_invalid_email));\n mFocusView = mEditTextSignInEmail;\n isProcessCancel = true;\n }\n\n if (isProcessCancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n mFocusView.requestFocus();\n\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true, mLinearlayoutSignIn);\n mPresenter.loginTask(this, mAuth, mEmail, mPassword, new SignInCallback() {\n @Override\n public void onCompleted() {\n showProgress(false, mLinearlayoutSignIn);\n showUserInfoLog();\n transToShareBookActivity();\n }\n\n @Override\n public void onError(String errorMessage) {\n Log.d(Constants.TAG_LOGIN_ACTIVITY, \"onError: \" + errorMessage);\n\n showProgress(false, mLinearlayoutSignIn);\n mEditTextSignInEmail.setError(getString(R.string.error_login_fail));\n mFocusView = mEditTextSignInEmail;\n isProcessCancel = true;\n }\n });\n }\n }", "private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n \n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to perform the user login attempt.\n showProgress(true);\n\n // Register user to server.\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"userId\", email);\n params.put(\"gcmToken\", UserManager.getUserGcmToken(this));\n new HttpClientAsyncTask(Constants.APP_SERVER_USER_CREATE_URL, HttpClientCallable.POST, params) {\n @Override\n protected void onPostExecute(String response) {\n showProgress(false);\n\n try {\n if (response != null) {\n JSONObject responseObj = new JSONObject(response);\n Log.d(Constants.TAG, \"User login server response: \" + responseObj);\n String errorMsg = responseObj.getString(\"error\");\n if (errorMsg.isEmpty()) {\n UserManager.setUserLoggedIn(LoginActivity.this, true);\n UserManager.setUserId(LoginActivity.this, email);\n Log.d(Constants.TAG, \"Successfully logged in. Directing to MainActivity.\");\n startActivity(new Intent(LoginActivity.this, MainActivity.class));\n finish();\n } else {\n Toast.makeText(LoginActivity.this, \"Email registration was rejected.\", Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(LoginActivity.this, \"Server response was unexpected.\", Toast.LENGTH_LONG).show();\n }\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(Constants.TAG, e.getMessage());\n Toast.makeText(LoginActivity.this, \"Error while communicating with server.\", Toast.LENGTH_LONG).show();\n }\n }\n }.execute();\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n if(isOnline()){\n try {\n ApiRequests.POST(\"login/\", new Callback() {\n @Override\n public void onFailure(Call call, final IOException e) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Log.e(\"error:\", \"burda\");\n }\n });\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n\n try {\n processTheResponse(response.body().string());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, email, password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n else {\n InternetConnectionError();\n }\n }\n }", "private static String doLogin(Request req, Response res) {\n HashMap<String, String> respMap;\n \n res.type(Path.Web.JSON_TYPE);\n \n \n\t String email = Jsoup.parse(req.queryParams(\"email\")).text();\n \n logger.info(\"email from the client = \" + email);\n \n if(email != null && !email.isEmpty()) { \n \n\t server = new SRP6JavascriptServerSessionSHA256(CryptoParams.N_base10, CryptoParams.g_base10);\n\t \t\t\n\t gen = new ChallengeGen(email);\n\t\t\n\t respMap = gen.getChallenge(server);\n \n if(respMap != null) {\n\t\t logger.info(\"JSON RESP SENT TO CLIENT = \" + respMap.toString());\n res.status(200);\n respMap.put(\"code\", \"200\");\n respMap.put(\"status\", \"success\");\n return gson.toJson(respMap);\n }\n }\n respMap = new HashMap<>();\n \n res.status(401);\n respMap.put(\"status\", \"Invalid User Credentials\");\n respMap.put(\"code\", \"401\");\n logger.error(\"getChallenge() return null map most likely due to null B value and Invalid User Credentials\");\n \treturn gson.toJson(respMap);\n}", "private void userLogin() {\n String email = et_login_email.getText().toString().trim();\n String password = et_login_password.getText().toString().trim();\n\n if (email.isEmpty()) {\n et_login_email.setError(\"Please enter an email.\");\n et_login_email.requestFocus();\n return;\n }\n if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n et_login_email.setError(\"Please provide a valid e-mail address.\");\n et_login_email.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n et_login_password.setError(\"Please enter a password.\");\n et_login_password.requestFocus();\n return;\n }\n if (password.length() < 6) {\n et_login_password.setError(\"Password should be at least 6 characters.\");\n et_login_password.requestFocus();\n }\n\n // Sign in with Email and Password function for Firebase.\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull @NotNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LoginActivity.this, \"Logged in\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(LoginActivity.this, HomeMainActivity.class));\n } else {\n Toast.makeText(LoginActivity.this, \"Failed to login. Please re-check your login credentials.\", Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.GONE);\n }\n }\n });\n }", "@RequestMapping(value = \"/{username}/{password}\", method= RequestMethod.GET)\n @ResponseBody\n public ResponseEntity<HashMap<String,String>> login (@PathVariable(\"username\") String username,\n @PathVariable(\"password\") String password) throws ParseException {\n\n respMap = new HashMap<>();\n httpStatus = HttpStatus.OK;\n Timestamp startTime = getTimeStamp();\n User user = userRepo.findByEmailAddress(username);\n\n if (user != null) { // yes user with this username exists\n\n if (user.getPassword().equals(password)) {\n if ( user.getApproved()) {\n respMap.put(\"message\", user.getType() + \" User \" + user.getFirstname() + \" with id \" + user.getUserid() + \" is logged in!\");\n respMap.put(\"userType\", user.getType());\n\n respMap.put(\"name\", user.getFirstname());\n respMap.put(\"httpStatus\", \"\" + HttpStatus.OK);\n respMap.put(\"startTime\", \"\" + startTime);\n respMap.put(\"userId\", \"\" + user.getUserid());\n respMap.put(\"success\", \"\" + 1);\n } else {\n respMap.put( \"message\" , \"Account has not been approved .. check with Administrator\");\n respMap.put( \"success\" , \"0\");\n message = \"Account has not been approved .. check with Administrator\";\n }\n\n } else { // password incorrect\n respMap.put( \"message\" , \"Username : [\" + username + \"] or password : [\" + password + \"] incorrect\");\n respMap.put( \"success\" , \"0\");\n message = \"Username or password incorrect\";\n }\n } else { // username not found\n respMap.put( \"message\" , \"Username : [\" + username + \"] or password : [\" + password + \"] incorrect\");\n respMap.put( \"success\" , \"\"+0);\n respMap.put(\"httpStatus\", \"\"+ HttpStatus.OK);\n\n }\n\n\n\n return new ResponseEntity<>(respMap, httpStatus);\n }", "private void attemptLogin(){\n //reset error\n et_email.setError(null);\n et_password.setError(null);\n\n // Store values at the time of the login attempt.\n final String email = et_email.getText().toString();\n final String password = et_password.getText().toString();\n final boolean finish = false;\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n et_password.setError(getString(R.string.error_invalid_password));\n focusView = et_password;\n cancel = true;\n }else if (!isEmailValid(email)) {\n et_email.setError(getString(R.string.error_invalid_email));\n focusView = et_email;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n JSONObject json = new JSONObject();\n\n try {\n json.put(\"ctrl\", \"login\");\n json.put(\"email\", email);\n json.put(\"password\", password);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n String requete = json.toString();\n Log.v(\"req\", requete);\n HttpQuery login = new HttpQuery(requete, this);\n login.execute();\n }\n\n\n }", "private void checkLogin(final String em, final String pw) {\n // Tag used to cancel the request\n String tag_string_req = \"req_login\";\n\n pDialog.setMessage(\"Logging in ...\");\n showDialog();\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n AppConfig.URL_LOGIN, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"Login Response: \" + response);\n hideDialog();\n\n if (response.isEmpty() || response.equals(\"\")){\n Toast.makeText(getApplicationContext(), \" Server is currently unavailable. Please try again later!\",\n Toast.LENGTH_LONG).show();\n }else {\n try {\n JSONObject jObj = new JSONObject(response);\n boolean error = jObj.getBoolean(\"error\");\n\n // Check for error node in json\n if (!error) {\n // user successfully logged in\n // Create login session\n session.setLogin(true);\n\n // Now store the user in SQLite\n String uid = jObj.getString(\"uid\");\n\n JSONObject user = jObj.getJSONObject(\"user\");\n String name = user.getString(\"name\");\n String email = user.getString(\"email\");\n String address = user.getString(\"address\");\n String phone = user.getString(\"phone\");\n String created_at = user.getString(\"created_at\");\n\n // Inserting row in users table\n db.addUser(name, email, address, phone, uid, created_at);\n\n // Launch main activity\n Intent intent = new Intent(LoginActivity.this,\n MainActivity_.class);\n startActivity(intent);\n finish();\n } else {\n // Error in login. Get the error message\n String errorMsg = jObj.getString(\"error_msg\");\n Toast.makeText(getApplicationContext(),\n errorMsg, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Json error: \" + e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"Login Error: \" + error.getMessage());\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to login url\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"email\", em);\n params.put(\"password\", pw);\n\n return params;\n }\n\n };\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n }", "private void attemptLogin() {\n if (mAuth == null) {\n return;\n }\n showIndicator();\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n }\n\n // Check for nonempty password\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n mPasswordView.requestFocus();\n hideIndicator();\n return;\n }\n\n // TODO is it a good idea to move this to function? will it show in memory?????\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n hideIndicator();\n Intent intent = new Intent(LoginActivity.this, ItemListActivity.class);\n startActivity(intent);\n } else {\n hideIndicator();\n // show error\n Toast.makeText(LoginActivity.this, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\n public void onSuccess(LoginResult loginResult) {\n // App code\n GraphRequest request = GraphRequest.newMeRequest(\n loginResult.getAccessToken(),\n new GraphRequest.GraphJSONObjectCallback() {\n @Override\n public void onCompleted(JSONObject object, GraphResponse response) {\n Log.v(\"LoginActivity\", response.toString());\n\n // Application code\n try {\n doCheckExitingUser(object.getString(\"email\"), object.getString(\"name\"), object.getString(\"id\"), \"\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n });\n Bundle parameters = new Bundle();\n parameters.putString(\"fields\", \"id,name,email,gender,birthday\");\n request.setParameters(parameters);\n request.executeAsync();\n// Toaster.shortToast(\"On Success\" + loginResult.toString());\n }", "private void loginUser(final String email, final String password){\n String cancel_req_tag = \"login\";\n progressDialog.setMessage(\"Logging you in...\");\n showDialog();\n \n Map<String, String> params = new HashMap<>();\n params.put(\"email\", email);\n params.put(\"password\", password);\n \n JSONObject req = new JSONObject(params);\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL_FOR_LOGIN, req,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response){\n try{\n boolean error = response.getBoolean(\"error\");\n if(!error){\n Intent intent = new Intent(LoginActivity.this, UserActivity.class);\n String token = response.getString(\"token\");\n saveToken(getApplicationContext(), token);\n hideDialog();\n \n startActivity(intent);\n finish();\n } else {\n String error_msg = response.getString(\"error_msg\");\n Toast.makeText(getApplicationContext(), error_msg,Toast.LENGTH_LONG).show();\n hideDialog();\n }\n \n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener(){\n @Override\n public void onErrorResponse(VolleyError error){\n Toast.makeText(getApplicationContext(), \"An error occurred while logging in, please try again.\", Toast.LENGTH_LONG).show();\n error.printStackTrace();\n hideDialog();\n }\n });\n \n AppSingleton.getInstance(getApplicationContext()).addToRequestQueue(jsonObjectRequest, cancel_req_tag);\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n }\n else\n {\n\n // checks to see if the login was successful or not\n try\n {\n // server connection class will handle initiating the connection to the remote server\n ServerConnection loginConn = new ServerConnection(\"http://cop4331groupeight.com/androidlogin.php\");\n String resultString = loginConn.initialLogin(email, password);\n\n JSONArray resultJSON = new JSONArray(resultString);\n JSONObject jsonObj = resultJSON.getJSONObject(0);\n\n int userID = jsonObj.getInt(\"userID\");\n String userEmail = jsonObj.getString(\"email\");\n String pass = jsonObj.getString(\"pass\");\n String error = jsonObj.getString(\"error\");\n String profileLocation = jsonObj.getString(\"profileLocation\");\n String firstName = jsonObj.getString(\"firstName\");\n String lastName = jsonObj.getString(\"lastName\");\n boolean inChat = jsonObj.getBoolean(\"inChat\");\n String preference = jsonObj.getString(\"preference\");\n String about = jsonObj.getString(\"about\");\n\n // login attempt was successful and we should proceed to the next activity\n if(error.equals(\"None\"))\n {\n\n session.createLoginSession(userID, userEmail, pass, profileLocation, firstName, lastName, inChat, true, preference, about);\n\n // Staring MainActivity\n Intent i = new Intent(getApplicationContext(), MatchActivity.class);\n startActivity(i);\n finish();\n }\n else\n {\n Log.v(\"Error\", \"Unexpected error occurred when parsing data.\");\n }\n }\n // failed login attempt\n catch(JSONException | NullPointerException e)\n {\n // if the user isn't currently connected to the internet, this exception will be thrown\n if (e instanceof NullPointerException)\n {\n Toast.makeText(LoginActivity.this, \"Error Connecting to Internet. Check your connection settings.\", Toast.LENGTH_SHORT).show();\n }\n // otherwise, the user's credentials were invalid and they need to try again\n else\n {\n Toast.makeText(LoginActivity.this, \"Login failed\", Toast.LENGTH_SHORT).show();\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n mPasswordView.requestFocus();\n }\n\n }\n }\n }", "@OnClick(R.id.login_login_btn)\r\n protected void login(View view) {\n String username = StringsOperations.getTextFromEditText(mUsername);\r\n if (!GenericDialogs.isFieldValidAndShowValidMessage(username, R.string.validate_email, mContext)) {\r\n return;\r\n }\r\n\r\n String password = StringsOperations.getTextFromEditText(mPassword);\r\n if (!GenericDialogs.isFieldValidAndShowValidMessage(password, R.string.validate_password, mContext)) {\r\n return;\r\n }\r\n\r\n LoginDto loginDto = new LoginDto(username, password);\r\n mCustomProgressBar.showHideProgressBar(true, getString(R.string.loading_login));\r\n mLoginService.loginWithEmail(new ResponseCallBackHandler() {\r\n @Override\r\n public void returnResponse(ResponseHandler responseHandler) {\r\n mCustomProgressBar.showHideProgressBar(false, null);\r\n if (responseHandler.isExecuted()) {\r\n mUserSession.login((User) responseHandler.getValue());\r\n ChangeActivityHelper.changeActivityClearStack((Activity) mContext, HomeActivity.class, true);\r\n return;\r\n }\r\n\r\n // Not verified\r\n if (getString(R.string.email_not_verified).equalsIgnoreCase(responseHandler.getMessage())) {\r\n GenericDialogs.getGenericConfirmDialog(mContext, \"\", getString(R.string.login_service_failed),\r\n \"Verify Email\", GenericDialogs.OK, false, new GenericConfirmationDialogBoxCallback() {\r\n @Override\r\n public void PositiveMethod(DialogInterface dialog, int id) {\r\n Uri uri = Uri.parse(\"https://mysnsi.scubasnsi.com/verify-email\"); // missing 'http://' will cause crashed\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);\r\n startActivity(intent);\r\n dialog.dismiss();\r\n\r\n }\r\n\r\n @Override\r\n public void NegativeMethod(DialogInterface dialog, int id) {\r\n dialog.dismiss();\r\n }\r\n });\r\n } else {\r\n //Wrong username password\r\n GenericDialogs.showInformativeDialog(responseHandler.getMessage(), mContext);\r\n }\r\n\r\n }\r\n }, loginDto);\r\n\r\n }", "void successLogin();", "private void attemptLogin() {\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_email_is_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mPresenter.isEmailValid(email)) {\n //mEmailView.setError(getString(R.string.error_invalid_email));\n customConfirmDialog(getString(R.string.message_incorrect_email), getString(R.string.message_require_format_email));\n focusView = mEmailView;\n cancel = true;\n }else if (!TextUtils.isEmpty(password) && !mPresenter.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n //customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }else if(TextUtils.isEmpty(password))\n {\n customConfirmDialog(getString(R.string.message_incorrect_password), getString(R.string.message_please_insert_valid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n if (isNetworkOffline()) {\n return;\n }\n showLoadingDialog(getString(R.string.message_please_wait));\n mPresenter.doLoginByEmail(email, password);\n }\n }", "private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }", "private void checkLogin(final String email, final String password) {\n // Tag used to cancel the request\n String tag_string_req = \"req_login\";\n\n pDialog.setMessage(\"Logging in ...\");\n showDialog();\n\n String basicAuth = encodeHeaders(email, password);\n\n JsonObjectRequest strReq = new JsonObjectRequest(Method.POST,AppConfig.URL_SESSION,null,\n new Response.Listener<JSONObject>()\n {\n @Override\n public void onResponse(JSONObject response) {\n try{\n JSONObject user = response.getJSONObject(\"user\");\n String first_name = user.getString(\"first_name\");\n String last_name = user.getString(\"last_name\");\n String email = user.getString(\"email\");\n String session_token = response.getString(\"token\");\n String access_token = response.getString(\"access_token\");\n //String refresh_token = response.getString(\"refresh_token\");\n\n // Inserting add new row in SQLite for this user\n db.deleteUserData();\n User newUser = new User(first_name, last_name, email, session_token);\n newUser.setAccess_token(access_token);\n db.addUser(newUser);\n\n } catch (JSONException e){\n e.printStackTrace();\n }\n makeText(getApplicationContext(), \"User successfully logged in.\", LENGTH_LONG).show();\n session.setLogin(true);\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }\n },\n new Response.ErrorListener()\n {\n @Override\n public void onErrorResponse(VolleyError error){\n Log.e(TAG, \"Login Error: \" + error.getMessage());\n makeText(getApplicationContext(),\"No user found with corresponding credentials\", LENGTH_LONG).show();\n hideDialog();\n }\n }\n ){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> headers= new HashMap<>();\n headers.put(\"Accept\", \"application/json\");\n headers.put(\"Authorization\", \"Basic \" + basicAuth);\n Log.d(\"Auth Generated:\", \"Basic \" + basicAuth);\n return headers;\n }\n };\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void handleResponseAfterSignIn(int requestCode, int resultCode, Intent data) {\n IdpResponse response = IdpResponse.fromResultIntent(data);\n\n if (requestCode == RC_SIGN_IN) {\n if (resultCode == RESULT_OK) { // SUCCESS\n getUserInfoFromFirebaseAuth(); // Get user info from firebase auth\n\n WorkmateHelper.isWorkmateExist(task -> {\n if (task.isSuccessful()) { // they are document to parse\n for (QueryDocumentSnapshot document : task.getResult())\n if (document.getId().equals(mUserMailAddress)) { // Is the document exist we leave\n startActivity(new Intent(mContext, MainActivity.class)); // Start main activity if log succeed\n return;\n }\n WorkmateHelper.createWorkmate(mUserName, mUserProfilePicture, mUserMailAddress); // Create User on DB\n } else\n Log.d(\"tag\", \"Error getting documents: \", task.getException());\n\n startActivity(new Intent(mContext, MainActivity.class));\n });\n\n } else { // ERRORS\n if (response == null) {\n Toast.makeText(this,getString(R.string.error_authentication_canceled), Toast.LENGTH_LONG).show() ;\n logOut();\n } else if (Objects.requireNonNull(response.getError()).getErrorCode() == ErrorCodes.NO_NETWORK) {\n Toast.makeText(this,getString(R.string.error_no_internet), Toast.LENGTH_LONG).show() ;\n } else {\n Toast.makeText(this,getString(R.string.unknown_error), Toast.LENGTH_LONG).show() ;\n }\n }\n }\n }", "private void accountLogin() {\n String emailAddress = editTextEmailAddress.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n //validation for logging in.\n if(emailAddress.isEmpty()) {\n editTextEmailAddress.setError((\"No Email inputted \"));\n editTextEmailAddress.requestFocus();\n return;\n }\n if(!Patterns.EMAIL_ADDRESS.matcher(emailAddress).matches()) {\n editTextEmailAddress.setError(\"You must use a valid Email\");\n editTextEmailAddress.requestFocus();\n return;\n }\n if(password.isEmpty()) {\n editTextPassword.setError(\"You must enter your password!\");\n editTextPassword.requestFocus();\n return;\n }\n if(password.length() < 5) {\n editTextPassword.setError(\"Password length is a minimum of 5 characters\");\n editTextPassword.requestFocus();\n return;\n }\n progressBar.setVisibility((View.VISIBLE));\n mAuth.signInWithEmailAndPassword(emailAddress, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()) {\n //User is therefore redirected to the Identity page\n startActivity(new Intent(MainActivity.this, IdentityActivity.class));\n }else{\n Toast.makeText(MainActivity.this, \"Failed to login to account check credentials and try again...\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mUserNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String userName = mUserNameView.getText().toString();\n String password = mPasswordView.getText().toString();\n UserDetail user = new UserDetail(userName, password);\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n user = null;\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(userName)) {\n mUserNameView.setError(getString(R.string.error_field_required));\n focusView = mUserNameView;\n\n\n }\n else if(user!=null && isNetworkConnected()) {\n getPermissiontoAccessInternet();\n mAuthTask = new UserLoginTask(user);\n mAuthTask.execute((Void) null);\n\n }\n// } else if (!isUserNameValid(userName)) {\n// mUserNameView.setError(getString(R.string.error_invalid_email));\n// focusView = mUserNameView;\n// cancel = true;\n// }\n\n// if (cancel) {\n// // There was an error; don't attempt login and focus the first\n// // form field with an error.\n// focusView.requestFocus();\n// } else {\n// // Show a progress spinner, and kick off a background task to\n// // perform the user login attempt.\n//\n// }\n }", "private void login(final String email, final String password){\n String tag_string_req = \"req_login\";\n progressDialog.setMessage(\"Logging in...\");\n progressDialog.show();\n\n StringRequest strReq = new StringRequest(Request.Method.POST,\n Utils.LOGIN_URL, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"Login Response: \" + response.toString());\n\n try {\n JSONObject jObj = new JSONObject(response);\n boolean error = jObj.getBoolean(\"error\");\n\n // Check for error node in json\n if (!error) {\n // Now store the user in SQLite\n JSONObject user = jObj.getJSONObject(\"user\");\n String uName = user.getString(\"username\");\n String email = user.getString(\"name\");\n\n // Inserting row in users table\n userInfo.setEmail(email);\n userInfo.setUsername(uName);\n session.setLoggedin(true);\n\n startActivity(new Intent(Login.this, MainActivity.class));\n finish();\n } else {\n // Error in login. Get the error message\n String errorMsg = jObj.getString(\"error_msg\");\n toast(errorMsg);\n }\n } catch (JSONException e) {\n // JSON error\n e.printStackTrace();\n toast(\"Json error: \" + e.getMessage());\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"Login Error: \" + error.getMessage());\n toast(\"Unknown Error occurred\");\n progressDialog.hide();\n }\n\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting parameters to login url\n Map<String, String> params = new HashMap<>();\n params.put(\"email\", email);\n params.put(\"password\", password);\n\n return params;\n }\n\n };\n\n // Adding request to request queue\n // AndroidLoginController.getInstance().addToRequestQueue(strReq, tag_string_req);\n Volley.newRequestQueue(getApplicationContext()).add(strReq);\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.kkkkkkkkl[]/\\]\n\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n\n // Intent signInActivityIntent= new Intent(this,UserProfileActivity.class);\n // startActivity(signInActivityIntent);\n }\n }", "private void attemptLogin() {\n /* if (mAuthTask != null) {\n return;\n }\n*/\n // Reset errors.\n mEmailView.setError(null);\n editTextname.setError(null);\n\n pojo = new BusinessAccountPojo();\n // Store values at the time of the login attempt.\n pojo.email = mEmailView.getText().toString();\n pojo.name = editTextname.getText().toString();\n// pojo.phone_number = editTextPhone.getText().toString();\n// pojo.phone_number = String.valueOf(primaryNumber.getNationalNumber());\n\n\n String num = primaryNumber.getNumber();\n\n// String phone = primaryNumber.getNationalNumber();\n// primaryNumber.getNumber()\n\n pojo.category= etCategory.getText().toString();\n pojo.services = etService.getText().toString();\n pojo.keywords= etKeyword.getText().toString();\n pojo.address = etAddress.getText().toString();\n pojo.latitude = \"17.68\";\n pojo.longitude = \"83.21\";\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty( pojo.email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!pojo.email.matches(UtilsServer.EMAIL_PATTERN)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n\n\n if (TextUtils.isEmpty(pojo.name)) {\n editTextname.setError(getString(R.string.error_username));\n focusView = editTextname;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(num)) {\n primaryNumber.setError(getString(R.string.error_field_required));\n focusView = primaryNumber;\n cancel = true;\n\n\n }else if (!isValidPhonneNumber){\n cancel = true;\n primaryNumber.setError(getString(R.string.error_invalid_phone));\n focusView = primaryNumber;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(pojo.category)) {\n etCategory.setError(getString(R.string.error_field_required));\n focusView = etCategory;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(pojo.keywords)) {\n etKeyword.setError(getString(R.string.error_field_required));\n focusView = etKeyword;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(pojo.services)) {\n etService.setError(getString(R.string.error_field_required));\n focusView = etService;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(pojo.address)) {\n etAddress.setError(getString(R.string.error_field_required));\n focusView = etAddress;\n cancel = true;\n }\n\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n pojo.phone_number = num.substring(3);\n\n createBusinessAccount(pojo);\n\n\n // confirmOtp();\n// mAuthTask = new UserLoginTask(email, \"password\");\n// mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n // Reset errors.\n edtID.setError(null);\n edtPassword.setError(null);\n\n // Store values at the time of the login attempt.\n String userId = edtID.getText().toString();\n String password = edtPassword.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n edtPassword.setError(\"Password is empty\");\n focusView = edtPassword;\n cancel = true;\n } else if(!isPasswordValid(password)) {\n edtPassword.setError(getString(R.string.error_invalid_password));\n focusView = edtPassword;\n cancel = true;\n }\n\n // Check for a valid user id.\n if (TextUtils.isEmpty(userId)) {\n edtID.setError(getString(R.string.error_field_required));\n focusView = edtID;\n cancel = true;\n } else if (!isUserIdValid(userId)) {\n edtID.setError(getString(R.string.error_invalid_id));\n focusView = edtID;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n JSONObject json = new JSONObject();\n try {\n json.put(\"user_id\", userId);\n json.put(\"password\", password);\n } catch (Exception e) {\n e.printStackTrace();\n }\n reqUserID = userId;\n reqUserPW = password;\n loginConnector.request(json);\n }\n }", "public void login(String username, String password) {\n User user = new User(username, password);\r\n String paramBodyJsonStr = new Gson().toJson(user);\r\n Logger.d(\"paramBodyJsonStr=\" + paramBodyJsonStr);\r\n // handle login\r\n AndroidNetworking.post()\r\n .setContentType(\"application/json; charset=utf-8\")\r\n .setTag(this)\r\n .setUrl(Constants.URL_LOGIN)\r\n .build()\r\n .setApplicationJsonString(paramBodyJsonStr)\r\n .setAnalyticsListener(analyticsListener)\r\n .getAsJSONObject(new JSONObjectRequestListener() {\r\n @Override\r\n public void onResponse(JSONObject result) {\r\n Logger.d(\"response result=\" + result.toString());\r\n Result<LoggedInUser> defultResult = loginRepository.getDataSource().login(username, password);\r\n LoggedInUser data = ((Result.Success<LoggedInUser>) defultResult).getData();\r\n loginResult.setValue(new LoginResult(new LoggedInUserView(data.getDisplayName())));\r\n }\r\n\r\n @Override\r\n public void onError(ANError anError) {\r\n loginResult.setValue(new LoginResult(new Result.Error(anError)));\r\n Logger.d(\"anError=\" + anError.toString());\r\n if (!TextUtils.isEmpty(anError.getErrorDetail())) {\r\n Logger.d(\"getMessage=\" + anError.getMessage() + \" getErrorDetail=\" + anError.getErrorDetail());\r\n }\r\n }\r\n });\r\n\r\n }", "private void attemptLogin() {\n\n final String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n if (email.isEmpty())\n if (email.equals(\"\") || password.equals(\"\")) return;\n Toast.makeText(this, \"Login in progress...\", Toast.LENGTH_SHORT).show();\n\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n //Log.d(\"Memorization Game\", \"signInWithEmail() onComplete: \" + task.isSuccessful());\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }\n });\n\n\n }", "@FXML\n private void handleLoginAttempt() {\n\n if (isInputValid()) {\n String uname = userField.getText();\n if (Model.doesUsernameExist(uname)) {\n User user = Model.verifyLogin(uname, pwField.getText());\n\n if (user == null) {\n // uname exists but incorrect login\n user = UserInfoTable.getUserFromUserName(uname);\n _loginAuthenticated = false;\n user.setLockoutNum(user.getLockoutNum() + 1);\n Model.editUser(user);\n\n // increment incorrect login attempts, check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n } else {\n // uname exists and correct login\n // check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n user.setLockoutNum(0);\n Model.editUser(user);\n Model.setUser(user);\n _loginAuthenticated = true;\n app.showMainPage();\n return;\n }\n }\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Please Correct Invalid Fields \");\n alert.setHeaderText(\"Incorrect password and/or username\");\n\n alert.showAndWait();\n }\n }", "private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "public String quickLogin(String token, String email, String password, HttpServletRequest req, HttpServletResponse resp) {\r\n //1. user info\r\n List<String> data = new ArrayList<String>();\r\n log.info (\"[quickLogin] verify user: \" + token);\r\n String userInfo = \"\";\r\n if (token != null) {\r\n userInfo = this.userTokenVerify(token, req, resp);\r\n } else if (email != null || password != null) { \r\n userInfo = this.login(email, password, req, resp); \r\n } else {\r\n userInfo = this.guestRegister(req, resp);\r\n }\r\n if (this.getStatus(userInfo) != NnStatusCode.SUCCESS) {\r\n return userInfo;\r\n } \r\n String sphere = \"en\";\r\n Pattern pattern = Pattern.compile(\".*sphere\\t((en|zh)).*\", Pattern.DOTALL);\r\n Matcher matcher = pattern.matcher(userInfo);\r\n if (matcher.matches()) {\r\n sphere = matcher.group(1);\r\n } \r\n data.add(userInfo);\r\n //2. channel lineup\r\n log.info (\"[quickLogin] channel lineup: \" + token);\r\n String lineup = this.channelLineup(token, null, null, false, null, true, false, false, false, null, req);\r\n data.add(lineup);\r\n if (this.getStatus(lineup) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //3. featured curators\r\n log.info (\"[quickLogin] featured curators\");\r\n String curatorInfo = this.curator(null, null, \"featured\", req);\r\n data.add(curatorInfo);\r\n //4. trending\r\n log.info (\"[quickLogin] trending channels\");\r\n String trending = this.channelStack(Tag.TRENDING, sphere, token, null, false);\r\n data.add(trending);\r\n if (this.getStatus(trending) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //5. recommended\r\n log.info (\"[quickLogin] recommended channels\");\r\n String recommended = this.channelStack(Tag.RECOMMEND, sphere, token, null, false); \r\n data.add(recommended);\r\n if (this.getStatus(recommended) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //6. featured\r\n log.info (\"[quickLogin] featured channels\");\r\n String featured = this.channelStack(Tag.FEATURED, sphere, token, null, false);\r\n data.add(featured);\r\n if (this.getStatus(featured) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //7. hottest\r\n log.info (\"[quickLogin] hot channels\");\r\n String hot = this.channelStack(Tag.HOT, sphere, token, null, false);\r\n data.add(hot);\r\n if (this.getStatus(hot) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //8. category top level\r\n // log.info (\"[quickLogin] top level categories: \" + ((sphere == null) ? \"default\" : sphere));\r\n // hardcoding to English for now, and keeping translations on the player side\r\n log.info (\"[quickLogin] top level categories: en\");\r\n String categoryTop = this.category (null, \"en\", false);\r\n data.add(categoryTop);\r\n return this.assembleSections(data);\r\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailField.setError(null);\n mPasswordField.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordField.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordField;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailField.setError(getString(R.string.error_field_required));\n focusView = mEmailField;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailField.setError(getString(R.string.error_invalid_email));\n focusView = mEmailField;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n signIn(email, password);\n }\n }", "private void attemptLogin() {\n\n if (!Utils.isNetworkAvailable(mBaseActivity)) {\n Utils.showNetworkAlertDialog(mBaseActivity);\n return;\n }\n if (signInTask != null) {\n return;\n }\n\n // Reset errors.\n binding.email.setError(null);\n binding.password.setError(null);\n\n // Store values at the time of the login attempt.\n String email = binding.email.getText().toString();\n String password = binding.password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n binding.email.setError(getString(R.string.error_field_required));\n focusView = binding.email;\n cancel = true;\n } else if (TextUtils.isEmpty(password)) {\n binding.password.setError(getString(R.string.error_field_required));\n focusView = binding.password;\n cancel = true;\n } else if (!isEmailValid(email)) {\n binding.email.setError(getString(R.string.error_invalid_email));\n focusView = binding.email;\n cancel = true;\n } else if (!isPasswordValid(password)) {\n binding.password.setError(getString(R.string.error_invalid_password));\n focusView = binding.password;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // perform the user login attempt.\n signInTask = new AsyncTask(mBaseActivity);\n signInTask.execute(email, password);\n }\n }", "public void attemptLogin() {\n\n\t\t// Reset errors.\n\t\tmUserView.setError(null);\n\t\tmPasswordView.setError(null);\n\n\t\t// Save values.\n\t\tmUser = mUserView.getText().toString();\n\t\tmPassword = mPasswordView.getText().toString();\n\n\t\tboolean cancel = false;\n\t\tView focusView = null;\n\n\t\t// Check for a valid password.\n\t\tif (TextUtils.isEmpty(mPassword)) {\n\t\t\tmPasswordView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t} else if (mPassword.length() < 4) {\n\t\t\tmPasswordView.setError(getString(R.string.error_invalid_password));\n\t\t\tfocusView = mPasswordView;\n\t\t\tcancel = true;\n\t\t}\n\n\t\t// Check for a valid user.\n\t\tif (TextUtils.isEmpty(mUser)) {\n\t\t\tmUserView.setError(getString(R.string.error_field_required));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t} else if (mUser.length() < 4) {\n\t\t\tmUserView.setError(getString(R.string.error_invalid_user));\n\t\t\tfocusView = mUserView;\n\t\t\tcancel = true;\n\t\t}\n\t\t\t\t\n\t\tif (cancel) {\n\t\t\t// There is an error, so registration does not success and focus on the error.\n\t\t\tfocusView.requestFocus();\n\t\t} else {\n\t\t\t// Send information to server.\n\t\t\tmLoginStatusMessageView.setText(R.string.login_progress_registering);\n\t\t\tshowProgress(true);\n\t\t\tsendInfoToServer();\n\t\t}\n\t}", "public void onLogin(View view) {\n // get user mail and pwd\n\n HideSoftKeyboard();\n\n mUserMail = emailField.getEditableText().toString();\n\n if (utils.validateUserEmail(mUserMail)) {\n mUserPwd = passwordField.getEditableText().toString();\n\n if (utils.validateUserPwd(mUserPwd)) {\n\n // email & pwd are ok, proceed with service call\n new SendLoginDataToServer().execute();\n\n }else{\n showToast(\"Check your password , min 3 char \");\n }\n\n }else{\n showToast(\"Check your mail ID\");\n }\n\n }", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "public void onLogin(WsMessage.LoginMsg_Res msg) {\n if (msg != null) {\n if (msg.result == WsMessage.LoginResult.SUCCESS) {\n this.loginSuc = true;\n startWsHeartBeat();\n } else if (msg.result == WsMessage.LoginResult.FAIL_TOKEN) {\n this.loginSuc = false;\n stopWsHearBeat();\n EventManager.getInstance().post(5020, new EventChatTips(true, TVShowManager.getInstance().getI18NText(NTVDefine.KEY_CHAT_AUTHOR_FAIL)));\n } else if (msg.result == WsMessage.LoginResult.FAIL_ACCOUNT) {\n this.loginSuc = false;\n stopWsHearBeat();\n EventManager.getInstance().post(5020, new EventChatTips(true, TVShowManager.getInstance().getI18NText(NTVDefine.KEY_CHAT_SENDMSG_USER_DUPLICATE)));\n }\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !validateUtil.isPasswordValid(password)) {\n mPasswordView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!validateUtil.isEmailValid(email)) {\n mEmailView.setError(getString(net.iquesoft.android.seedprojectchat.R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n presenter.onLoginButtonClicked(mEmailView.getText().toString(), mPasswordView.getText().toString(), rememberPassword.isChecked(), (LoginActivity) getActivity(), updateCurentUser);\n }\n }", "public F.Promise<Result> handleSignIn() {\n final Form<LogIn> filledForm = logInForm.bindFromRequest();\n if (customerService().isLoggedIn()) {\n return asPromise(redirect(controllers.routes.HomeController.home()));\n } else if (filledForm.hasErrors()) {\n flash(\"error\", \"Login form contains missing or invalid data.\");\n return asPromise(badRequest(loginView.render(data().build(), filledForm)));\n } else {\n return handleSignInWithValidForm(filledForm);\n }\n }", "private static Object doAuth(Request req, Response res) {\n \n HashMap<String, String> response = new HashMap<>();\n\t\t \n String email = Jsoup.parse(req.queryParams(\"email\")).text();\n\t\t String password = Jsoup.parse(req.queryParams(\"password\")).text();\n\t\t\n res.type(Path.Web.JSON_TYPE);\n \t\t\n\t\t\n\t\tif(email != null && !email.isEmpty() && password != null && !password.isEmpty() ) {\n \n authenticate = new Authenticate(password);\n\t\t\t//note that the server obj has been created during call to login()\n\t\t\tString M2 = authenticate.getM2(server);\n\t\t\t\n if(M2 != null || !M2.isEmpty()) {\n \n \n\t\t\tSession session = req.session(true);\n\t\t\tsession.maxInactiveInterval(Path.Web.SESSION_TIMEOUT);\n\t\t\tUser user = UserController.getUserByEmail(email);\n\t\t\tsession.attribute(Path.Web.ATTR_USER_NAME, user.getUsername());\n session.attribute(Path.Web.ATTR_USER_ID, user.getId().toString()); //saves the id as String\n\t\t\tsession.attribute(Path.Web.AUTH_STATUS, authenticate.authenticated);\n\t\t\tsession.attribute(Path.Web.ATTR_EMAIL, user.getEmail());\n logger.info(user.toString() + \" Has Logged In Successfully\");\n \n response.put(\"M2\", M2);\n response.put(\"code\", \"200\");\n response.put(\"status\", \"success\");\n response.put(\"target\", Path.Web.DASHBOARD);\n \n String respjson = gson.toJson(response);\n logger.info(\"Final response sent By doAuth to client = \" + respjson);\n res.status(200);\n return respjson;\n }\n\t\t\t\t\n\t\t} \n \n res.status(401);\n response.put(\"code\", \"401\");\n response.put(\"status\", \"Error! Invalid Login Credentials\");\n \n return gson.toJson(response);\n }", "public void logIn(String email_address, String email_password)\r\n\t{ \r\n\t\ttry\r\n\t\t{\r\n\t\t\tString query = \"select count(*) as result from users where email_address = ? and email_password = ?\";\r\n\t\t\tpreparedStatement = connect.prepareStatement(query);\r\n\t\t\tpreparedStatement.setString(1, email_address);\r\n\t\t\tpreparedStatement.setString(2, email_password);\r\n\t\t\tresultSet = preparedStatement.executeQuery();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * the returned value of the query should be a boolean value since we are looking if the email address and password combination is correct\r\n\t\t\t * if the credentials are correct their inbox should show up\r\n\t\t\t * if not a warning message will appear informing the user that the email and/or password is incorrect\r\n\t\t\t */\r\n\t\t\tif(resultSet.next())\r\n\t\t\t{\r\n\t\t\t\tif(resultSet.getBoolean(\"result\") == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.email_address = email_address;\r\n\t\t\t\t\tLogIn.frame.dispose();\r\n\t\t\t\t\tLogIn.email = new msgBoxx();\r\n\t\t\t\t\tLogIn.email.testerMsg(email_address);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Incorrect email or password\", \"Error\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\t// testing done\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void attemptLogin() {\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !Utility_Helper.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utility_Helper.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n // if user flow not cancelled execute Simulate_Login_Task asyncronous task\n // to simulate login\n Simulate_Login_Task task = new Simulate_Login_Task(this, dummyList, email, password);\n task.setOnResultListener(asynResult);\n task.execute();\n }\n }", "public abstract User login(User data);", "public void loginUser() {\n \tString username = usernameField.getText().toString();\n \tString password = passwordField.getText().toString();\n \n \t// Validation part.\n \tString empty = \"\";\n \t// Check if username is empty.\n \tif(username.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a username.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t// Check if username contains othe characters.\n \tif(! Pattern.matches(\"[a-zA-Z]+\", username)) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Username can only contain alphabets\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n \t\n \t// Check if password is empty.\n \tif(password.isEmpty()) {\n \t\tToast toast = Toast.makeText(\n \t\t\tthis,\n \t\t\t\"Please enter a password.\",\n \t\t\tToast.LENGTH_LONG);\n \t\ttoast.show();\n \t\treturn;\n \t}\n\n \t\n \tArrayList<NameValuePair> userData = new ArrayList<NameValuePair>();\n \tuserData.add(new BasicNameValuePair(\"username\", username));\n \tuserData.add(new BasicNameValuePair(\"password\", password));\n \t\n \t// Now send the data to the login user task to\n \t// check if they are correct.\n \tnew AuthenticateUserTask(this, userData).execute();\n \t\n }", "private void loginUser() throws JSONException, UnsupportedEncodingException {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"username\", editUserName.getText().toString());\n jsonObject.put(\"password\", editPassword.getText().toString());\n jsonObject.put(\"DeviceID\", diviceToken);\n jsonObject.put(\"DevicePlatform\", devicePlatform);\n invokeLogin(jsonObject);\n\n\n }", "private void attemptLogin() {\n String email = text_email.getText().toString();\n String password = text_password.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n text_password.setError(getString(R.string.error_field_required));\n focusView = text_password;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n text_password.setError(getString(R.string.error_invalid_password));\n focusView = text_password;\n cancel = true;\n }\n\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n text_email.setError(getString(R.string.error_field_required));\n focusView = text_email;\n cancel = true;\n } else if (!isEmailValid(email)) {\n text_email.setError(getString(R.string.error_invalid_email));\n focusView = text_email;\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n //showProgress(true);\n login(USER_NORMAL);\n }\n }", "public abstract boolean login(String email, String passwaord) throws CouponSystemException;", "private void loginSuccess(String uname) {\n }", "private boolean loginAndStore(boolean isNewUser)\r\n {\n \r\n List<Pair<String, String>> requestHeaderProperties = new ArrayList<>(1);\r\n String encoding = Base64.getEncoder().encodeToString((usernameField.getText() + \":\" + passwordField.getText()).getBytes());\r\n requestHeaderProperties.add(new Pair<>(\"Authorization\", \"Basic \" + encoding));\r\n \r\n JsonElement jsonDataPacket = new ArborJsonRetriever().getResponseJson(girderBaseURL + \"user/authentication\", \"GET\", requestHeaderProperties);\r\n \r\n //System.out.println(jsonDataPacket);\r\n \r\n if (jsonDataPacket == null)\r\n {\r\n if (isNewUser)\r\n new Alert(Alert.AlertType.ERROR, \"Exceptional error: New user registration completed successfully, but login with the new credentials failed.\", ButtonType.OK).showAndWait();\r\n else\r\n new Alert(Alert.AlertType.ERROR, \"Login failed.\", ButtonType.OK).showAndWait();\r\n \r\n return false;\r\n }\r\n \r\n JsonObject jsonDataPacketObj = jsonDataPacket.getAsJsonObject();\r\n \r\n userInfo = new ArborUserInfo(\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"_id\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"login\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"firstName\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"lastName\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"email\").getAsString(),\r\n jsonDataPacketObj.get(\"authToken\").getAsJsonObject().get(\"token\").getAsString(),\r\n jsonDataPacketObj.get(\"authToken\").getAsJsonObject().get(\"expires\").getAsString());\r\n \r\n if (isNewUser)\r\n new Alert(Alert.AlertType.CONFIRMATION, \"Account created! Welcome, \" + userInfo.getFirstName() + \"!\", ButtonType.OK).showAndWait();\r\n else\r\n new Alert(Alert.AlertType.CONFIRMATION, \"Login successful! Welcome, \" + userInfo.getFirstName() + \"!\", ButtonType.OK).showAndWait();\r\n \r\n return true;\r\n }", "String signIn(String userName, String password) throws UserNotFoundException;", "private void userLogin() {\n String email = editTextEmail.getText().toString().trim();\n String password = editTextPassword.getText().toString().trim();\n\n if(email.isEmpty()) {\n editTextEmail.setError(\"Email is required!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()){\n editTextEmail.setError(\"Please enter a valid email!\");\n editTextEmail.requestFocus();\n return;\n }\n\n if(password.isEmpty()){\n editTextPassword.setError(\"Password is required!\");\n editTextPassword.requestFocus();\n return;\n }\n\n if(password.length() < 6) {\n editTextPassword.setError(\"Min password length is 6 characters!\");\n editTextPassword.requestFocus();\n return;\n }\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if(user.isEmailVerified()) {\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else{\n user.sendEmailVerification();\n Toast.makeText(LoginActivity.this, \"Check your email to verify your account!\",\n Toast.LENGTH_LONG).show();\n }\n } else {\n Toast.makeText(LoginActivity.this, \"Failed to login! Please check your credentials\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n\n\n\n\n }", "public void authenticate(View view) {\n String email = email_tf.getText().toString();\n String password = password_tf.getText().toString();\n\n // validating if email and password has been entered in the required data fields\n if (!validateInputs(email, password))\n return;\n\n Log.d(TAG, \"loginAccount:\" + email);\n\n // creating instance of prompt for showing prompts to user\n final Prompt prompt = new Prompt(this);\n\n // prompt user for login in\n prompt.showProgress(\"Sign In\", \"Login in...\");\n\n // authenticating email and password\n FirebaseController.getAuthInstance().signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n prompt.hideProgress();\n\n // if login was successful\n if (task.isSuccessful()) {\n Log.d(TAG, \"loginWithEmail:success\");\n\n // show short wait prompt for login successful\n prompt.showSuccessMessagePrompt(\"Login successful\");\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_SHORT, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n\n // starting main activity\n startActivity(new Intent(EmailLoginActivity.this, MainActivity.class)\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));\n\n // finishing this email login activity\n EmailLoginActivity.this.finish();\n }\n }\n );\n }\n\n // if login was not successful\n else {\n Log.w(TAG, \"loginWithEmail:failure\", task.getException());\n\n // show long wait prompt to user about login failure and provide the reason\n prompt.showFailureMessagePrompt(\"Login not successful\\n\" + Objects.requireNonNull(task.getException()).getMessage());\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_LONG, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n }\n });\n }\n }\n });\n }", "@Override\n public void run() {\n String email = etEditMail.getText().toString(); // get email\n String password = etEditPassword.getText().toString(); // get password\n String loginTime = LOGIN_TIME_FORMAT.format(new Date());\n String md5Password = AppUtils.md5PasswordLogin(password, loginTime); // encode password\n // create credential object\n Credential credential = new Credential(email, md5Password, loginTime);\n // perform send credential\n DataExchange login = new DataExchange();\n String responseLoginFormatString = login.sendCredential(credential.exportStringFormatJson());\n final LoginResponse loginResponse = new LoginResponse(responseLoginFormatString);\n loginResponse.analysis();\n if (loginResponse.getSuccess()) {\n Hawk.put(Constants.Password, AppUtils.md5PasswordRegister(password)); // save password\n // perform get user' profile\n DataExchange getUserProfile = new DataExchange();\n String userProfileResponse = getUserProfile.getUserProfile(loginResponse.getToken()); // get token\n GetProfileResponse userProfile = new GetProfileResponse(userProfileResponse);\n userProfile.analysis();\n // save user's profile\n mLastUser = userProfile.getMobileUser();\n mLastUser.setLastLogin(System.currentTimeMillis());\n mLastUser.setToken(loginResponse.getToken()); // save token\n Hawk.put(email, mLastUser);\n Hawk.put(LAST_USER, mLastUser);\n // switch to the main screen\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(intent);\n } else {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), loginResponse.getMessage() , Toast.LENGTH_LONG).show();\n }\n });\n progressDialog.dismiss();\n }\n }", "private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }", "public void attemptLogin() {\n\n\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n mEmail = mEmailView.getText().toString();\n mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (mPassword.length() < 4) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!mEmail.contains(\"@\")) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n showProgress(true);\n mAuthTask = new UserLoginTask();\n mAuthTask.execute((Void) null);\n }\n }", "@Override\n public void login(String nome, String email, int senha) {\n if (getNome() == nome && this.getEmail() == email && this.getSenha() == senha){\n System.out.println(\"Login efetuado com sucesso\");\n } else {\n System.out.println(\"0 - Sair\");\n System.out.println(\"Saiu do usuario\");\n }\n\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n boolean newUser = false;\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password) || !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n } else {\n user = mDatabaseHelper.getUser(email);\n if (user.getPassword() != null) {\n if (!PasswordHash.checkHashEquality(user.getPassword(), password)) {\n mPasswordView.setError(getString(R.string.error_incorrect_password));\n focusView = mPasswordView;\n cancel = true;\n }\n } else {\n newUser = true;\n }\n }\n\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n user = mDatabaseHelper.getUser(email);\n if (newUser) {\n Toast.makeText(this, \"New Account Created!\", Toast.LENGTH_SHORT).show();\n }\n Intent intent = new Intent(LoginActivity.this, ListActivity.class);\n intent.putExtra(\"User\", user);\n intent.putExtra(\"Target\", \"Locked\");\n startActivityForResult(intent, 0);\n }\n }", "private void attemptLogin() {\n\n // Reset errors.\n trylogin = false;\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n if(email.equals(null) || password.equals(null)) {\n mPasswordView.setError(\"Invalid Password\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(\"Please enter something\");\n focusView = mEmailView;\n cancel = true;\n }\n\n else if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(\"Please enter something\");\n focusView = mPasswordView;\n cancel = true;\n }\n\n else if (!isEmailValid(email)) {\n mEmailView.setError(\"Invalid Email\");\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n\n dialog.setMessage(\"Registering user...\");\n dialog.show();\n\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(MainActivity.this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n dialog.hide();\n if(task.isSuccessful()) {\n //trylogin = true;\n Toast.makeText(MainActivity.this, \"Login Successful!\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(MainActivity.this, FoodActivity.class);\n startActivity(i);\n }\n else {\n Toast.makeText(MainActivity.this, \"Login Failed!\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n }", "public void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_user));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n\n // save data in local shared preferences\n if (savePassword.isChecked()) {\n saveLoginDetails(email, password);\n }\n\n\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password);\n mAuthTask.execute((Void) null);\n }\n }", "private void userLogin() {\n mLoginButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String email = mEditTextEmail.getText().toString().trim();\n String password = mEditTextPassword.getText().toString().trim();\n\n if (email.isEmpty()) {\n mEditTextEmail.setError(\"Email is required\");\n mEditTextEmail.requestFocus();\n return;\n }\n\n if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n mEditTextEmail.setError(\"Please enter a valid email\");\n mEditTextEmail.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n mEditTextPassword.setError(\"Password is required\");\n mEditTextPassword.requestFocus();\n return;\n }\n\n if (password.length() < 6) {\n mEditTextPassword.setError(\"Minimum length of password should be 6\");\n mEditTextPassword.requestFocus();\n return;\n }\n if (mRememberCheckBox.isChecked()) {\n mPrefs.edit().putBoolean(\"rememberMe\", true).apply();\n mPrefs.edit().putString(\"rememberedEmail\", email).apply();\n mPrefs.edit().putString(\"rememberedPass\", password).apply();\n } else if (!mRememberCheckBox.isChecked()) {\n mPrefs.edit().putBoolean(\"rememberMe\", false).apply();\n }\n mProgressBar.setVisibility(View.VISIBLE);\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n mProgressBar.setVisibility(View.GONE);\n if (task.isSuccessful()) {\n if (mAuth.getCurrentUser().isEmailVerified()) {\n Intent mainMenu = new Intent(LoginActivity.this, MainMenu.class);\n startActivity(mainMenu);\n finish();\n } else {\n Toast.makeText(LoginActivity.this, \"Your email is not verified. Please go to your email to verify it.\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n Toast.makeText(LoginActivity.this, \"Invalid details or no connection. Please Try Again\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n });\n }", "public static void signIn(String username, String password, final Context context, final OnLoginListener onLoginListener)\n {\n HttpClientHelper client = new HttpClientHelper(Endpoints.User.login, context);\n\n client.addParamForPost(\"api_type\", \"json\");\n client.addParamForPost(\"user\", username);\n client.addParamForPost(\"passwd\", password);\n client.addParamForPost(\"rem\", String.valueOf(true));\n\n Network.newRequest(client, Network.POST, Network.WITHOUT_COOKIE, new Delegate()\n {\n @Override\n public void requestResults(Network.Status status)\n {\n User user = null;\n boolean err = false;\n\n if(status.hasInternet)\n {\n if(status.response.getStatusLine().getStatusCode() == 200\n || status.response.getStatusLine().getStatusCode() == 409)\n {\n try\n {\n JSONObject values = (JSONObject) ((JSONObject) status.result.get(\"json\")).get(\"data\");\n String cookie = values.getString(\"cookie\");\n\n status.httpClientHelper.setCookie(cookie, context);\n\n getMe(context, onLoginListener);\n }\n catch (JSONException e)\n {\n err = true;\n onLoginListener.onLogin(user, status, err);\n }\n }\n else\n {\n err = true;\n onLoginListener.onLogin(user, status, err);\n }\n }\n else\n {\n onLoginListener.onLogin(user, status, err);\n }\n }\n });\n }", "private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mEmailView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n //检测密码\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(\"请输入密码\");\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\r\n mPasswordView.setError(getString(R.string.error_invalid_password));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n\r\n SqlEngine sqlEngine = SqlEngine.getInstance(this);\r\n ArrayList<UserBean> list = sqlEngine.queryInfo();\r\n if (list.size() <= 0) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n for (int i = 0; i < list.size(); i++) {\r\n UserBean bean = list.get(i);\r\n Log.i(TAG, \"attemptLogin: 执行到此\");\r\n if (!bean.getUser().equals(email)) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n if (!bean.getPwd().equals(password)) {\r\n Toast.makeText(this, \"密码不正确\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n }\r\n\r\n String ip = (String) SpUtils.getValues(MyApplication.getContext(), Https.IP_ADDRESS, \"\");\r\n String port = (String) SpUtils.getValues(MyApplication.getContext(), Https.PORT, \"\");\r\n if (TextUtils.isEmpty(ip) || TextUtils.isEmpty(port)) {\r\n Toast.makeText(this, \"请先设置网络!\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // 显示一个进度微调,并启动一个后台任务\r\n // 执行用户登录尝试。\r\n showProgress(true);\r\n //判断是否勾选\r\n isCheckBox(email, password);\r\n mAuthTask = new UserLoginTask(email, password);\r\n mAuthTask.execute((Void) null);\r\n startActivity(new Intent(this, MainActivity.class));\r\n\r\n }\r\n }", "void loginDone();", "private void signInResultHandler(GoogleSignInResult result) {\n if (result.isSuccess()) {\n acct = result.getSignInAccount();\n m_tvStatus.setText(R.string.status_signedin);\n try {\n m_tvDispName.setText(acct.getDisplayName());\n m_tvEmail.setText(acct.getEmail());\n }\n catch (NullPointerException e) {\n Log.d(TAG, \"Error retrieving some account information\");\n Toast.makeText(MainActivity.this, \"Oops! Please double check your account info.\", Toast.LENGTH_SHORT).show();\n }\n\n checkAGWALoginStatus(acct);\n Account_Email = acct.getEmail();\n\n }\n else {\n Status status = result.getStatus();\n int statusCode = status.getStatusCode();\n\n // Constant Value: 12501 (API)\n if (statusCode == GoogleSignInStatusCodes.SIGN_IN_CANCELLED) {\n m_tvStatus.setText(R.string.status_signincancelled);\n }\n\n // Constant Value: 12500 (API)\n else if (statusCode == GoogleSignInStatusCodes.SIGN_IN_FAILED) {\n m_tvStatus.setText(R.string.status_signinfail);\n }\n else {\n m_tvStatus.setText(R.string.status_nullresult);\n }\n }\n }", "public void onLoginClick()\n {\n user.setEmail(email.getValue());\n user.setPassword(password.getValue());\n\n if(!user.isValidEmail())\n {\n Toast.makeText(context, \"Invalid Email\", Toast.LENGTH_SHORT).show();\n }\n\n else if(!user.isValidPassword())\n {\n Toast.makeText(context, \"Password Should be Minimum 6 Characters\", Toast.LENGTH_SHORT).show();\n }\n\n else if(user.isValidCredential())\n {\n getBusy().setValue(View.VISIBLE);\n\n doLogin(user.getEmail(),user.getPassword());\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run()\n {\n getBusy().setValue(View.GONE);\n\n // Toast.makeText(context, \"Login Successful\", Toast.LENGTH_SHORT).show();\n /* Intent intent = new Intent(context, NewsActivity.class);\n intent.putExtra(\"USER_OBJ\", user);\n context.startActivity(intent);\n */\n\n\n }\n }, 500);\n }\n\n else\n {\n Toast.makeText(context, \"Invalid Credentials\", Toast.LENGTH_SHORT).show();\n }\n }", "private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }", "private void attemptLogin() {\n if (authTask != null) {\n return;\n }\n\n // Reset errors.\n usernameView.setError(null);\n passwordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = usernameView.getText().toString();\n String password = passwordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n passwordView.setError(getString(R.string.error_invalid_password));\n focusView = passwordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n usernameView.setError(getString(R.string.error_field_required));\n focusView = usernameView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n usernameView.setError(getString(R.string.error_invalid_email));\n focusView = usernameView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n\n //set loginID for session\n session.setID(email);\n\n startDashboard();\n /*authTask = new UserLoginTask(email, password);\n authTask.execute((Void) null);*/\n }\n }", "public String login(String receivedData) \n\t{\n\t\tString response = null;\n\t\tUser user = gson.fromJson(receivedData, User.class);\n\t\tUser loggedUser = userDao.findByUsernameAndPassword(user.getUsername(), user.getPassword());\n\t\t\n\t\tif (loggedUser != null)\n\t\t{\n\t\t\tresponse = gson.toJson(loggedUser);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse = \"Fail\";\n\t\t}\n\n\t\treturn response;\n\t}", "void attemptLogin(AlertDialog loginAlertDialog) {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n mEmail = mUsernameView.getText().toString();\n mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (mPassword.length() < 4) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mEmail)) {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n//\t\telse if (!mEmail.contains(\"@\")) {\n// mUsernameView.setError(getString(R.string.error_invalid_email));\n//\t\t\tfocusView = mUsernameView;\n//\t\t\tcancel = true;\n//\t\t}\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n mLoginStatusMessageView.setText(R.string.login_progress_signing_in);\n showLoginProgress(true);\n mAuthTask = new UserLoginTask();\n mAuthTask.execute(loginAlertDialog);\n }\n\n }", "private void signIn(){\n // get text and email strings from fields\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n if(TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) { // is pass/user empty?\n // if so alert user via toast\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.empty_field_error)\n , Toast.LENGTH_LONG).show();\n }\n\n else { // else sign in via auth\n mFirebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(\n new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n // alert user on complete if combination is wrong\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\n }\n });\n }\n }\n });\n }\n }", "private void attemptLogin() {\n if (isLoggingIn) {\n return;\n }\n\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!Utils.isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n } else if (!Utils.isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n if (!HttpUtils.isNetworkAvailable(this.getApplicationContext())) {\n Toast.makeText(this.getApplicationContext(), \"No internet\", Toast.LENGTH_SHORT).show();\n cancel = true;\n }\n\n if (cancel) {\n focusView.requestFocus();\n } else {\n InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(mPasswordView.getWindowToken(), 0);\n\n LoginApi.executeLogin(this, email, password);\n }\n }", "private void attemptLogin() {\n\n String username = mEmailView.getText().toString().trim();\n String idNumber = mIdNumber.getText().toString().trim();\n String password = mPasswordView.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n// usernameView.setError(errorMessageUsernameRequired);\n// errorView = usernameView;\n }\n\n if (TextUtils.isEmpty(password)) {\n// password.setError(errorMessagePasswordRequired);\n// if (errorView == null) {\n// errorView = passwordView;\n// }\n }\n\n final User user = new User();\n ((DealerManager)getApplication()).setUser(user);\n navigateTo(R.id.nav_home);\n }", "private void authSignInResult() {\n userEmail = sharedPreferences.getString(getString(R.string.shared_prefs_key_email), \"\");\n rref.orderByChild(getString(R.string.firebase_key_email)).equalTo(userEmail).addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot appleSnapshot : dataSnapshot.getChildren()) {\n\n member = appleSnapshot.getValue(Member.class);\n String loginType = member.getLoginType().trim();\n if (loginType.equals(getString(R.string.login_type_auth))) {\n String key = appleSnapshot.getKey();\n editor.putString(getString(R.string.shared_prefs_key_firebasekey), key);\n firebaseKey = key;\n getUserDetailsFromFirebase();\n userName = member.getUsername();\n String userPhotoUrlString = member.getPhotoUrl();\n editor.putString(getString(R.string.shared_prefs_key_user_photo_url), userPhotoUrlString);\n editor.putString(getString(R.string.shared_prefs_key_username), userName);\n editor.apply();\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n }\n );\n }", "@Override\n public void onLogin(String userName, String userPassword)\n {\n User user=new User();\n\n if(user.getuserName().equals(userName) && user.getPassword().equals(userPassword))\n {\n mainView.onLoginResult(\"Successfully Logged In\");\n }\n else\n {\n mainView.onLoginResult(\"Failed to Log In\");\n }\n\n }", "boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);", "private void attemptLogin() {\n\n char ch;\n boolean hasUppercase = false;\n boolean hasLowercase = false;\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String firstname = mFirstNameView.getText().toString();\n String lastname = mLastNameView.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String passwordconfirm = mPasswordConfirmView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid first name.\n if (TextUtils.isEmpty(firstname)) {\n mFirstNameView.setError(getString(R.string.error_field_required));\n focusView = mFirstNameView;\n cancel = true;\n }\n\n // Check for a valid last name.\n if (TextUtils.isEmpty(lastname)) {\n mLastNameView.setError(getString(R.string.error_field_required));\n focusView = mLastNameView;\n cancel = true;\n }\n\n // Check if password field is empty.\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_field_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n //Check if the second input password is empty\n if (TextUtils.isEmpty(passwordconfirm)) {\n mPasswordConfirmView.setError(\"This field is required!\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && password.length() < 7) {\n mPasswordView.setError(getString(R.string.error_short_password));\n focusView = mPasswordView;\n cancel = true;\n }\n if (!isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check if both of the entered passwords are equal\n if (!Objects.equals(password, passwordconfirm)) {\n mPasswordConfirmView.setError(\"Your Passwords do not match\");\n focusView = mPasswordConfirmView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n if (isNetworkAvailable()) {\n View view = this.getCurrentFocus();\n InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n Bundle args = new Bundle();\n args.putString(IHC_FIRSTNAME_KEY, firstname);\n args.putString(IHC_LASTNAME_KEY, lastname);\n args.putString(IHC_EMAIL_KEY, email);\n args.putString(IHC_PASSWORD_KEY, password);\n getSupportLoaderManager().initLoader(IHC_NONSTUDENT_SIGNUP_LOADER_ID, args, this);\n //new SignupAuthProcess(this).execute(firstname, lastname, email, password);\n }\n else {\n showNoInternetConnectionMsg();\n }\n }\n }", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "public JSONObject signUp(JSONObject message, Connection conn) {\n\t\t//JSONObject response = new JSONObject();\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = null;\n\t\t\tString signupemail = (String) message.get(\"email\");\n\t\t\tif (signupemail.length() > 0) {\n\t\t\t\trs = st.executeQuery(\"SELECT * from TotalUsers\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tif (rs.getString(\"Email\").equals(signupemail)) {\n\t\t\t\t\t\tresponse = getData(conn, rs.getInt(\"userID\"));\n\t\t\t\t\t\tresponse.put(\"message\", \"signupfail\");\n\t\t\t\t\t\tresponse.put(\"signupfail\", \"Account already exists.\");\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t\t//return failed sign up message\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString signupfirstname = message.getString(\"firstname\");\n\t\t\t\tString signuplastname = message.getString(\"lastname\");\n\t\t\t\tString signuppassword = (String)message.get(\"password\");\n\t\t\t\tsignuppassword.replaceAll(\"\\\\s+\",\"\");\n\t\t\t\t\n\t\t\t\tint s = hash(signuppassword);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif (signupfirstname.equals(\"\") || signuplastname.equals(\"\") || signuppassword.equals(\"\") || signupemail.equals(\"\")) {\n\t\t\t\t\tresponse.put(\"message\", \"signupfail\");\n\t\t\t\t\tresponse.put(\"signupfail\", \"Please fill in all of the fields.\");\n\t\t\t\t\treturn response;\n\t\t\t\t\t//return failed sign up message\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t//Account has successful inputs and is now entered into the database.\n\t\t\t\t\n\t\t\t\tString addUser = \"('\" + signupfirstname + \"', '\" + signuplastname + \"', \" + s + \", '\" + signupemail + \"')\";\n//\t\t\t\tString addUser = \"('\" + signupfirstname + \"', '\" + signuplastname + \"', \" + signuppassword + \"', '\" + signupemail + \"')\";\n\t\t\t\tst.execute(Constants.SQL_INSERT_USER + addUser + \";\");\n\t\t\t\tResultSet rs3 = st.executeQuery(\"SELECT * FROM TotalUsers WHERE Email='\" + signupemail + \"';\");\n\t\t\t\t\n\n\t\t\t\tif (rs3.next()) {\n\t\t\t\t\tint id = rs3.getInt(\"userID\");\n\t\t\t\t\tStatement st1 = conn.createStatement();\n\t\t\t\t\t\n\t\t\t\t\tDateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\");\t\t\t\n\t\t\t\t\tDate date = new Date();\n\t\t\t\t\tString newDate = df.format(date);\n\t\t\t\t\tSystem.out.println(newDate);\n\t\t\t\t\t\n\t\t\t\t\tString addBigBudget = \"(\" + id + \", 'Annual Savings', 1, 0, 0, 0, 0, 365, '\" + newDate + \"', 365, '', '', '50');\";\n\t\t\t\t\tst1.execute(Constants.SQL_INSERT_BIGBUDGET + addBigBudget);\n\t\t\t\t\tresponse = getData(conn, id);\n\t\t\t\t\tresponse.put(\"userID\", id);\n\t\t\t\t}\n//\t\t\t\temailSessions.put(signupemail, session);\n\t\t\t\tresponse.put(\"message\", \"signupsuccess\");\n\t\t\t\tresponse.put(\"signupsuccess\", \"Account was made.\");\n\t\t\t\tresponse.put(\"email\", signupemail);\n\t\t\t\tresponse.put(\"firstName\", signupfirstname);\n\t\t\t\tresponse.put(\"lastName\", signuplastname);\n\t\t\t\t\n\t\t\t\treturn response;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresponse.put(\"message\", \"signupfail\");\n\t\t\t\tresponse.put(\"signupfail\", \"Please enter an email.\");\n\t\t\t\treturn response;\n\t\t\t\t//return failed sign up message\n\t\t\t}\n\t\t} catch (SQLException sqle) {\n\t\t\ttry {\n\t\t\t\tsqle.printStackTrace();\n\t\t\t\tresponse.put(\"message\", \"signupfail\");\n\t\t\t\tresponse.put(\"signupfail\", \"Sign up failed.\");\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn response;\n\t } catch (JSONException e1) {\n\t\t\te1.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\r\n\tpublic Map<Boolean, String> login(String email, String pwd) {\r\n\t\tlogger.debug(\"**AdminService: login() method started**\");\r\n\t\tMap<Boolean, String> result = new HashMap<>();\r\n\t\t// calling findByEmail() method to get Entity obj\r\n\t\tAppAccountEntity entity = appAccRepository.findByEmail(email);\r\n\r\n\t\t// checking entity whether with that email any record found or not\r\n\t\tif (entity != null) {\r\n\t\t\t// check password by decrypting it\r\n\t\t\tString decrptPass = PasswordUtils.decrypt(entity.getPassword());\r\n\r\n\t\t\tif (pwd.equals(decrptPass)) {\r\n\t\t\t\tif (entity.getActiveSw().equals(AppConstants.ACTIVE_SW)) {\r\n\t\t\t\t\tif (entity.getRole().equals(AppConstants.ADMIN)) {\r\n\t\t\t\t\t\t// returning login flag as true and result message as admin\r\n\t\t\t\t\t\tresult.put(true, AppConstants.ADMIN);\r\n\t\t\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\t\t\tlogger.info(\"**AdminService: login success with admin\");\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// returning login flag as true and result message as caseWorker\r\n\t\t\t\t\t\tresult.put(true, AppConstants.CASE_WORKER);\r\n\t\t\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\t\t\tlogger.info(\"**AdminService: login success with caseworker\");\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// returning login flag as false and result message as Account is not Active,\r\n\t\t\t\t\t// For Query Contact IES Admin\r\n\t\t\t\t\tresult.put(false, AppConstants.ACCOUNT_DE_ACTIVATE_MSG);\r\n\t\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\t\tlogger.info(\"**AdminService: login failure account deactive\");\r\n\t\t\t\t\treturn result;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// returning login flag as false and result message as Invalid Credentials\r\n\t\t\t\tresult.put(false, AppConstants.INVALID_CREDENTIALS);\r\n\t\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\t\tlogger.info(\"**AdminService: login failure invalid credential\");\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// returning login flag as false and result message as Invalid Credentials\r\n\t\t\tresult.put(false, AppConstants.INVALID_CREDENTIALS);\r\n\t\t\tlogger.debug(\"**AdminService: login() method ended**\");\r\n\t\t\tlogger.info(\"**AdminService: login failure invalid credential\");\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}", "private void login() {\n RegistrationRequests.LoginModel loginModel = new RegistrationRequests.LoginModel(\n edtEmail.getText().toString(), edtPaswd.getText().toString(), true);\n\n final Context context = this;\n Response.Listener<RegistrationRequests.LoginApiResponse> responseListener = new Response.Listener<RegistrationRequests.LoginApiResponse>() {\n @Override\n public void onResponse(RegistrationRequests.LoginApiResponse response) {\n Log.d(TAG, \"login: \" + response.toString());\n if (response.getId() != 0) {\n Accounts.checkNewAccount(context, response.getId());\n //stores JWT token\n PrefUtil.putString(context, AppConstants.SESSION_TOKEN, response.getSessionToken());\n PrefUtil.putInt(context, AppConstants.USER_ID, response.getId());\n PrefUtil.putString(context, AppConstants.USER_NAME, response.getUsername());\n PrefUtil.putLong(context, AppConstants.LAST_LOGIN_DATE, Calendar.getInstance().getTimeInMillis());\n addToUsers(response.getId(), edtDisplayName.getText().toString());\n }\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String err = (error.getMessage() == null) ? \"error message null\" : error.getMessage();\n Log.d(TAG, err);\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n };\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests loginRequest =\n RegistrationRequests.login(this, loginModel, responseListener, errorListener);\n if (loginRequest != null) loginRequest.setTag(CANCEL_TAG);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(loginRequest);\n }", "public void attemptLogin() {\n if (mLoginTask != null) {\n return;\n }\n\n // Reset errors.\n mUserNameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String mUserName = mUserNameView.getText().toString();\n String mPassword = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password.\n if (TextUtils.isEmpty(mPassword)) {\n mPasswordView.setError(getString(R.string.error_password_required));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(mUserName)) {\n mUserNameView.setError(getString(R.string.error_username_required));\n focusView = mUserNameView;\n cancel = true;\n }\n\n if (cancel) {\n // 出错时,让相应的控件获取焦点\n focusView.requestFocus();\n } else {\n // 进行登录\n mLoginTask = new LoginTask(LoginActivity.this, mUserName, mPassword, new LoginTask.OnLoginFinished() {\n @Override\n public void onFinished(String result) {\n try {\n JSONObject userJsonObject = new JSONObject(result);\n\n Intent intent = new Intent(LoginActivity.this, MainActivity.class);\n intent.putExtra(\"UserId\", userJsonObject.getString(\"UserId\"));\n intent.putExtra(\"Key\", userJsonObject.getString(\"Key\"));\n intent.putExtra(\"UserName\", userJsonObject.getString(\"UserName\"));\n intent.putExtra(\"Orid\", userJsonObject.getString(\"Orid\"));\n if(userJsonObject.has(\"PlateType\"))\n intent.putExtra(\"PlateType\", userJsonObject.getString(\"PlateType\"));\n mLoginTask = null;\n\n rememberUserName(((CheckBox)findViewById(R.id.rememberUserName)).isChecked());\n\n startActivity(intent);\n finish();\n } catch (JSONException e) {\n Log.d(\"DFCarChecker\", \"Json解析错误:\" + e.getMessage());\n }\n }\n\n @Override\n public void onFailed(String error) {\n mLoginTask = null;\n // 登录失败,获取错误信息并显示\n Log.d(AppCommon.TAG, \"登录时出现错误:\" + error);\n\n mPasswordView.setError(error);\n mPasswordView.requestFocus();\n }\n });\n mLoginTask.execute();\n }\n }", "public void logIn(View v){\n mUsername = (EditText) findViewById(R.id.username);\n mPassword = (EditText) findViewById(R.id.password);\n\n // Reset errors.\n mUsername.setError(null);\n mPassword.setError(null);\n\n // Store the data\n username = mUsername.getText().toString();\n password = mPassword.getText().toString();\n\n //Check username\n if (TextUtils.isEmpty(username)) {\n mUsername.setError(fielderror);\n checklog = false;\n }\n\n // Check for a valid password, if the user entered one.\n if (TextUtils.isEmpty(password)) {\n mPassword.setError(fielderror);\n checklog = false;\n }\n if(checklog == true) {\n loginUser();\n }\n\n\n }", "public void userSignIn(){\n String email=signInEmailEditText.getText().toString().trim();\n String password=signInPasswordEditText.getText().toString().trim();\n\n //input validation**\n if(TextUtils.isEmpty(email)){\n signInEmailEditText.setError(\"Please enter your account email address.\");\n return;\n }\n if(TextUtils.isEmpty(password)){\n signInPasswordEditText.setError(\"please enter your password.\");\n return;\n }\n if(password.length()<6){\n signInPasswordEditText.setError(\"please enter correct password.\");\n return;\n }\n\n\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.show();\n\n //sign in with email and password\n mAuth.signInWithEmailAndPassword(email,password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //check verified email or not\n if(mAuth.getCurrentUser().isEmailVerified()){\n startActivity(new Intent(SignInActivity.this,AppMainActivity.class));\n finish();\n Toast.makeText(SignInActivity.this,\"Welcome \"+mAuth.getCurrentUser().getEmail(), Toast.LENGTH_SHORT).show();\n }else{\n alertDialogBuilder(SignInActivity.this);\n Toast.makeText(SignInActivity.this,\"Please verify your email address.\",Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(SignInActivity.this,task.getException().getLocalizedMessage(),Toast.LENGTH_LONG).show();\n }\n progressDialog.dismiss();\n }\n });\n }", "public void attemptLogin() {\n\t\t// Reset errors.\n\t\temailTextView.setError(null);\n\t\tpasswordTextView.setError(null);\n\n\t\t// Store values at the time of the login attempt.\n\t\temail = emailTextView.getText().toString();\n\t\tpassword = passwordTextView.getText().toString();\n\n\t\tboolean cancel = false;\n\n\t\t// Check for a valid email address.\n\t\tcancel = Validate.PresenceOf(emailTextView);\n\t\tif (!cancel) cancel = Validate.PatternOf(emailTextView, Patterns.EMAIL_ADDRESS);\n\t\t\n\t\t// check valid password\n\t\tif (!cancel) cancel = Validate.PresenceOf(passwordTextView);\t\t\n\n\t\tif (!cancel) {\t\n\t\t\tKeyboard.hide(getActivity());\n\t\t\tlogin();\n\t\t}\n\t}", "public String signin() {\n \t//System.out.print(share);\n \tSystem.out.println(username+\"&&\"+password);\n String sqlForsignin = \"select password from User where username=?\";\n Matcher matcher = pattern.matcher(sqlForsignin);\n String sql1 = matcher.replaceFirst(\"'\"+username+\"'\");//要到数据库中查询的语句\n select();\n DBConnection connect = new DBConnection();\n List<String> result = connect.select(sql1);//查询结果\n if (result.size() == 0) return \"Fail1\";\n \n if (result.get(0).equals(password)){\n \tsession.setAttribute( \"username\", username);\n \treturn \"Success\";\n }\n else return \"Fail\";\n }", "private void login()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Get the connection to the database\r\n\t\t\tDatabase db = new Database();\r\n\r\n\t\t\t//Get the data and format it correctly\r\n\t\t\tString username = txtUsername.getText().trim().toLowerCase();\r\n\t\t\tString password = new String(txtPassword.getPassword()).trim();\r\n\r\n\t\t\t//Verify that user information has been inserted into the username/password fields\r\n\t\t\tif (username.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your username.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtUsername.requestFocus();\r\n\t\t\t}//End of if\r\n\t\t\telse if (password.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your password.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t}//End of else if\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (!db.usernameExists(username))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t}//End of if\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tUser user = db.loadUser(username);\r\n\t\t\t\t\tbyte [] bPassword = PasswordEncryption.hashPassword(username, password);\r\n\r\n\t\t\t\t\tif (bPassword.length != user.getPassword().length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t}//End of if\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean same = true;\r\n\r\n\t\t\t\t\t\t//Check the passwords for equality\r\n\t\t\t\t\t\tfor (int x = 0; x < bPassword.length; x++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bPassword[x] != user.getPassword()[x])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsame = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t}//End of for\r\n\r\n\t\t\t\t\t\tif (same)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (user.getAccountLevel() < 10)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\t\"You do not have sufficient rights to access this application.\",\r\n\t\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t//Login the user\r\n\t\t\t\t\t\t\t\tSession.login(user);\r\n\r\n\t\t\t\t\t\t\t\t//Open the dashbard\r\n\t\t\t\t\t\t\t\tSession.openWindow(new Dashboard());\r\n\r\n\t\t\t\t\t\t\t\t//Close this window\r\n\t\t\t\t\t\t\t\tthis.dispose();\r\n\t\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination your provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t}//End of else\r\n\t\t\t\t}//End of else\r\n\t\t\t}//End of else\r\n\t\t}//End of try\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//Inform the user that the application was unable to connect to the database.\r\n\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\tthis,\r\n\t\t\t\t\"An error occured connecting to the database.\\n\\nIf this problem continues, please contact your system administrator.\",\r\n\t\t\t\tApplication.NAME,\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE\r\n\t\t\t);\r\n\t\t}//End of catch\r\n\t}", "public void attemptLogin() {\r\n\t\tif (mAuthTask != null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Reset errors.\r\n\t\tthis.activity.getmEmailView().setError(null);\r\n\t\tthis.activity.getmPasswordView().setError(null);\r\n\r\n\t\t// Store values at the time of the login attempt.\r\n\t\tmEmail = this.activity.getmEmailView().getText().toString();\r\n\t\tmPassword = this.activity.getmPasswordView().getText().toString();\r\n\r\n\t\tboolean cancel = false;\r\n\t\tView focusView = null;\r\n\r\n\t\t// Check for a valid password.\r\n\t\tif (TextUtils.isEmpty(mPassword)) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (mPassword.length() < 4) {\r\n\t\t\tthis.activity.getmPasswordView().setError(this.activity.getString(R.string.error_invalid_password));\r\n\t\t\tfocusView = this.activity.getmPasswordView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\t// Check for a valid email address.\r\n\t\tif (TextUtils.isEmpty(mEmail)) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_field_required));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t} else if (!mEmail.contains(\"@\")) {\r\n\t\t\tthis.activity.getmEmailView().setError(this.activity.getString(R.string.error_invalid_email));\r\n\t\t\tfocusView = this.activity.getmEmailView();\r\n\t\t\tcancel = true;\r\n\t\t}\r\n\r\n\t\tif (cancel) {\r\n\t\t\t// There was an error; don't attempt login and focus the first\r\n\t\t\t// form field with an error.\r\n\t\t\tfocusView.requestFocus();\r\n\t\t} else {\r\n\t\t\t// Show a progress spinner, and kick off a background task to\r\n\t\t\t// perform the user login attempt.\r\n\t\t\tthis.activity.getmLoginStatusMessageView().setText(R.string.login_progress_signing_in);\r\n\t\t\tthis.activity.showProgress(true);\r\n\t\t\tmAuthTask = new UserLoginTask();\r\n\t\t\tmAuthTask.execute((Void) null);\r\n\t\t}\r\n\t}", "private void loginIn(String user, String pass, int message){\n writeTextIntoTextBox(R.id.username_text_input, user);\n writeTextIntoTextBox(R.id.password_text_input, pass);\n clickId(R.id.login_button);\n checkLoginMessage(message);\n clickId(R.id.alt_button);\n checkIfAtLogin();\n }", "public void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(this, email, password);\n mAuthTask.execute((Void) null);\n }\n }", "private void attemptLogin() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n// showProgress(true);\n mEmail = email;\n mPassword = password;\n mAuthTask = new UserLoginTask(this);\n mAuthTask.execute((Void) null);\n }\n }", "@Override\r\n\tpublic int login(userData user) {\n\t\tString pwd = user.getUser_pwd();\r\n\t\tSystem.out.println(user.getUser_phone()+\" get \"+ pwd + \"key:\"+user.getKey()+\" phone:\"+user.getUser_phone());\r\n\t\tpwd = MD5.md5_salt(pwd);\r\n\t\tSystem.out.println(user.getUser_phone()+\" final: \"+ pwd);\r\n\t\tHashMap<String,String> t = new HashMap();\r\n\t\tt.put(\"key\", user.getKey());\r\n\t\tt.put(\"value\", user.getUser_phone());\r\n\t\tString phone = AES.decode(t);\r\n\t\tSystem.out.println(\"phone:\"+phone+\"final: \"+ pwd);\r\n\t\tList<user_table> res = this.userRespository.login(phone, pwd);\r\n\t\t\r\n\t\tif(res.size() == 1)\r\n\t\t{\r\n\t\t\tuser_table u = res.get(0);\r\n\t\t\tString identity = u.getIdentity();\r\n\t\t\ttry {\r\n\t\t\t\tif(identity.equals(\"S\")){\r\n\t\t\t\t\tSystem.out.println(\"检查学生信息完善?\");\r\n\t\t\t\t\tstudent_table st = this.student.findByPhone(u.getUserphone());\r\n\t\t\t\t\tif(st == null)\r\n\t\t\t\t\t\treturn 801;\r\n\t\t\t\t\treturn 400;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"检查老师信息完善?\");\r\n\t\t\t\t\tteacher_table tea = this.teacher.findByPhone(u.getUserphone());\r\n\t\t\t\t\tif(tea == null)\r\n\t\t\t\t\t\treturn 802;\r\n\t\t\t\t\treturn 500;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}catch(Exception e) {\r\n\t\t\t\tSystem.out.println(\"800\");\r\n\t\t\t\treturn 800;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\treturn 401;\r\n\t\t}\r\n\t}" ]
[ "0.72205865", "0.6988598", "0.6772111", "0.6756142", "0.67325026", "0.6706357", "0.66774535", "0.6639222", "0.6638614", "0.6627677", "0.66017115", "0.6592288", "0.6592182", "0.65448713", "0.65239704", "0.65048045", "0.6494896", "0.64942724", "0.64891", "0.6447173", "0.64469266", "0.6411521", "0.6404133", "0.64034504", "0.63785034", "0.63781893", "0.6367735", "0.6364513", "0.63465935", "0.63417953", "0.6316895", "0.63168174", "0.63165885", "0.63098997", "0.62897366", "0.6283373", "0.6279358", "0.6277714", "0.62751997", "0.62636656", "0.62621635", "0.6260242", "0.6257735", "0.6257551", "0.6254675", "0.6253371", "0.62514657", "0.6250869", "0.6250679", "0.62469125", "0.6245276", "0.62428296", "0.62411654", "0.6233509", "0.6232891", "0.6232169", "0.62321305", "0.6231817", "0.6221637", "0.6217484", "0.6209123", "0.6206839", "0.619428", "0.619421", "0.6192258", "0.61901027", "0.6188029", "0.6184125", "0.61827207", "0.61770815", "0.6175938", "0.6166687", "0.6164281", "0.61632866", "0.6162654", "0.6162033", "0.61614865", "0.6160598", "0.61603415", "0.6153789", "0.6138354", "0.6134246", "0.6132636", "0.61255133", "0.61206865", "0.61168855", "0.61120737", "0.6112", "0.6109525", "0.6101428", "0.6088507", "0.60880435", "0.6074562", "0.6058334", "0.6055174", "0.60529125", "0.6048006", "0.604652", "0.60456276", "0.60412055" ]
0.73107797
0
JSONObject response = new JSONObject();
public JSONObject signInTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; String signinemail = (String) message.get("email"); String signinpassword = (String) message.get("password"); signinpassword.replaceAll("\\s+",""); int p = hash(signinpassword); // System.out.println(); if (signinemail.length() > 0 && signinpassword.length() > 0) { rs = st.executeQuery("SELECT * from TotalUsers WHERE Email='" + signinemail + "';"); if (rs.next()) { if (rs.getInt("Password")==p) { response.put("message", "loginsuccesstest"); response.put("loginsuccesstest", "Logged in."); response.put("email", rs.getString("Email")); response.put("firstName", rs.getString("FirstName")); response.put("lastName", rs.getString("LastName")); // int userID = rs.getInt("userID"); // return response; } else { response.put("message", "loginfailtest"); response.put("loginfailtest", "Incorrect password."); // return response; } } else { response.put("message", "loginfailtest"); response.put("loginfailtest", "Email doesn't exist."); // return response; } } else { response.put("message", "loginfailtest"); response.put("loginfailtest", "Please fill in all of the fields."); // return response; } } catch (SQLException sqle) { try { response.put("message", "loginfailtest"); response.put("loginfailtest", "Login failed."); } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject editProfile(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; String newPassword = message.getString("newPassword"); String email = message.getString("email"); String oldPassword = message.getString("oldPassword"); System.out.println("new password"); rs = st.executeQuery("SELECT * from TotalUsers WHERE Email='" + email + "';"); if (rs.next()) { int p = hash(newPassword); int oldp = hash(oldPassword); if (rs.getInt("Password") == oldp) { System.out.println("new password"); Statement st1 = conn.createStatement(); st1.executeUpdate("UPDATE TotalUsers SET Password=" + p + " WHERE Email='" + email + "';"); response = getData(conn, rs.getInt("userID")); response.put("message", "passwordSuccess"); response.put("email", rs.getString("Email")); response.put("firstName", rs.getString("FirstName")); response.put("lastName", rs.getString("LastName")); System.out.println(response); } else { response.put("message", "passwordFail"); } } else { response.put("message", "passwordFail"); } } catch(SQLException sqle) { sqle.printStackTrace(); } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject createBigBudget(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; String name = message.getString("bigBudgetName"); double amount = message.getDouble("bigBudgetAmount"); int user = message.getInt("userID"); String date = message.getString("resetStartDate"); String frequency = message.getString("resetFrequency"); int freq = 0; if (frequency.equals("Daily")) { freq = 1; } else if (frequency.equals("Weekly")) { freq = 7; } else if (frequency.equals("Monthly")) { freq = 30; } else if (frequency.equals("Yearly")) { freq = 365; } else if (frequency.equals("")) { freq = 30; //default is monthly } else { response = getData(conn, user); response.put("message", "createBigBudgetFail"); response.put("createBigBudgetFail", "Enter a correct frequency (Daily, Weekly, Monthly, Yearly)"); return response; } System.out.println(date); String addBigBudget = "(" + user + ", '"+ name + "', 1, 34.0222, -118.282, " + amount + ", 0, " + freq + ", '" + date + "', " + freq + ", '50','','80 90 95 100');"; st.execute(Constants.SQL_INSERT_BIGBUDGET + addBigBudget); // if (success) { response = getData(conn, user); response.put("message", "createbudgetsuccess"); // } // else { // response.put("message", "createbudgetfail"); // response.put("createbudgetfail", "Create budget failed not successful."); // } //add budgets to feed return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "createbudgetfail"); response.put("createbudgetfail", "Create budget failed."); return response; } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
frequency, bigbudgetID, frequency will be string but parsable to int for custom
public JSONObject editBigBudgetAttributes(JSONObject message, Session session, Connection conn) { return null; //add to editBigBudget }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "BigInteger getMax_freq();", "FrequencyRegister(String subId) {\n \n reg2 = new FrequencySubRegister(\"FREQ2\" + subId);\n reg1 = new FrequencySubRegister(\"FREQ1\" + subId);\n reg0 = new FrequencySubRegister(\"FREQ0\" + subId);\n \n setFrequency(0x75a0cb); // default frequency is 0b 01111 0101 1010 0000 1100 1011,\n }", "public void setFrequency(java.lang.Integer value) {\n this.frequency = value;\n }", "public void setFrequency(int f){\n this.frequency = f;\n }", "public int getFreq(){ return frequency;}", "java.lang.String getFrequency();", "public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n }\n }", "public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "private Integer updateFrequency(int freq, Denominator moneyType) {\r\n\t\tif(freq == 0){\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, ++freq));\r\n\t\t}else{\r\n\t\t\tDenominatorCombination value = this.denominatorFrequencyMap.get(moneyType);\r\n\t\t\tint frequency = 0;\r\n\t\t\tif(value != null){\r\n\t\t\t\tfrequency = value.getFrequency();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.denominatorFrequencyMap.put(moneyType, new DenominatorCombination(moneyType, frequency +1));\r\n\t\t\tfreq++;\r\n\t\t}\r\n\t\treturn freq;\r\n\t}", "public int getFrequency(){\n return this.frequency;\n }", "public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setChannelRFfreq(int freq){\n this.channelRF=freq;\n }", "int getFreq();", "public int getFrequency_(){\r\n\t\treturn frequency_;\r\n\t}", "public void freq(int freq) {\n\t\tfrequency = freq;\n\t\ttry {\n\t\t\tserver.send(concatAll(FREQCOMMAND, intToBytes(freq)));\n\t\t} catch (IOException e) {\n\t\t\tLog.e(TAG, \"Error transmitting data to the PIC32\", e);\n\t\t}\n\n\t}", "float getFrequency();", "com.google.protobuf.ByteString\n getFrequencyBytes();", "public Integer getFrequency() {\n return this.frequency;\n }", "@ApiModelProperty(value = \"Frequency of the billing cycle (monthly for instance)\")\n public String getFrequency() {\n return frequency;\n }", "public void set(int symbol, int freq);", "public TagFreq(int freq, String tagName) {\r\n\t\tthis.freq = freq;\r\n\t\tthis.tagName = tagName;\r\n\t}", "public long getFreq() {\n return freq;\n }", "public void updateFrequencyByID(final int tid, final int frequency){\n TaskDatabase.databaseWriteExecutor.execute(new Runnable() {\n @Override\n public void run() {\n dao.updateFrequencyByID(tid, frequency);\n }\n });\n }", "public int getFrequency()\n {\n return this.frequency;\n }", "private void parseAvailableFrequencies(){\n\t\tString str = parser.readFile(FREQ_AVAILABLE, 256);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] frestrs = str.split(\" \");\n\t\tint[] freqs = new int[frestrs.length - 1];\n\t\tfor(int i = 0; i < freqs.length; i++)\n\t\t\tfreqs[i] = Integer.valueOf(frestrs[i]);\n\t\t\n\t\tcpuFrequencies = freqs;\n\t}", "public java.lang.Integer getFrequency() {\n return frequency;\n }", "public void SetFrequency(int Frequency, String ElementID){\n\t\t_TEST stack = new _TEST();\t\t\t\t\t\t\t\t\t \t\t/* TEST */\n\t\tstack.PrintHeader(ID,Frequency+\":int, \" + ElementID+\":String\",\"\");\t/* TEST */\n\t\tGENERATOR GEN_to_setsfrequency;\t\n\t\tGEN_to_setsfrequency = new GENERATOR(0,0,null);\t\t\t/* Temporalis valtozo */\n\t\tGetElementByID(GEN_to_setsfrequency.ID);\t\t\t\t\t/* GetElemetByIDvel megkapjuk, az objektumot\t*/\t\t\n\t\tGEN_to_setsfrequency.SetSequence(Frequency); \t\t\t\t /* az generator objektum SetFrequency(...) metodusat meghivjuk */\n\t\tstack.PrintTail(ID,Frequency+\":int, \" + ElementID+\":String\",\"\");\t /* TEST */\t\n\t}", "public edu.pa.Rat.Builder setFrequency(int value) {\n validate(fields()[1], value);\n this.frequency = value;\n fieldSetFlags()[1] = true;\n return this; \n }", "public int getFrequency()\n\t{\n\t\treturn frequency;\n\t}", "private static double freqOfKey(int index) {\n return 440 * Math.pow(2, (double) (index - 12) / 24);\n }", "private void setBondFrequencyAttributes( IBond hsBond, IBond newBond, boolean increment ) {\n\t\t\n\t\tif( hsBond != null /*&& hsBond.getProperty(bondFrequencyType) != null*/ ) { \n\t\t\t\n\t\t\tif( increment ) {\n\t\t\t\tint freq = (Integer) hsBond.getProperty(bondFrequencyType);\n\t\t\t\tnewBond.setProperty(bondFrequencyType, freq + 1 );\n\t\t\t\thsBond.setProperty(bondFrequencyType, freq + 1 );\n\t\t\t} else {\n\t\t\t\tnewBond.setProperty(bondFrequencyType, (Integer) hsBond.getProperty(bondFrequencyType) );\n\t\t\t}\n\t\t} else {\n\t\t\tnewBond.setProperty(bondFrequencyType, 1 );\n\t\t\t//System.err.println(\"HSB null freq\");\n\t\t}\n\t\t\n\n\t\t//newBond.setProperty( topologyType, bondTopologyType );\n\n\t\tif( queryMolId > 0 ) {\n\t\t\tList<Integer> molOrigins = null;\n\t\t\t\n\t\t\tif( hsBond != null && hsBond.getProperty(bondMolOriginType) != null ) {\n\t\t\t\tmolOrigins = (List<Integer>) hsBond.getProperty(bondMolOriginType);\n\t\t\t\t\n\t\t\t\tif( increment )\n\t\t\t\t\tmolOrigins.add( queryMolId );\n\t\t\t\t//System.out.println(\"molOrigins - \" + molOrigins);\n\t\t\t} else {\n\t\t\t\tmolOrigins = new ArrayList<Integer>(10);\n\t\t\t\tmolOrigins.add( queryMolId );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tnewBond.setProperty(bondMolOriginType, molOrigins);\n\t\t}\n\t}", "public int getFreq() {\n return freq_;\n }", "bool setFrequency(double newFrequency)\n {\n if (newFrequency > 534 && newFrequency < 1606)\n {\n frequency = newFrequency\n return true;\n }\n return false;\n }", "public Builder setFrequency(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n frequency_ = value;\n onChanged();\n return this;\n }", "public void setFrequency(SummaryFrequencyCodeType frequency) {\n\t this.frequency = frequency;\n\t}", "bool setFrequency(double newFrequency);", "public Frequency(Date startdate, Date enddate,String frequencyday,\n String frequencymonth, String counter_of_end, \n StartFrequencyType frequencytype, EndFrequencyType endft) {\n \n init();\n frequencyDay = frequencyday;\n frequencyMonth = frequencymonth;\n endcounter = counter_of_end;\n startingType = frequencytype;\n endingType = endft;\n \n SimpleDateFormat ft = new SimpleDateFormat (\"ddMMYYYY\"); \n startDate = ft.format(startdate);\n endDate = ft.format(enddate);\n }", "public WordCount2(Integer frequency) {\n emitFrequency = frequency;\n }", "public java.lang.Integer getFrequency() {\n return frequency;\n }", "public void updateFrequency(int bookingId, String frequency) throws SQLException {\n\t\t// TODO: booking_update\n\t\tPreparedStatement stmt = this.connection.prepareStatement(dbProps.getProperty(\"booking_update\"));\n\t\tstmt.setInt(1, bookingId);\n\t\tstmt.setString(2, frequency);\n\t\tstmt.executeUpdate();\n\t\tstmt.close();\n\t}", "public Builder setFreq(int value) {\n bitField0_ |= 0x00000008;\n freq_ = value;\n onChanged();\n return this;\n }", "public int getFreq() {\n return freq_;\n }", "public JSONObject createBigBudget(JSONObject message, Session session, Connection conn) {\n\t\ttry {\n\t\t\tStatement st = conn.createStatement();\n\t\t\tResultSet rs = null;\n\t\t\tString name = message.getString(\"bigBudgetName\");\n\t\t\tdouble amount = message.getDouble(\"bigBudgetAmount\");\n\t\t\tint user = message.getInt(\"userID\");\n\t\t\tString date = message.getString(\"resetStartDate\");\n\t\t\tString frequency = message.getString(\"resetFrequency\");\n\t\t\tint freq = 0;\n\t\t\tif (frequency.equals(\"Daily\")) {\n\t\t\t\tfreq = 1;\n\t\t\t}\n\t\t\telse if (frequency.equals(\"Weekly\")) {\n\t\t\t\tfreq = 7;\n\t\t\t}\n\t\t\telse if (frequency.equals(\"Monthly\")) {\n\t\t\t\tfreq = 30;\n\t\t\t}\n\t\t\telse if (frequency.equals(\"Yearly\")) {\n\t\t\t\tfreq = 365;\n\t\t\t}\n\t\t\telse if (frequency.equals(\"\")) {\n\t\t\t\tfreq = 30; //default is monthly\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresponse = getData(conn, user);\n\t\t\t\tresponse.put(\"message\", \"createBigBudgetFail\");\n\t\t\t\tresponse.put(\"createBigBudgetFail\", \"Enter a correct frequency (Daily, Weekly, Monthly, Yearly)\");\n\t\t\t\treturn response;\n\t\t\t}\n\t\t\tSystem.out.println(date);\n\t\t\tString addBigBudget = \"(\" + user + \", '\"+ name + \"', 1, 34.0222, -118.282, \" + amount + \", 0, \" + freq + \", '\" + date + \"', \" + freq + \", '50','','80 90 95 100');\";\n\t\t\tst.execute(Constants.SQL_INSERT_BIGBUDGET + addBigBudget);\n//\t\t\tif (success) {\n\t\t\tresponse = getData(conn, user);\n\t\t\tresponse.put(\"message\", \"createbudgetsuccess\");\n//\t\t\t}\n//\t\t\telse {\n//\t\t\t\tresponse.put(\"message\", \"createbudgetfail\");\n//\t\t\t\tresponse.put(\"createbudgetfail\", \"Create budget failed not successful.\");\n//\t\t\t}\n\t\t\t\n\t\t\t//add budgets to feed\n\t\t\t\n\t\t\treturn response;\n\t\t} catch (SQLException sqle) {\n\t\t\ttry {\n\t\t\t\tsqle.printStackTrace();\n\t\t\t\tresponse.put(\"message\", \"createbudgetfail\");\n\t\t\t\tresponse.put(\"createbudgetfail\", \"Create budget failed.\");\n\t\t\t\treturn response;\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn response;\n\t } catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn response;\n\t\t\n\t}", "public Builder setFrequencyBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n frequency_ = value;\n onChanged();\n return this;\n }", "@Override\n\t public float idf(int docFreq, int numDocs) {\n\t // return (float)(Math.log(numDocs/(double)(docFreq+1)) + 1.0);\n\t\t return 1.0f;\n\t }", "@Test\n public void testDFTOneFreq() {\n for (int freq = 0; freq < 1000; freq += 200) {\n SoundWave wave = new SoundWave(freq, 5, 0.5, 0.1);\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq, maxFreq, 0.00001);\n }\n }", "private void processSuperHighValue(Bid bid) {\n\t}", "BigInteger getPeriod();", "public abstract Bid chooseFirstCounterBid();", "public interface IFrequencyTable {\n\t\n\t/**\n\t * Returns the number of symbols in this frequency table, which is a positive number.\n\t * @return the number of symbols in this frequency table\n\t */\n\tpublic int getSymbolLimit();\n\t\n\t\n\t/**\n\t * Returns the frequency of the specified symbol. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the frequency of the symbol\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int get(int symbol);\n\tpublic int get(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Sets the frequency of the specified symbol to the specified value.\n\t * The frequency value must be at least 0.\n\t * @param symbol the symbol to set\n\t * @param freq the frequency value to set\n\t * @throws IllegalArgumentException if the frequency is negative or the symbol is out of range\n\t * @throws ArithmeticException if an arithmetic overflow occurs\n\t */\n\tpublic void set(int symbol, int freq);\n\tpublic void set(ISymbol symbol, int freq);\n\t\n\t\n\t/**\n\t * Increments the frequency of the specified symbol.\n\t * @param symbol the symbol whose frequency to increment\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t * @throws ArithmeticException if an arithmetic overflow occurs\n\t */\n\tpublic void increment(int symbol);\n\tpublic void increment(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Returns the total of all symbol frequencies. The returned value is at\n\t * least 0 and is always equal to {@code getHigh(getSymbolLimit() - 1)}.\n\t * @return the total of all symbol frequencies\n\t */\n\tpublic int getTotal();\n\t\n\t\n\t/**\n\t * Returns the sum of the frequencies of all the symbols strictly\n\t * below the specified symbol value. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the sum of the frequencies of all the symbols below {@code symbol}\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int getLow(int symbol);\n\tpublic int getLow(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Returns the sum of the frequencies of the specified symbol\n\t * and all the symbols below. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the sum of the frequencies of {@code symbol} and all symbols below\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int getHigh(int symbol);\n\tpublic int getHigh(ISymbol symbol);\n\t\n}", "public abstract Bid chooseCounterBid();", "public void setFrequency (jkt.hms.masters.business.MasFrequency frequency) {\n\t\tthis.frequency = frequency;\n\t}", "public void setBuid(long value) {\r\n this.buid = value;\r\n }", "private void processHighBidValue(Bid bid) {\n\t}", "public void setFrequencies(Set<Frequency> arg0) {\n \n }", "GuitarString(double frequency)\n\t{\n\t\tint qLen = (int) Math.round( SAMPLE_RATE / frequency );\n\t\trb = new RingBuffer(qLen);\n\t\ttotalTick = 0;\n\t\t\n\t\tfor(int i = 0; i < qLen; i++)\n\t\t\trb.enqueue(0);\n\t\t\t\n\t}", "public void setBigId (int bigId) { this.bigId = bigId; }", "public Occurrence(String doc, int freq) {\n\t\tdocument = doc;\n\t\tfrequency = freq;\n\t}", "public TagFreq(String stringRepresentation) {\r\n\t\t\r\n\t\tint indexOfFreq = stringRepresentation.lastIndexOf('(') + 1; \r\n\t\t\r\n\t\tthis.tagName =\r\n\t\t\tstringRepresentation.substring(0, indexOfFreq - 2);\r\n\t\tthis.freq =\r\n\t\t\tInteger.parseInt(stringRepresentation.\r\n\t\t\t\t\t\t\t\tsubstring(indexOfFreq,\r\n\t\t\t\t\t\t\t\t\t\t stringRepresentation.length() - 1));\r\n\t}", "public void setInterFreq(InterFreq interFreq) {\n\t\tthis.interFreq = interFreq;\n\t}", "private void processMediumValue(Bid bid) {\n\t}", "public void setGBInterval_to(java.math.BigInteger param){\n localGBInterval_toTracker = param != null;\n \n this.localGBInterval_to=param;\n \n\n }", "private Integer getFrequency(String key) {\n\t\t\n\t\ttry{\n\t\t\tif(key != null && key.trim().length() > 0)\n\t\t\t\tfrequencyMap.put(key.toString().toLowerCase(), WordplayUtil.getCount(key.toString().toLowerCase(), frequencyMap) + 1);\n\t\t\t\n\t\t\treturn WordplayUtil.getCount(key.toString().toLowerCase(), frequencyMap);\n\t\t}catch(Exception e){\n\t\t\t\n\t\t}\n\t\treturn 1;\n\t}", "public java.lang.String getLocalizedFrequencyString(java.lang.String r3) {\n /*\n r2 = this;\n int r0 = r3.hashCode()\n r1 = -791707519(0xffffffffd0cf8081, float:-2.78504428E10)\n if (r0 == r1) goto L_0x0028\n r1 = 95346201(0x5aede19, float:1.6444467E-35)\n if (r0 == r1) goto L_0x001e\n r1 = 1236635661(0x49b5900d, float:1487361.6)\n if (r0 == r1) goto L_0x0014\n goto L_0x0032\n L_0x0014:\n java.lang.String r0 = \"monthly\"\n boolean r3 = r3.equals(r0)\n if (r3 == 0) goto L_0x0032\n r3 = 2\n goto L_0x0033\n L_0x001e:\n java.lang.String r0 = \"daily\"\n boolean r3 = r3.equals(r0)\n if (r3 == 0) goto L_0x0032\n r3 = 0\n goto L_0x0033\n L_0x0028:\n java.lang.String r0 = \"weekly\"\n boolean r3 = r3.equals(r0)\n if (r3 == 0) goto L_0x0032\n r3 = 1\n goto L_0x0033\n L_0x0032:\n r3 = -1\n L_0x0033:\n switch(r3) {\n case 0: goto L_0x0054;\n case 1: goto L_0x0046;\n case 2: goto L_0x0038;\n default: goto L_0x0036;\n }\n L_0x0036:\n r3 = 0\n return r3\n L_0x0038:\n android.content.Context r3 = r2.context\n android.content.res.Resources r3 = r3.getResources()\n r0 = 2131888385(0x7f120901, float:1.9411404E38)\n java.lang.String r3 = r3.getString(r0)\n return r3\n L_0x0046:\n android.content.Context r3 = r2.context\n android.content.res.Resources r3 = r3.getResources()\n r0 = 2131889601(0x7f120dc1, float:1.941387E38)\n java.lang.String r3 = r3.getString(r0)\n return r3\n L_0x0054:\n android.content.Context r3 = r2.context\n android.content.res.Resources r3 = r3.getResources()\n r0 = 2131886962(0x7f120372, float:1.9408518E38)\n java.lang.String r3 = r3.getString(r0)\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.myfitnesspal.shared.service.reminders.RemindersServiceImpl.getLocalizedFrequencyString(java.lang.String):java.lang.String\");\n }", "private int buildSawtoothForFrequency(int freq,int sampleRate, short[] buffer) {\n\t\t\tint cycleLength=sampleRate/freq;\n\t\t\tint startPosition=cycleLength/2;\n\t\t\t\n\t\t\tint noOfCycles=buffer.length/cycleLength;\n\t\t\tif(noOfCycles<=0) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\t\n\t\t\tint i;\n\t\t\tfor(i=0;i<noOfCycles*cycleLength;++i) {\n\t\t\t\tbuffer[i]=(short)(32767*(-2.0/Math.PI)*Math.atan(1/Math.tan((Math.PI * (i+startPosition) / (sampleRate))/(1.0/freq))));\n\t\t\t}\n\t\t\t\n\t\t\treturn i;\n\t\t\t\n\t\t}", "public SynchronizationPulseFrequency(byte[] bytes) throws KlvParseException {\n try {\n frequency = PrimitiveConverter.toFloat64(bytes);\n } catch (IllegalArgumentException ex) {\n throw new KlvParseException(\n \"Unable to deserialise Synchronization Pulse Frequency: \" + ex.getMessage());\n }\n }", "public Double getFrequency() {\n return frequency;\n }", "public GuitarString(double frequency) {\n\t super(frequency,1.0);\n\t DECAY = .996;\n\t }", "@Override\n\tpublic Float getFrequency() {\n\t\treturn 3.8f;\n\t}", "@Test\n public void test() {\n int packLength = 156;\n DFTMainFreqEncoder encoder = new DFTMainFreqEncoder(packLength);\n encoder.setMainFreqNum(2);\n List<float[]> packs;\n\n for (int i = 0; i < 1000; i++) {\n // encoder.encode(2*i+3*Math.cos(2*Math.PI*0.4*i));\n// encoder.encode(3 * Math.cos(2 * Math.PI * 0.4 * i));\n encoder.encode(12.5);\n }\n for (int i = 2001; i < 3000; i++) {\n encoder.encode(37.5 + 10 * Math.cos(2 * Math.PI * 0.4 * i));\n // encoder.encode(i);\n }\n for (int i = 3001; i < 4000; i++) {\n // encoder.encode(2*i+3*Math.cos(2*Math.PI*0.4*i));\n// encoder.encode(3 * Math.cos(2 * Math.PI * 0.4 * i));\n encoder.encode(12.5);\n }\n\n System.out.println(\"data: line\");\n packs = encoder.getPackFrequency();\n for (int i = 0; i < packs.size(); i++) {\n System.out.println(i * packLength + \"\\t~\\t\" + ((i + 1) * packLength - 1) + \"\\t\"\n + Arrays.toString(packs.get(i)));\n }\n GtEq<Float> gtEq = FilterFactory.gtEq(FilterFactory.floatFilterSeries(\"a\", \"b\", FilterSeriesType.FREQUENCY_FILTER),0.2f,true);\n assertTrue(encoder.satisfy(gtEq));\n encoder.resetPack();\n\n }", "private HashMap<String,String> getFrequency(String code) {\n HashMap<String,String> response = new HashMap<String,String>();\n\n HashMap<String,String> kindOfFrequency = new HashMap<String,String>();\n kindOfFrequency.put(\"name\",code);\n //Get the value of the frequency according to its name\n HashMap<Integer,HashMap<String,String>> freq\n = dbController.getFrequency(kindOfFrequency);\n if (freq == null)\n return null;\n for (Map.Entry<Integer,HashMap<String,String>> objs : freq.entrySet()){\n HashMap<String,String> obj = objs.getValue();\n\n response.put(\"name\",obj.get(\"name\"));\n response.put(\"frequency\",obj.get(\"frequency\"));\n //Returns a map containing the name frequency and its value\n return response;\n }\n return null;\n }", "public FrequencyList (String input){\n\tadd(input);\n }", "public Builder(Frequency frequency) {\n\t\t\tthis.frequency = frequency;\n\t\t\tbySecond = new ArrayList<Integer>(0);\n\t\t\tbyMinute = new ArrayList<Integer>(0);\n\t\t\tbyHour = new ArrayList<Integer>(0);\n\t\t\tbyDay = new ArrayList<ByDay>(0);\n\t\t\tbyMonthDay = new ArrayList<Integer>(0);\n\t\t\tbyYearDay = new ArrayList<Integer>(0);\n\t\t\tbyWeekNo = new ArrayList<Integer>(0);\n\t\t\tbyMonth = new ArrayList<Integer>(0);\n\t\t\tbySetPos = new ArrayList<Integer>(0);\n\t\t\txrules = new ListMultimap<String, String>(0);\n\t\t}", "public abstract double samplingFrequency();", "int getBid();", "@Test\n public void testDFTMultipleFreq() {\n int freq1;\n int freq2;\n int freq3;\n for (int i = 1; i < 10; i += 2) {\n freq1 = i * 100;\n freq2 = i * 200;\n freq3 = i * 300;\n SoundWave wave1 = new SoundWave(freq1, 0, 0.3, 0.1);\n SoundWave wave2 = new SoundWave(freq2, 2, 0.3, 0.1);\n SoundWave wave3 = new SoundWave(freq3, 3, 0.3, 0.1);\n SoundWave wave = wave1.add(wave2.add(wave3));\n\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq3, maxFreq, 0.00001);\n }\n }", "long getMessageFrequency();", "public FreqNode(String key, int value) {\n this.key = key;//sets key \n this.value = value;//sets value \n }", "@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public void setBudget(BigDecimal budget) {\n this.budget = budget;\n }", "public T caseFrequency(Frequency object) {\r\n\t\treturn null;\r\n\t}", "public long convertBandwidth(long reportedBandwidth){\n\t\t//CONVERT FROM MEGABITS TO BITS\n\t\tlong newBandwidth = reportedBandwidth * 1000;\n\t\treturn newBandwidth;\n\t}", "@Test\n public void testClaimFreqCd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setFreqCdEnum,\n RdaFissClaim::getFreqCd,\n FissBillFrequency.BILL_FREQUENCY_ADJUSTMENT_CLAIM_F,\n \"F\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setFreqCdUnrecognized,\n RdaFissClaim::getFreqCd,\n RdaFissClaim.Fields.freqCd,\n 1);\n }", "public void setDocumentFrequency(double docFreq) {\n\t\tdocumentFrequency = docFreq;\n\t}", "public static Frequency parse(String line) {\n\n double value = -1;\n Unit unit = null;\n Frequency freq = null;\n\n try {\n Scanner s = new Scanner(line);\n s.useDelimiter(\"[\\\\p{Lower}\\\\p{Upper}\\\\p{javaWhitespace}]\");\n\n value = s.nextDouble();\n\n s.reset();\n s.useDelimiter(\"[\\\\p{Digit}\\\\p{Punct}\\\\p{javaWhitespace}]\");\n\n long multiplier = Unit.HZ.getMagnitude();\n String unitString = \"\";\n\n if(s.hasNext()) {\n unitString = s.next();\n unit = Unit.parse(unitString);\n multiplier = unit.getMagnitude();\n }\n\n if(s.hasNext()) {\n throw new IllegalArgumentException(\n String.format(\"Invalid Frequency Format: %s\", line));\n }\n\n freq = new Frequency((long)(value * multiplier), unit);\n freq.originalString = line;\n }\n catch(Exception e) {\n throw new IllegalArgumentException(\"Error parsing: \" + line);\n }\n\n return freq;\n }", "private void setEntropiaF(Map<String, Integer> categoriasFrequencia, int totalFrequencia) {\n\t\t\n\t}", "public void setTickFreq(long tickFreq) {\n\t\tthis.tickFreq = tickFreq;\n\t}", "Integer getBusinessValue();", "public void setGBInterval_from(java.math.BigInteger param){\n localGBInterval_fromTracker = param != null;\n \n this.localGBInterval_from=param;\n \n\n }", "public Frequency() {\n\n }", "java.lang.String getBidid();", "private void ReadFreq(char[] imagenaux) {\n if (imagenaux[29] == '/') iteradorFreq = 29;\n else iteradorFreq = 28;\n for (int x = 0; x < sizeY; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqY.put(n, f);\n }\n\n for (int x = 0; x < sizeCB; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCB.put(n, f);\n }\n\n for (int x = 0; x < sizeCR; ++x) {\n StringBuilder Key = new StringBuilder();\n StringBuilder Value = new StringBuilder();\n int n;\n int f;\n if (imagenaux[iteradorFreq] == '/') {\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Key.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n ++iteradorFreq;\n while (imagenaux[iteradorFreq] != '/') {\n Value.append(imagenaux[iteradorFreq]);\n ++iteradorFreq;\n }\n }\n if (Key.length() > 9) {\n //negativo\n String auxi = Key.toString();\n auxi = Utils.andOfString(auxi);\n n = Integer.parseInt(auxi, 2);\n ++n;\n n = -1 * n;\n } else {\n n = Integer.parseInt(Key.toString(), 2);\n }\n f = Integer.parseInt(Value.toString(), 2);\n FreqCR.put(n, f);\n }\n }", "public void setFrequencyOfRoute(java.math.BigInteger frequencyOfRoute) {\r\n this.frequencyOfRoute = frequencyOfRoute;\r\n }", "private static void findBigramCountsTuring() {\n\n\t\tbigramCountTI= new HashMap<Integer,Double>();\n\t\tdouble value;\n\t\tfor(int i:bucketCountT.keySet()){\n\t\t\tif(i==0)\n\t\t\t\tcontinue;\n\t\t\tvalue= ((i+1)*bucketCountT.getOrDefault(i+1, 0.0))/bucketCountT.get(i);\n\t\t\tbigramCountTI.put(i,value);\n\t\t}\n\t}", "private static void fillDataMapFromFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedReader frequencyReader = new BufferedReader(new FileReader(frequencyFile));\n\n\t\tList<String> lines = frequencyReader.lines()\n\t\t\t\t.collect(Collectors.toList());\n\n\t\tfrequencyReader.close();\n\n\t\tfor(int i = 0, size = lines.size(); i < size; i++) { // Split each line at the delimiter, into word & frequency - put them in the data map\n\n\t\t\tfinal String[] dataSplit = lines.get(i).split(WORD_FREQUENCY_DELIMITER);\n\t\t\tfinal String word = dataSplit[0];\n\t\t\tfinal long frequency = Long.parseLong(dataSplit[1]);\n\n\t\t\tdataMap.put(word, frequency);\n\t\t}\n\t}", "void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }", "public void setFrequencyBand(List<Double> frequencyBand) {\n this.frequencyBand = frequencyBand;\n }" ]
[ "0.62272334", "0.605517", "0.59037334", "0.58996224", "0.58388907", "0.57232094", "0.57225347", "0.5624405", "0.56104004", "0.5575312", "0.55730116", "0.5560906", "0.55118096", "0.55011183", "0.54565966", "0.54170954", "0.5402473", "0.5384281", "0.538104", "0.5332389", "0.5307344", "0.5281818", "0.5279171", "0.5245991", "0.5235784", "0.52312094", "0.5207609", "0.5166646", "0.51473707", "0.513804", "0.51286054", "0.5116102", "0.50913966", "0.50846964", "0.5075901", "0.5071782", "0.50589454", "0.50355804", "0.5030947", "0.50298405", "0.5008086", "0.50073826", "0.50068724", "0.49998644", "0.49895832", "0.49883127", "0.49853486", "0.49728304", "0.49676046", "0.49612355", "0.4952344", "0.49397433", "0.49391842", "0.49121994", "0.48998857", "0.48788735", "0.48637968", "0.4856447", "0.48510027", "0.48490137", "0.482878", "0.48171264", "0.4799191", "0.4797541", "0.47924718", "0.47827625", "0.47792658", "0.4778523", "0.47674745", "0.47586906", "0.4757532", "0.4755427", "0.47542506", "0.47492763", "0.47470108", "0.47367144", "0.47290647", "0.47252944", "0.4710096", "0.47045356", "0.46996793", "0.46983922", "0.46801996", "0.46672124", "0.46665478", "0.46648237", "0.46525887", "0.46468148", "0.46431017", "0.46419042", "0.46294236", "0.46194977", "0.46131244", "0.46080694", "0.46017456", "0.45989853", "0.45973262", "0.45906544", "0.4585728", "0.45852062", "0.458494" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject editBigBudget(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; int id = message.getInt("bigBudgetID"); String name = message.getString("bigBudgetName"); String newAmount = message.getString("budgetAmount"); String frequency = message.getString("frequency"); String lNotification = message.getString("limitNotification"); String pNotification = message.getString("periodUpdateNotification"); if (!lNotification.equals("")) { String[] lnotifications = lNotification.split(", "); String lnupdate = ""; for (int i=0; i<lnotifications.length; i++) { lnupdate += (lnotifications[i] + " "); } st.execute("UPDATE BigBudgets SET LimitNotification='" + lnupdate + "' WHERE bigBudgetID=" + id + ";"); } if (!pNotification.equals("")) { String[] pnotifications = pNotification.split(", "); String pnupdate = ""; for (int i=0; i<pnotifications.length; i++) { pnupdate += (pnotifications[i] + " "); } Statement sthelp = conn.createStatement(); ResultSet rshelp = sthelp.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + id + ";"); String p = ""; if (rshelp.next()) { p = rshelp.getString("PeriodNotificationChecked"); } String[] plist = p.split(" "); int pmax = 0; for (int i=0; i<plist.length; i++) { if (Integer.parseInt(plist[i])>=pmax) { pmax = Integer.parseInt(plist[i]); } } String newchecked = ""; for (int i=0; i<pnotifications.length; i++) { if (Integer.parseInt(pnotifications[i])<=pmax) { newchecked += (Integer.parseInt(pnotifications[i]) + " "); } } st.execute("UPDATE BigBudgets SET PeriodNotification='" + pnupdate + "', PeriodNotificationChecked='" + newchecked + "' WHERE bigBudgetID=" + id+";"); } if (!name.equals("")) { String editBigBudget = "UPDATE BigBudgets SET BigBudgetName='" + name + /*"', BigBudgetAmount=" + amount +*/ "' WHERE bigBudgetID=" + id + ";"; st.execute(editBigBudget); } if (!newAmount.equals("")) { double amount = message.getDouble("budgetAmount"); rs = st.executeQuery("SELECT * FROM Budgets WHERE bigBudgetID=" + id + ";"); double sum = 0; while (rs.next()) { sum += rs.getDouble("BudgetAmount"); } if (sum >= amount) { response = getData(conn, message.getInt("userID")); response.put("message", "editbudgetfail"); response.put("editbudgetfail", "You can't make the budget amount less than the sum of the categories."); return response; } else { String editBigBudget = "UPDATE BigBudgets SET BigBudgetAmount=" + amount + " WHERE bigBudgetID=" + id + ";"; st.execute(editBigBudget); } } if (!frequency.equals("")) { int freq = 0; if (frequency.equalsIgnoreCase("Daily")) { freq = 1; } else if (frequency.equalsIgnoreCase("Weekly")) { freq = 7; } else if (frequency.equalsIgnoreCase("Monthly")) { freq = 30; } else if (frequency.equalsIgnoreCase("Yearly")) { freq = 365; } else { try { freq = Integer.parseInt(frequency); } catch (NumberFormatException e) { response = getData(conn, message.getInt("userID")); response.put("message", "editbudgetfail"); response.put("editbudgetfail", "Invalid frequency added."); return response; } } st.execute("UPDATE BigBudgets SET Frequency=" + freq + ", BigBudgetDaysLeft=" + freq + " WHERE bigBudgetID=" + id + ";"); } // double amount = message.getDouble("bigBudgetAmount"); // st.execute(editBigBudget); response = getData(conn, message.getInt("userID")); response.put("message", "editbudgetsuccess"); response.put("editbudgetsuccess", "Edit budget success."); return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "editbudgetfail"); response.put("editbudgetfail", "Edit budget failed."); return response; } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject createBudget(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; int user = message.getInt("userID"); String name = message.getString("budgetName"); int budgetID = message.getInt("bigBudgetID"); double amount = message.getDouble("budgetAmount"); String result = "(" + budgetID + ", " + amount + ", '" + name + "', 0);"; st.execute(Constants.SQL_INSERT_BUDGET + result); response = getData(conn, user); response.put("message", "createcategorysuccess"); return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "createcategoryfailed"); response.put("createbudgetfail", "Create category failed."); return response; } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject editBudget(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; int id = message.getInt("categoryID"); String name = message.getString("categoryName"); String amount = message.getString("categoryAmount"); String editBudget = ""; if (!name.equals("")) { editBudget = "UPDATE Budgets SET BudgetName='" + name + /*"', BudgetAmount=" + amount + */"' WHERE budgetID=" + id + ";"; st.execute(editBudget); } if (!amount.equals("")) { double a = message.getDouble("categoryAmount"); rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID=" + id + ";"); int bbID = 0; if (rs.next()) { bbID = rs.getInt("bigBudgetID"); } Statement st1 = conn.createStatement(); ResultSet rs1 = st1.executeQuery("SELECT * FROM Budgets WHERE bigBudgetID=" + bbID + ";"); double sum = 0; if (rs1.next()) { if (rs1.getInt("budgetID") != id) { sum += rs1.getDouble("BudgetAmount"); } } Statement st2 = conn.createStatement(); ResultSet rs2 = st2.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID=" + bbID + ";"); double bigBudgetAmount = 0; if (rs2.next()) { bigBudgetAmount = rs2.getDouble("BigBudgetAmount"); } if ((sum+a)<=bigBudgetAmount) { editBudget = "UPDATE Budgets SET BudgetAmount=" + amount + " WHERE budgetID=" + id + ";"; st.execute(editBudget); } else { response = getData(conn, message.getInt("userID")); response.put("message", "editcategoryfail"); response.put("editcategoryfail", "You can't make the category amounts sum to more than the budget limit."); return response; } //TODO make sure it doesn't go over BigBUDGETAMOUTN } // else { // editBudget = "UPDATE Budgets SET BudgetName='" + name + "', BudgetAmount=" + amount + " WHERE budgetID=" + id + ";"; // st.execute(editBudget); // } // response = notify(conn, null, message); // JSONObject data = getData(conn, message.getInt("userID")); // for (String key : JSONObject.getNames(data)) { // response.put(key, data.get(key)); // } // if (!response.getString("message").equals("notification")) { response = getData(conn, message.getInt("userID")); response.put("message", "editcategorysuccess"); response.put("editcategorysuccess", "Edit category success."); // } return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "editcategoryfail"); response.put("editbudgetfail", "Edit budget failed."); return response; } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject deleteBudget(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); int id = message.getInt("categoryID"); String deleteTransactions = "DELETE FROM Transactions WHERE budgetID=" + id + ";"; st.execute(deleteTransactions); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID=" + id + ";"); double addBack = 0; int bigBudgetID = 0; if (rs.next()) { addBack = rs.getFloat("TotalAmountSpent"); bigBudgetID = rs.getInt("bigBudgetID"); } String deleteBudget = "DELETE FROM Budgets WHERE budgetID=" + id + ";"; st.execute(deleteBudget); ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + bigBudgetID + ";"); double bbAmountSpent = 0; if (rs1.next()) { bbAmountSpent = rs1.getFloat("TotalAmountSpent"); } st.executeUpdate("UPDATE BigBudgets SET TotalAmountSpent=" + (bbAmountSpent-addBack) + " WHERE bigBudgetID=" + bigBudgetID + ";"); response = getData(conn, message.getInt("userID")); response.put("message", "removebudgetsuccess"); response.put("removebudgetsuccess", "You removed a category."); } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "removebudgetfailure"); response.put("removebudgetfailure", "SQLException in backend. ID not removed."); return response; } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject refreshDataCategory(JSONObject message, Session session, Connection conn) { try { response = getData(conn, message.getInt("userID")); response.put("message", "getdatacategorysuccess"); return response; } catch (JSONException e) { try { response.put("message", "getdatacategoryfail"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // TODO Auto-generated catch block e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject refreshDataTransaction(JSONObject message, Session session, Connection conn) { try { response = getData(conn, message.getInt("userID")); if (transNotif != null) { response.put("notification", "yes"); response.put("notify", transNotif.get("notify")); transNotif = null; } else { response.put("notification", "no"); } response.put("message", "getdatatransactionsuccess"); return response; } catch (JSONException e) { try { response.put("message", "getdatatransactionfail"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // TODO Auto-generated catch block e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject refreshDataHistory(JSONObject message, Session session, Connection conn) { try { response = getData(conn, message.getInt("userID")); response.put("message", "getdatahistorysuccess"); return response; } catch (JSONException e) { try { response.put("message", "getdatahistoryfail"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } // TODO Auto-generated catch block e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject deleteBigBudget(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); int id = message.getInt("bigBudgetID"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE bigBudgetID=" + id + ";"); Statement st1 = conn.createStatement(); while (rs.next()) { st1.execute("DELETE FROM Transactions WHERE budgetID=" + rs.getInt("budgetID") + ";"); } String deleteBudgetcmd = "DELETE FROM Budgets WHERE bigBudgetID=" + id + ";"; st1.execute(deleteBudgetcmd); String deleteBigBudget = "DELETE FROM BigBudgets WHERE bigBudgetID=" + id + ";"; st1.execute(deleteBigBudget); response.put("message", "removebigbudgetsuccess"); response.put("removebigbudgetsuccess", "You removed a budget and its categories."); return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "removebigbudgetfailure"); response.put("removebigbudgetfailure", "SQLException in backend. ID not removed."); return response; } catch (JSONException e) { e.printStackTrace(); } return response; } catch (JSONException e) { e.printStackTrace(); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject getData(Connection conn, int userID) { try { Statement st = conn.createStatement(); ResultSet rs = st.executeQuery("SELECT * FROM BigBudgets WHERE userID = " + userID + ";"); response.put("userID", userID); int budcounter = 1; while (rs.next()) { // System.out.println(rs.getString("BigBudgetName")); budcounter++; JSONObject currBudget = new JSONObject(); int bbID = rs.getInt("bigBudgetID"); currBudget.put("budgetName", rs.getString("BigBudgetName")); currBudget.put("budgetAmount", rs.getDouble("BigBudgetAmount")); currBudget.put("totalAmountSpent", rs.getDouble("TotalAmountSpent")); currBudget.put("daysLeft", rs.getInt("BigBudgetDaysLeft")); currBudget.put("budgetID", bbID); int f = rs.getInt("Frequency"); if (f==1) { currBudget.put("frequency", "daily"); } else if (f==7) { currBudget.put("frequency", "weekly"); } else if (f==30) { currBudget.put("frequency", "monthly"); } else if (f==365) { currBudget.put("frequency", "yearly"); } else { currBudget.put("frequency", "every " + f + " days"); } Statement st1 = conn.createStatement(); ResultSet rs1 = st1.executeQuery("SELECT * FROM Budgets WHERE bigBudgetID = " + bbID + ";"); int catcounter = 0; while (rs1.next()) { // System.out.println("add category"); catcounter++; JSONObject currCat = new JSONObject(); currCat.put("categoryName", rs1.getString("BudgetName")); currCat.put("categoryAmount", rs1.getDouble("BudgetAmount")); currCat.put("categoryID", rs1.getInt("budgetID")); currCat.put("totalAmountSpent", rs1.getDouble("TotalAmountSpent")); //Nest transactions into categories Statement st2 = conn.createStatement(); ResultSet rs2 = st2.executeQuery("SELECT * FROM Transactions WHERE budgetID = " + rs1.getInt("budgetID") + ";"); JSONArray transJSONArr = new JSONArray(); int transCounter = 0; while(rs2.next()) { JSONObject transJSON = new JSONObject(); double a = rs2.getDouble("Amount"); String tAmount; if (a < 0) { tAmount = "+" + String.format("%.2f", -a); } else { tAmount = "-" + String.format("%.2f", a); } transJSON.put("transactionAmount", tAmount); transJSON.put("transactionDetails", rs2.getString("Details")); transJSON.put("Longitude", rs2.getFloat("Longitude")); transJSON.put("Latitude", rs2.getFloat("Latitude")); transJSON.put("Date", rs2.getString("DateValue")); transJSON.put("transactionID", rs2.getInt("transactionID")); transCounter++; transJSONArr.put(transJSON); } currCat.put("transactionSize", transCounter); currCat.put("transactions", transJSONArr); currBudget.put("category" + catcounter, currCat); } currBudget.put("numCategories", catcounter); // System.out.println(currBudget.toString()); if (rs.getString("BigBudgetName").equals("Annual Savings")) { response.put("budget1", currBudget); budcounter--; } else { response.put("budget" + budcounter, currBudget); } } response.put("numBudgets", budcounter); } catch (JSONException | SQLException e) { System.out.println("Exception caught in getData." + e.getMessage()); } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject addTransaction(JSONObject message, Session session, Connection conn) { transNotif = new JSONObject(); try { Statement st = conn.createStatement(); double amount = message.getDouble("amountToAdd"); int userID = message.getInt("userID"); int budgetID = message.getInt("categoryID"); double latitude = message.getDouble("latitude"); double longitude = message.getDouble("longitude"); String details = message.getString("details"); String date = message.getString("date"); int auto = 0; if (message.getBoolean("automaticTransaction")) { System.out.println("help"); auto = 1; } //latitude, longitude, details st.execute(Constants.SQL_INSERT_TRANSACTION + "(" + budgetID + ", " + amount + ", '" + details + "', " + latitude + ", " + longitude +", '" + date + "', " + auto + ");"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID = " + budgetID + ";"); // System.out.println("rs"); int bigBudgetID=0; double budgetSpent=0; double newBudgetSpent=0; double budgetAmount=0; String budgetName=""; if(rs.next()) { bigBudgetID = rs.getInt("bigBudgetID"); budgetSpent = rs.getDouble("TotalAmountSpent"); newBudgetSpent = budgetSpent + amount; budgetAmount = rs.getDouble("BudgetAmount"); budgetName = rs.getString("BudgetName"); System.out.println(bigBudgetID); } // System.out.println("rs"); ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + bigBudgetID + ";"); // System.out.println("rs1"); double bigBudgetSpent = 0; double bigbudgetAmount = 0; double newBigBudgetSpent = 0; String bigbudgetName = ""; int daysLeft = 0; String lnotification=""; if (rs1.next()) { bigBudgetSpent = rs1.getDouble("TotalAmountSpent"); newBigBudgetSpent = bigBudgetSpent+amount; bigbudgetAmount = rs1.getDouble("BigBudgetAmount"); bigbudgetName = rs1.getString("BigBudgetName"); daysLeft = rs1.getInt("BigBudgetDaysLeft"); lnotification = rs1.getString("LimitNotification"); } String[] lnList = lnotification.split(" "); ArrayList<Integer> list = new ArrayList<Integer>(); for (int i=0; i<lnList.length; i++) { try { list.add(Integer.parseInt(lnList[i])); } catch(NumberFormatException e) { e.printStackTrace(); } } st.executeUpdate("UPDATE Budgets SET TotalAmountSpent = " + newBudgetSpent + " WHERE budgetID = " + budgetID + ";"); System.out.println("update"); response = getData(conn, userID); st.executeUpdate("UPDATE BigBudgets SET TotalAmountSpent = " + newBigBudgetSpent + " WHERE bigBudgetID = " + bigBudgetID + ";"); Arrays.sort(list.toArray()); boolean added = false; for (int i=list.size()-1; i>=0; i--) { System.out.println(list.get(i)); System.out.println(newBudgetSpent + ", " + ((double)list.get(i)/100)*(budgetAmount) + ", " + budgetSpent + ", " + budgetAmount + ", " + (newBudgetSpent > ((list.get(i)/100)*(budgetAmount)))); if ((newBudgetSpent >= (((double)list.get(i)/100)*(budgetAmount))) && (budgetSpent < (((double)list.get(i)/100)*budgetAmount))) { response.put("notification", "yes"); response.put("notify", "You have now spent " + list.get(i) + "% of category " + budgetName + " which is in budget " + bigbudgetName + ". You have " + daysLeft + " more days."); i = -1; added = true; } } if (!added) { response.put("notification", "no"); } // if (newBudgetSpent >= ((budgetAmount)) && budgetSpent <= (budgetAmount)) { // response.put("notification", "yes"); // response.put("notify", "You have used all of your allotted amount in category " + budgetName + " which is in budget " + bigbudgetName + ". You have " + daysLeft + " more days."); // } // else if (newBudgetSpent > (0.95*(budgetAmount)) && budgetSpent <= (0.95*budgetAmount)) { // response.put("notification", "yes"); // response.put("notify", "You now have less than 5% left in category " + budgetName + " which is in budget " + bigbudgetName + ". You have " + daysLeft + " more days."); // } // else if (newBudgetSpent > (0.9*(budgetAmount)) && budgetSpent <= (0.9*budgetAmount)) { // response.put("notification", "yes"); // response.put("notify", "You now have less than 10% left in category " + budgetName + " which is in budget " + bigbudgetName + ". You have " + daysLeft + " more days."); // } // else if (newBudgetSpent > (0.8*(budgetAmount)) && budgetSpent <= (0.8*budgetAmount)) { // response.put("notification", "yes"); // response.put("notify", "You now have less than 20% left in category " + budgetName + " which is in budget " + bigbudgetName + ". You have " + daysLeft + " more days."); // } // else { // response.put("notification", "no"); // } if (response.getString("notification").equals("no")) { transNotif = null; } else { transNotif.put("notification", "yes"); transNotif.put("notify", response.getString("notify")); } response.put("message", "addTransactionSuccess"); } catch (SQLException | JSONException e) { e.printStackTrace(); try { response.put("message", "addTransactionFail"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } // deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject renameTransaction(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); int transID = message.getInt("transactionID"); int userID = message.getInt("userID"); String details = message.getString("newDescription"); st.execute("UPDATE Transactions SET Details='" + details + "' WHERE transactionID=" + transID + ";"); response = getData(conn, userID); response.put("message", "renameTransactionSuccess"); } catch(SQLException | JSONException e) { e.printStackTrace(); try { response.put("message", "renameTransactionFail"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject deleteTransaction(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); int transID = message.getInt("transactionID"); int userID = message.getInt("userID"); int budgetID = 0; double amount = 0; ResultSet rs = st.executeQuery("SELECT * FROM Transactions WHERE transactionID=" + transID + ";"); int bigBudgetID = 0; if (rs.next()) { amount = rs.getFloat("Amount"); budgetID = rs.getInt("budgetID"); } ResultSet rs1 = st.executeQuery("SELECT * FROM Budgets WHERE budgetID=" + budgetID + ";"); double budgetAmountSpent = 0; if (rs1.next()) { budgetAmountSpent = rs1.getFloat("TotalAmountSpent"); bigBudgetID = rs1.getInt("bigBudgetID"); } ResultSet rs2 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID=" + bigBudgetID + ";"); double bigBudgetAmountSpent = 0; if (rs2.next()) { bigBudgetAmountSpent = rs2.getFloat("TotalAmountSpent"); } Statement st4 = conn.createStatement(); st4.execute("UPDATE Budgets SET TotalAmountSpent=" + (budgetAmountSpent-amount) + " WHERE budgetID=" + budgetID + ";"); Statement st5 = conn.createStatement(); st5.execute("UPDATE BigBudgets SET TotalAmountSpent=" + (bigBudgetAmountSpent-amount) + "WHERE bigBudgetID=" + bigBudgetID + ";"); String deleteTrans = "DELETE FROM Transactions WHERE transactionID=" + transID + ";"; st.execute(deleteTrans); response = getData(conn, userID); response.put("message", "deleteTransactionSuccess"); } catch (SQLException | JSONException e) { e.printStackTrace(); try { response.put("message", "deleteTransactionFail"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject deleteAllTransactions(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); int budgetID = message.getInt("categoryID"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID=" + budgetID + ";"); double addBack = 0; int bigBudgetID = 0; if (rs.next()) { addBack = rs.getFloat("TotalAmountSpent"); bigBudgetID = rs.getInt("bigBudgetID"); } ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID=" + bigBudgetID + ";"); double bbAmountSpent = 0; if (rs1.next()) { bbAmountSpent = rs1.getFloat("TotalAmountSpent"); } st.execute("DELETE FROM Transactions WHERE budgetID = " + budgetID + ";"); st.execute("UPDATE Budgets SET TotalAmountSpent=0 WHERE budgetID=" + budgetID + ";"); st.execute("UPDATE BigBudgets SET TotalAmountSpent = " + (bbAmountSpent-addBack) + " WHERE bigBudgetID=" + bigBudgetID + ";"); response.put("message", "deleteAllTransactionsSuccess"); } catch (SQLException | JSONException e) { e.printStackTrace(); try { response.put("message", "deleteAllTransactionsFail"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject signUpTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; String signupemail = (String) message.get("email"); if (signupemail.length() > 0) { rs = st.executeQuery("SELECT * from TotalUsers"); while (rs.next()) { if (rs.getString("Email").equals(signupemail)) { response = getData(conn, rs.getInt("userID")); response.put("message", "signupfailtest"); response.put("signupfailtest", "Account already exists."); return response; //return failed sign up message } } String signupfirstname = message.getString("firstname"); String signuplastname = message.getString("lastname"); String signuppassword = (String)message.get("password"); signuppassword.replaceAll("\\s+",""); int s = hash(signuppassword); if (signupfirstname.equals("") || signuplastname.equals("") || signuppassword.equals("") || signupemail.equals("")) { response.put("message", "signupfailtest"); response.put("signupfailtest", "Please fill in all of the fields."); return response; //return failed sign up message } //Account has successful inputs and is now entered into the database. String addUser = "('" + signupfirstname + "', '" + signuplastname + "', " + s + ", '" + signupemail + "')"; // String addUser = "('" + signupfirstname + "', '" + signuplastname + "', " + signuppassword + "', '" + signupemail + "')"; st.execute(Constants.SQL_INSERT_USER + addUser + ";"); // emailSessions.put(signupemail, session); response.put("message", "signupsuccesstest"); response.put("signupsuccesstest", "Account was made."); response.put("email", signupemail); response.put("firstName", signupfirstname); response.put("lastName", signuplastname); } else { response.put("message", "signupfailtest"); response.put("signupfailtest", "Please enter an email."); // return response; //return failed sign up message } } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "signupfailtest"); response.put("signupfailtest", "Sign up failed."); } catch (JSONException e) { e.printStackTrace(); } // return response; } catch (JSONException e1) { e1.printStackTrace(); } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject changePasswordTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; String newPassword = message.getString("newPassword"); String email = message.getString("email"); int p = hash(newPassword); rs = st.executeQuery("SELECT * from TotalUsers WHERE Email='" + email + "';"); if (rs.next()) { st.executeUpdate("UPDATE TotalUsers SET Password=" + p + " WHERE Email='" + email + "';"); response.put("message", "passwordSuccessTest"); response.put("email", rs.getString("Email")); response.put("firstName", rs.getString("FirstName")); response.put("lastName", rs.getString("LastName")); } else { response.put("message", "passwordFailTest"); } } catch(SQLException sqle) { } catch (JSONException e) { e.printStackTrace(); } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject createBigBudgetTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; String name = message.getString("bigBudgetName"); double amount = message.getDouble("bigBudgetAmount"); int user = message.getInt("userID"); boolean success; if (amount > 0 && amount <= 1000000) { String addBigBudget = "(" + user + ", '"+ name + "', 1, 34.0222, -118.282, " + amount + ", 0)"; st.execute(Constants.SQL_INSERT_BIGBUDGET + addBigBudget); } else { success = true; } response.put("message", "createBigBudgetSuccessTest"); //add budgets to feed // return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "createBigBudgetSuccessTest"); response.put("createBigBudgetSuccessTest", "Create budget failed."); // return response; } catch (JSONException e) { try { response.put("message", "createBigBudgetSuccessTest"); response.put("createBigBudgetSuccessTest", "Create budget failed."); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } e.printStackTrace(); } // return response; } catch (JSONException e) { try { response.put("message", "createBigBudgetSuccessTest"); response.put("createBigBudgetSuccessTest", "didn't create"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } e.printStackTrace(); } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject createBudgetTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; int user = message.getInt("userID"); String name = message.getString("budgetName"); int budgetID = message.getInt("bigBudgetID"); double amount = message.getDouble("budgetAmount"); String result = "(" + budgetID + ", " + amount + ", '" + name + "',0);"; boolean success = st.execute(Constants.SQL_INSERT_BUDGET + result); response.put("message", "createBudgetSuccessTest"); // return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "createBudgetFailTest"); response.put("createBudgetFailTest", "Create category failed."); // return response; } catch (JSONException e) { e.printStackTrace(); } // return response; } catch (JSONException e) { e.printStackTrace(); } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject deleteBigBudgetTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); ResultSet rs = null; int id = message.getInt("bigBudgetID"); String deleteBudgetcmd = "DELETE FROM Budgets WHERE bigBudgetID=" + id + ";"; st.execute(deleteBudgetcmd); String deleteBigBudget = "DELETE FROM BigBudgets WHERE bigBudgetID=" + id + ";"; st.execute(deleteBigBudget); response.put("message", "deleteBigBudgetSuccessTest"); response.put("deleteBigBudgetSuccessTest", "You removed a budget and its categories."); // return response; } catch (SQLException sqle) { try { sqle.printStackTrace(); response.put("message", "deleteBigBudgetFailTest"); response.put("deleteBigBudgetFailTest", "SQLException in backend. ID not removed."); // return response; } catch (JSONException e) { e.printStackTrace(); } // return response; } catch (JSONException e) { e.printStackTrace(); } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject addToBudgetTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); double amount = message.getDouble("amountToAdd"); int budgetID = message.getInt("budgetID"); st.execute(Constants.SQL_INSERT_TRANSACTION + "(" + budgetID + ", " + amount + ", '', 0, 0);"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID = " + budgetID + ";"); System.out.println("rs"); int bigBudgetID=0; double budgetSpent=0; if(rs.next()) { bigBudgetID = rs.getInt("bigBudgetID"); budgetSpent = rs.getDouble("TotalAmountSpent") + amount; System.out.println(bigBudgetID); } System.out.println("rs"); ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + bigBudgetID + ";"); System.out.println("rs1"); double bigBudgetSpent = 0; double bigbudgetAmount = 0; String bigbudgetName = ""; if (rs1.next()) { bigBudgetSpent = rs1.getDouble("TotalAmountSpent")+amount; bigbudgetAmount = rs1.getDouble("BigBudgetAmount"); bigbudgetName = rs1.getString("BigBudgetName"); } st.executeUpdate("UPDATE Budgets SET TotalAmountSpent = " + budgetSpent + " WHERE budgetID = " + budgetID + ";"); System.out.println("update"); st.executeUpdate("UPDATE BigBudgets SET TotalAmountSpent = " + bigBudgetSpent + " WHERE bigBudgetID = " + bigBudgetID + ";"); if (bigBudgetSpent > 0.8*(bigbudgetAmount)) { response.put("notification", "yes"); response.put("notify", "You now have less than 20% left in budget" + bigbudgetName); } response.put("message", "addToBudgetSuccessTest"); } catch (SQLException | JSONException e) { try { response.put("message", "addToBudgetFailTest"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject subtractFromBudgetTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); double amount = message.getDouble("amountToAdd"); int budgetID = message.getInt("budgetID"); st.execute(Constants.SQL_INSERT_TRANSACTION + "(" + budgetID + ", " + amount + ", '', 0, 0);"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID = " + budgetID + ";"); int bigBudgetID=0; double budgetSpent=0; if(rs.next()) { bigBudgetID = rs.getInt("bigBudgetID"); budgetSpent = rs.getDouble("TotalAmountSpent") + amount; System.out.println(bigBudgetID); } ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + bigBudgetID + ";"); double bigBudgetSpent = 0; double bigbudgetAmount = 0; String bigbudgetName = ""; if (rs1.next()) { bigBudgetSpent = rs1.getDouble("TotalAmountSpent")+amount; bigbudgetAmount = rs1.getDouble("BigBudgetAmount"); bigbudgetName = rs1.getString("BigBudgetName"); } st.executeUpdate("UPDATE Budgets SET TotalAmountSpent = " + budgetSpent + " WHERE budgetID = " + budgetID + ";"); System.out.println("update"); st.executeUpdate("UPDATE BigBudgets SET TotalAmountSpent = " + bigBudgetSpent + " WHERE bigBudgetID = " + bigBudgetID + ";"); if (bigBudgetSpent > 0.8*(bigbudgetAmount)) { response.put("notification", "yes"); response.put("notify", "You now have less than 20% left in budget" + bigbudgetName); } response.put("message", "subtractFromBudgetSuccessTest"); } catch (SQLException | JSONException e) { try { response.put("message", "subtractFromBudgetFailTest"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject transactionHistoryTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); double amount = message.getDouble("amountToAdd"); int budgetID = message.getInt("budgetID"); st.execute(Constants.SQL_INSERT_TRANSACTION + "(" + budgetID + ", " + amount + ", '', 0, 0);"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID = " + budgetID + ";"); int bigBudgetID=0; double budgetSpent=0; if(rs.next()) { bigBudgetID = rs.getInt("bigBudgetID"); budgetSpent = rs.getDouble("TotalAmountSpent") + amount; System.out.println(bigBudgetID); } ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + bigBudgetID + ";"); double bigBudgetSpent = 0; double bigbudgetAmount = 0; String bigbudgetName = ""; if (rs1.next()) { bigBudgetSpent = rs1.getDouble("TotalAmountSpent")+amount; bigbudgetAmount = rs1.getDouble("BigBudgetAmount"); bigbudgetName = rs1.getString("BigBudgetName"); } st.executeUpdate("UPDATE Budgets SET TotalAmountSpent = " + budgetSpent + " WHERE budgetID = " + budgetID + ";"); System.out.println("update"); st.executeUpdate("UPDATE BigBudgets SET TotalAmountSpent = " + bigBudgetSpent + " WHERE bigBudgetID = " + bigBudgetID + ";"); if (bigBudgetSpent > 0.8*(bigbudgetAmount)) { response.put("notification", "yes"); response.put("notify", "You now have less than 20% left in budget" + bigbudgetName); } ResultSet rs2 = st.executeQuery("SELECT * FROM Transactions;"); if (rs2.next()) { response.put("message", "transactionHistorySuccessTest"); } else { response.put("message", "transactionHistoryFailTest"); } } catch (SQLException | JSONException e) { try { response.put("message", "transactionHistoryFailTest"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject locationTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); double amount = message.getDouble("amountToAdd"); int budgetID = message.getInt("budgetID"); double latitude = message.getDouble("markerLatitude"); double longitude = message.getDouble("markerLongitude"); st.execute(Constants.SQL_INSERT_TRANSACTION + "(" + budgetID + ", " + amount + ", ''," + latitude + ", " + longitude + ");"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID = " + budgetID + ";"); int bigBudgetID=0; double budgetSpent=0; if(rs.next()) { bigBudgetID = rs.getInt("bigBudgetID"); budgetSpent = rs.getDouble("TotalAmountSpent") + amount; System.out.println(bigBudgetID); } ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + bigBudgetID + ";"); double bigBudgetSpent = 0; double bigbudgetAmount = 0; String bigbudgetName = ""; if (rs1.next()) { bigBudgetSpent = rs1.getDouble("TotalAmountSpent")+amount; bigbudgetAmount = rs1.getDouble("BigBudgetAmount"); bigbudgetName = rs1.getString("BigBudgetName"); } st.executeUpdate("UPDATE Budgets SET TotalAmountSpent = " + budgetSpent + " WHERE budgetID = " + budgetID + ";"); System.out.println("update"); st.executeUpdate("UPDATE BigBudgets SET TotalAmountSpent = " + bigBudgetSpent + " WHERE bigBudgetID = " + bigBudgetID + ";"); if (bigBudgetSpent > 0.8*(bigbudgetAmount)) { response.put("notification", "yes"); response.put("notify", "You now have less than 20% left in budget" + bigbudgetName); } ResultSet rs2 = st.executeQuery("SELECT * FROM Transactions;"); if (rs2.next()) { if (rs2.getDouble("Longitude") == message.getDouble("markerLongitude") && rs2.getDouble("Latitude") == message.getDouble("markerLatitude")) response.put("message", "locationSuccessTest"); else { response.put("message", "locationFailTest"); } } else { response.put("message", "locationFailTest"); } } catch (SQLException | JSONException e) { try { response.put("message", "locationFailTest"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1
JSONObject response = new JSONObject();
public JSONObject limitNotificationTest(JSONObject message, Session session, Connection conn) { try { Statement st = conn.createStatement(); double amount = message.getDouble("amountToAdd"); int budgetID = message.getInt("budgetID"); st.execute(Constants.SQL_INSERT_TRANSACTION + "(" + budgetID + ", " + amount + ", '', 0, 0);"); ResultSet rs = st.executeQuery("SELECT * FROM Budgets WHERE budgetID = " + budgetID + ";"); int bigBudgetID=0; double budgetSpent=0; if(rs.next()) { bigBudgetID = rs.getInt("bigBudgetID"); budgetSpent = rs.getDouble("TotalAmountSpent") + amount; System.out.println(bigBudgetID); } ResultSet rs1 = st.executeQuery("SELECT * FROM BigBudgets WHERE bigBudgetID = " + bigBudgetID + ";"); double bigBudgetSpent = 0; double bigbudgetAmount = 0; String bigbudgetName = ""; if (rs1.next()) { bigBudgetSpent = rs1.getDouble("TotalAmountSpent")+amount; bigbudgetAmount = rs1.getDouble("BigBudgetAmount"); bigbudgetName = rs1.getString("BigBudgetName"); } st.executeUpdate("UPDATE Budgets SET TotalAmountSpent = " + budgetSpent + " WHERE budgetID = " + budgetID + ";"); System.out.println("update"); st.executeUpdate("UPDATE BigBudgets SET TotalAmountSpent = " + bigBudgetSpent + " WHERE bigBudgetID = " + bigBudgetID + ";"); if (bigBudgetSpent > 0.8*(bigbudgetAmount)) { response.put("notification", "yes"); response.put("notify", "You now have less than 20% left in budget" + bigbudgetName); } ResultSet rs2 = st.executeQuery("SELECT * FROM Transactions;"); response.put("message", "limitNotificationSuccessTest"); } catch (SQLException | JSONException e) { try { response.put("message", "limitNotificationFailTest"); } catch (JSONException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } deleteAll(conn); return response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }", "JSONObject toJson();", "JSONObject toJson();", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(String response) {\n Toast.makeText(getBaseContext(),\"Response is: \"+ response,Toast.LENGTH_LONG).show();\n json(response);\n }", "protected abstract Object buildJsonObject(R response);", "public void setResponse(JSONObject res) { response = res; }", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "void response( JSONArray data );", "public void onSuccessInBackground(JSONObject jsonObject);", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.e(\"puto\",\"PRECEOSA \");\n procesarRespuesta(response);\n\n Log.e(\"puto\",\"respuetsa -\"+response);\n }", "public JSONResponse(String jsonString) {\n this.jsonString = jsonString;\n }", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n\n String res = new String(response);\n try {\n JSONObject object = new JSONObject(res);\n String objStr = object.get(\"vote_result\") + \"\";\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n Log.d(\"SUN\", \"e : \" + e.toString());\n }\n\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "String getJSON();", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n Log.e(\"JSON\", new String(response));\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n code.setsid(finalSID);\n //this is to set the diffrent values\n code.getVIDdb(getBaseContext());\n code.getCount(getBaseContext());\n //System.out.println(response.toString());\n\n try {\n JSONObject jsonObject = new JSONObject(response.toString());\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }", "public JSONObject postJSONRequest(String url)throws Exception{\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\tString responseString = executeRequest(url);\n\t\tresponseJSON = parseJSONResponse(responseString);\n\t\t\n return responseJSON;\n\n\t}", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "void mo28373a(JSONObject jSONObject);", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "protected void onPostExecute(String json) {\n\r\n\r\n\r\n\r\n\r\n\r\n }", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n try {\n response = Requestor.requestRegister(requestQueue, REGISTER_URL, phone, name, email, password);\n // response = JSONParser.Register(REGISTER_URL, phone, name, email, password);\n Log.d(\"TEST\", response.toString());\n code = response.getString(CODE);\n msg = response.getString(MESSAGE);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n return response;\n }", "private JSON() {\n\t}", "public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void sendRequest(String URL) {\n RequestQueue requestQueue = Volley.newRequestQueue(context);\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(headers)\n , new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(\"sendRequest Response\", response.toString());\n try {\n //temp\n JSONObject j = new JSONObject();\n j = response;\n Log.e(\"j\",j.toString());\n\n //responseJSONObject = new JSONObject(response);\n serverResponse.saveResponse(response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Response_Error\",databaseURL + \" : \" + error.toString());\n }\n });\n\n requestQueue.add(jsonObjectRequest);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject getDefaultResponse() {\n\t\tJSONObject res = new JSONObject();\n\t\t\n\t\tres.put(\"result\", \"SUCCESS\");\n\t\t\n\t\treturn res;\n\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n try {\n JSONArray data = new JSONArray(response.toString());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}", "public JSONObject retrieve() throws IOException, JSONException {\n HTTPGetter getter = new HTTPGetter(url, TAG);\n InputStream in = getter.performRequest();\n if(in == null) return null;\n\n String jsonString = converter.getString(in);\n return new JSONObject(jsonString);\n }", "private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }", "void onRequestCompleted(JSONArray result);", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getApplicationContext(), \"Data Donation Successful!!\", Toast.LENGTH_LONG).show();\n Log.v(\"uploadresponse\", response.toString());\n }", "private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }", "public JSONObject toJson() {\n }", "@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\r\n try {\r\n\r\n evalResponse(response);\r\n } catch (JSONException e) {\r\n\r\n e.printStackTrace();\r\n }\r\n pdLoading.dismiss();\r\n }", "@Override\n protected JSONObject doInBackground(String... params) {\n\n String url= Constants.Base+Constants.Resetpassword;\n\n JSONObject object = new JSONObject();\n try {\n\n object.put(\"email\",emailtxt);\n object.put(\"password\",u_pass);\n object.put(\"confirm_password\",u_conpass);\n object.put(\"otp\",u_otp);\n\n LoggerGeneral.info(\"JsonObjectPrint\" + object.toString());\n\n } catch (Exception ex) {\n\n }\n\n String str = '\"' + appPreferences.getString(\"jwt\", \"\") + '\"';\n JSONObject jsonObject = ServiceFacade.getResponsJsonParams(url, object);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n Log.d(\"hi\", \"getresponse\" + jsonObject);\n\n if (jsonObject != null) {\n if (jsonObject.has(\"Data\")) {\n try {\n Log.d(\"hi\", \"getresponse11\" + jsonObject);\n\n String response = jsonObject.toString();\n Log.d(\"hi\", \"getresponse22\" + response);\n\n } catch (Exception e) {\n }\n }\n }\n return jsonObject;\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public void parseResponse();", "ResponseHandler createResponseHandler();", "private void getJSONResponse(){\r\n String jsonResponse = null; //unparsed json response\r\n try { \r\n //URL\r\n URL url = new URL(\"\"\r\n + \"https://global.api.pvp.net/api/lol/static-data/\" + this.regionCode + \"/v1.2/champion?champData=image&api_key=\" + this.objLoLSearch.getApiKey());\r\n //retrieve JSON\r\n BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));\r\n String strTemp = \"\";\r\n while (null != (strTemp = br.readLine())) {\r\n jsonResponse = strTemp;\r\n }\r\n //System.out.println(jsonResponse);\r\n parseJSONResponse(jsonResponse); //parse the json response into usable values\r\n \r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ProtocolException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(LoLStaticData_AllChampions.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "public interface JSONAdapter {\n public JSONObject toJSONObject();\n}", "public String getJson();", "@Override\n protected JSONObject doInBackground(Void... params) {\n\n\n try {\n response = Requestor.requestgetOTP(requestQueue, GENERATE_OTP_URL, phone);\n //response = JSONParser.getOTP(GENERATE_OTP_URL, phone);\n Log.d(\"TEST\", response.toString());\n if (response != null) {\n if (response.has(CODE)) {\n\n code = response.getString(CODE);\n Log.d(\"TEST\", code.toString());\n }\n if (response.has(OTP)) {\n ResOtp = response.getString(OTP);\n }\n if (response.has(MESSAGE)) {\n msg = response.getString(MESSAGE);\n }\n }\n\n // if(response.c)\n\n } catch (Exception e) {\n Log.d(\"TEST\", e.toString());\n e.printStackTrace();\n }\n\n\n return response;\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(getContext(), response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"*********************************************************\");\n System.out.println(response.toString());\n ArrayList<String> customerArr=new ArrayList<>();\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "JSONObject mo28758a(View view);", "protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse=null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private static JSONObject m91738L() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"is_photo\", 1);\n } catch (JSONException unused) {\n }\n return jSONObject;\n }", "@Override\n\t\tprotected JSONObject doInBackground(String... params) {\n\t\t\tJSONObject jsResponse = null;\n\t\t\ttry {\n\t\t\t\tjsResponse=new JSONObject(AppUtil.getResponse(params[0]));\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn jsResponse;\n\t\t}", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "void mo59932a(String str, JSONObject jSONObject);", "public org.json.JSONObject getJSONObject() {\n return genClient.getJSONObject();\n }", "@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "JsonObject raw();", "public JSONObject getResult()\n {\n return result;\n }", "@Override\n public void onResponse(String response) {\n }", "void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);", "@Override\n public void onResponse(String response) {\n Log.d(\"Debug\", response);\n value = response;\n\n }", "Response createResponse();", "@Override\n public JSONObject getJSONObject() throws JSONException {\n return null;\n }", "public JSONObject returnAsJSONObject() throws JSONException {\n\t\tJSONObject data = new JSONObject();\n\n\t\tdata.put(\"client_database_id\", this.id);\n\t\tdata.put(\"access_token\", this.access_token);\n\t\tdata.put(\"service\", this.service);\n\t\tdata.put(\"action\", this.action);\n\t\tdata.put(\"objects\", this.objects);\n\t\tdata.put(\"create_date\", this.create_date);\n\n\t\treturn data;\n\t}", "void mo26099a(String str, JSONObject jSONObject);", "protected JSONObject readResponse(HttpURLConnection conn) throws IOException, JSONException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n try {\n String jsonText = \"\";\n String line;\n while ((line = reader.readLine()) != null) {\n jsonText += line;\n }\n return new JSONObject(jsonText);\n } finally {\n reader.close();\n }\n }", "protected abstract JSONObject build();", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "public interface OnJSONObjectResponseListener {\n\n void onResponse(JSONObject response, String errorMessage);\n}", "@Override\r\n protected Response<JSONObject> parseNetworkResponse(NetworkResponse response) {\r\n try {\r\n if (response.data.length == 0) {\r\n byte[] responseData = \"{}\".getBytes(\"UTF8\");\r\n response = new NetworkResponse(response.statusCode, responseData, response.headers, response.notModified);\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n e.printStackTrace();\r\n }\r\n return super.parseNetworkResponse(response);\r\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //Mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n //obj.getString(\"message\") digunakan untuk mengambil pesan status dari response\n finish();\n\n\n //obj.getString(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(AddKostActivity.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(String response) {\n System.out.println(\"Response is: \"+ response);\n\n try {\n JSONObject jsonObj = new JSONObject(response);\n String responseResult = jsonObj.getString(\"result\");\n String err = jsonObj.getString(\"err\");\n if (responseResult.equals(\"success\")) {\n continueAfterSuccessfulResponse(jsonObj, requestCode);\n }\n else\n {\n AlertDialog alertDialog = new AlertDialog.Builder(ViewInventoryActivity.this).create();\n alertDialog.setTitle(\"Error\");\n alertDialog.setMessage(err);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\t\t\tpublic void onResponse(JSONObject arg0) {\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }" ]
[ "0.70700103", "0.6984609", "0.6820411", "0.6820411", "0.6796738", "0.6758928", "0.67050016", "0.6687507", "0.6610664", "0.6587955", "0.64251065", "0.6424558", "0.63889945", "0.6359593", "0.63403136", "0.6302503", "0.62668484", "0.6241933", "0.6208644", "0.61999846", "0.61869216", "0.61788297", "0.6163488", "0.6163084", "0.61458886", "0.6138919", "0.6131155", "0.6113892", "0.6106761", "0.6084264", "0.6074325", "0.6046645", "0.60198265", "0.5997834", "0.5996636", "0.5980517", "0.5980517", "0.5980517", "0.59655297", "0.592299", "0.592299", "0.58851576", "0.58825207", "0.5877918", "0.58765525", "0.5871992", "0.58675784", "0.5866958", "0.5857711", "0.58354104", "0.583495", "0.5829752", "0.5812579", "0.58036643", "0.58017385", "0.57992375", "0.57939565", "0.5784302", "0.57822704", "0.57790124", "0.57743245", "0.57732356", "0.5767566", "0.57672876", "0.57672876", "0.5761204", "0.5761204", "0.5761204", "0.57562697", "0.5753891", "0.5742181", "0.57291126", "0.5725844", "0.5712663", "0.570843", "0.5708219", "0.5707611", "0.5705377", "0.56904846", "0.5688337", "0.5685419", "0.568363", "0.5683025", "0.5666689", "0.56626815", "0.56523657", "0.5644077", "0.56438357", "0.5636711", "0.5630814", "0.5620924", "0.5620599", "0.56194603", "0.56131107", "0.56042784", "0.55941993", "0.5589309", "0.5576166", "0.55759877", "0.55733263", "0.55724233" ]
0.0
-1